vscode-ibmi
vscode-ibmi copied to clipboard
Quoted member names containing special characters are not rendered correctly
When using a user profile with German CCSID 273, we noticed that the first character of this quoted member name is not correct as displayed in the Object Browser. I have included below the correct result. The character displays fine in the member text.
Code4i:
5250:
When debugging the extension, I see that an SQL command like the following is run which returns the incorrect character:
With MEMBERS As (
SELECT
rtrim(cast(a.system_table_schema as char(10) for bit data)) as LIBRARY,
b.avgrowsize as RECORD_LENGTH,
a.iasp_number as ASP,
rtrim(cast(a.system_table_name as char(10))) AS SOURCE_FILE,
rtrim(cast(b.system_table_member as char(10))) as NAME,
coalesce(rtrim(cast(b.source_type as varchar(10))), '') as TYPE,
coalesce(rtrim(varchar(b.partition_text)), '') as TEXT,
b.NUMBER_ROWS as LINES,
extract(epoch from (b.CREATE_TIMESTAMP))*1000 as CREATED,
extract(epoch from (b.LAST_SOURCE_UPDATE_TIMESTAMP))*1000 as CHANGED
FROM qsys2.systables AS a
JOIN qsys2.syspartitionstat AS b
ON b.table_schema = a.table_schema AND
b.table_name = a.table_name
)
Select * From MEMBERS
Where LIBRARY = 'AURORADEU'
And SOURCE_FILE = 'QCBLLESRC'
And NAME Like '%'
And TYPE Like '%'
Order By NAME ASC
| Context | Version |
|---|---|
| Code for IBM i version | 2.10.2 |
| Visual Studio Code version | 1.89.1 |
| Operating System | win32_x64 |
Active extensions
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.5.0
Db2 for IBM i (vscode-db2i): 1.0.0
Emmet (emmet): 1.0.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
IBM i Debug (ibmidebug): 1.0.0
JSON Language Features (json-language-features): 1.0.0
Merge Conflict (merge-conflict): 1.0.0
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
WCA@IBM (wca-at-ibm): 6.0.0
WSL (remote-wsl): 0.88.2
Remote system
| Setting | Value |
|---|---|
| IBM i OS | n/a |
| Tech Refresh | n/a |
| CCSID Origin | undefined |
| Runtime CCSID | 273 |
| Default CCSID | 273 |
| SQL | Enabled |
| Source dates | Disabled |
Enabled features
| /QOpenSys/pkgs/bin | /usr/bin | /QSYS.lib/ILEDITOR.lib | /QSYS.LIB | /QIBM/ProdData/IBMiDebugService/bin |
|---|---|---|---|---|
| bash | attr | GETNEWLIBL.PGM | QZDFMDB2.PGM | startDebugService.sh |
| chsh | iconv | |||
| git | setccsid | |||
| grep | ||||
| ls | ||||
| md5sum | ||||
| sort | ||||
| stat | ||||
| tar | ||||
| tn5250 |
Shell env
BUILDLIB=AURORADEU
CURLIB=AURORADEU
HOME=/home/AURORADEU
HOST=p8adt05.rch.stglabs.ibm.com
LIBLS=QTEMP QGPL TESTTOOLS
LOGIN=auroradeu
LOGNAME=auroradeu
MAIL=/var/spool/mail/auroradeu
OLDPWD=/home/AURORADEU
PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
PWD=/home/AURORADEU
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=9.67.94.213 49300 22
SSH_CONNECTION=9.67.94.213 49300 9.5.12.241 22
TZ=<UTC>0
USER=auroradeu
USERNAME=AURORADEU
WORKDIR=/home/AURORADEU
_=/QOpenSys/pkgs/bin/env
Variants
{
"american": "#@$",
"local": "#@$"
}
Errors
[
{
"command": "/QOpenSys/usr/bin/qsh",
"code": 1,
"stderr": "CPF2111: Library ILEDITOR already exists.",
"cwd": "/home/AURORADEU"
},
{
"command": "ls undefined",
"code": 2,
"stderr": "ls: cannot access 'undefined': No such file or directory",
"cwd": "/home/AURORADEU"
}
]
2.10.2 is a prerelease and not production ready. I am looking into a fix but it could be a few days.
@SanjulaGanepola are you able to share the entire output log?
The full log: output.txt
@SanjulaGanepola any way you can provide steps to recreate this at all?
Test PR started -> #2068
@sebjulliand I think a PR you just worked on recently solved this?
@sebjulliand I think a PR you just worked on recently solved this?
That's worth a new try at least 😅
@sebjulliand Just had a try and looks like I can still reproduce the same issues as before. Note that there is some overlap between this issue and https://github.com/codefori/vscode-ibmi/issues/2088.
QCCSID 37 + User Profile CCSID 273
- Variant characters in quoted object names are broken
- Variant characters in object/member descriptions are broken
QCCSID 65535 + User Profile CCSID 273
- Variant characters in quoted object names are broken
- Variant characters in object/member descriptions are not broken
Expected Result
@SanjulaGanepola Does https://github.com/codefori/vscode-ibmi/pull/2068 still solve this issue?
It appears to have fixed the object and member descriptions, but not the quoted object name. I did notice that quoted library names are fine, but expanding it does not show any source physicals, but this may be related to issues with supporting double quotes (https://github.com/codefori/vscode-ibmi/pull/2068#issuecomment-2144457725)
We believe to have solved this issue. You can switch to the pre-release to try the fix.