codefori / codefori/vscode-ibmi
reopen to ccsid 1252 stay in ccsid 1208
- Dominant language
- TypeScript
- Stars
- 418
- Forks
- 160
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 12
Description
I have a file, created with the notepad, containing these 4 characeters: ääââ and recorded with encoding ANSI, that is to say, ccsid 1252.
when I open it with vscode, it appeard dirty, and tagged UTF-8.
Reopening the file with ccsid 1252 windows resolve the problem.
When I do the same thing with an IFS file, opened with CodeForI,
at open it is dirty exactly the same appearance.
but when I reopen it with ccsid 1252, the new ccsid is ignored and the data still are dirty.
IFS dump (with DSPF)
405C5C5C 5C5C5C5C 5C5C5C5C 5CC28587 89959589 ************Beginni
E4E4E2E2 0D0A ääââ
405C5C5C 5C5C5C5C 5C5C5C5C 5CC59584 40968640 ************End of
Coded character set ID . . . . . . . . : 1252
It is extremely rare to have constants like that in RPG code, so this issue rare with RPG in the IFS.
BTW, the problem does not appears with the same file in a source file member: this say me the code server side did a convertion from ccsid 37 to ccsid 1208.
This kind of data happens often into SQL scripts where I uses INSERT to populate tables.
When I open the ifs file via a remote disk on the IBMI,
"\\myibmi\HOME$\myprofile\ansi.txt"
the reopening resolve the issue.
Is it possible to have VSCode understanding file encoding withourt having to reopen ?
Is it possible to have VSCode server side to advise VSCode client the encoding is 1252 and not 1208 ?
|Context|Version|
|-|-|
|Code for IBM i version|2.6.5|
|Visual Studio Code version|1.85.2|
|Operating System|win32_x64|
Active extensions
```
COBOL (cobol): 10.1.15
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.4.0
Db2 for IBM i (vscode-db2i): 0.6.1
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.16.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
IBM i Notebooks (vscode-ibmi-notebooks): 0.0.6
JSON Language Features (json-language-features): 1.0.0
Merge Conflict (merge-conflict): 1.0.0
Microsoft Account (microsoft-authentication): 0.0.1
Node Debug Auto-attach (debug-auto-launch): 1.0.0
TODO Highlight (vscode-todo-highlight): 1.0.5
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0
```
Remote system
|Setting|Value|
|-|-|
|IBM i OS|V7R5M0|
|Tech Refresh|3|
|CCSID|37|
|SQL|Disabled
|Source dates|Disabled
### Enabled features
|/usr/bin|/QOpenSys/pkgs/bin|/QSYS.lib/ILEDITOR.lib|/QSYS.LIB|/QIBM/ProdData/IBMiDebugService/bin|
|-|-|-|-|-|
|attr|bash|GENCMDXML.PGM|QZDFMDB2.PGM|startDebugService.sh|
|iconv|chsh|GETNEWLIBL.PGM|||
|setccsid|ls||||
|tar|md5sum||||
||sort||||
||stat||||
Shell env
```bash
BUILDLIB=QGPL
CURLIB=QGPL
HOME=/home/DEV1
LIBLS=DEV QTEMP QGPL
LOGIN=dev1
LOGNAME=dev1
MAIL=/var/spool/mail/dev1
OLDPWD=/home/DEV1
PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
PWD=/home/DEV1
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=88.162.124.129 5139 22
SSH_CONNECTION=88.162.124.129 5139 185.113.4.135 22
TZ=-1,M3.5.0,M10.5.0/03:00:00
USER=dev1
USERNAME=dev1
_=/QOpenSys/pkgs/bin/env
```
Variants
```json
{
"american": "#@$",
"local": "#@$"
}
```
Errors
```json
[
{
"command": "/QOpenSys/usr/bin/qsh",
"code": 1,
"stderr": "CPF9801: Object QCPTOIMPF in library QSYS not found.\nCPC2206: Ownership of object QZSHSYSTEM in QTEMP type *USRSPC changed.",
"cwd": "/home/DEV1"
},
{
"command": "/QOpenSys/usr/bin/qsh",
"code": 1,
"stderr": "CPF9801: Object QCPFRMIMPF in library QSYS not found.\nCPC2206: Ownership of object QZSHSYSTEM in QTEMP type *USRSPC changed.",
"cwd": "/home/DEV1"
},
{
"command": "ls -p /QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx",
"code": 2,
"stderr": "ls: cannot access '/QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx': No such file or directory",
"cwd": "/home/DEV1"
}
]
```
Contributor guide
Assessment
This issue has not been assessed yet.