Co:Z v3.6.1 SFTP codepage translation

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
josc002
Posts: 1
Joined: Wed Oct 30, 2019 8:57 am

Co:Z v3.6.1 SFTP codepage translation

Post by josc002 »

Hi
Question about codepage translation options and where the actual translation takes place.

We have an issue when translating from IBM-1047 -> IBM-1143 (swe euro) during a Co:z file transfer.
From the Co:Z SFTP client, we supply the options:
lzopts mode=text,clientcp=IBM-1047,servercp=IBM-1143.

When the file has been transferred to Co:Z SFTP server, hex value X'9F' becomes X'3F'.
This is wrong. X'9F' should have been translated to X'5A'.

If we locally test the translation table IBM-1047 -> IBM-1143 with the ICONV USS utility,
we get the expected translation X'9f' -> X'5A'' .

If we locally test the translation table IBM-1047 -> IBM-1143 with the Co:z utility showtrtab -LTranslator=D -s IBM-1047 -t IBM-1143
we get the expected translation X'9f' -> X'5A'' .

Now, If we return to the Co:Z client options and change the translation options
from: lzopts mode=text,clientcp=IBM-1047,servercp=IBM-1143
to: zopts mode=text,clientcp=IBM-1047,servercp=IBM-1143
we get the expected translation X'9f' -> X'5A'


The manual is somewhat unclear how and when these options come in effect during a file transfer.

Could you please clarify when and where the actual character translation is being done depending on if lzopts or zopts is used.
By the SFTP client, before the actual transfer ?
or by the SFTP server ?

Best regards
Johan
Post Reply