-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Charset support #277
Comments
Do you have an example, and a more specific place on where this is happening? File copies, shell, exec's... |
It applies to exec's, shell-operations and file copies. For example:
|
Can you write a (unit) test to easily simulate this behaviour? I'd be more than happy to fix this. |
When creating the file with sshj, the UTF-8 filename is remotely decoded with the local charset resulting in an odd filename. To reproduce the behaviour, you need to create a file like "TestFileÄÖÜ.txt" using PuTTY, WinSCP or create it directly on that machine so the filename is encoded with the local charset. (In my case it was actually ISO 8859-15 instead of ISO 8859-1 btw.) As far as i can tell, any test needs to rely on those "native" files created directly or using some tool. Please tell me if i missed something so i can take care of some tests. Maybe i'll manage to fix this but unfortunately i won't be able to run tests until the end of the month. |
I'm currently working on a fix. At some points the RFCs don't specify which charset to use for a string. Some of them will/could use the remote charset, some of them probably won't. That should be up to the ssh server implementation. I'll be only able to test this with the (fixed) charset of the machines i'm currently connecting to. So there will be some testing left. |
Great looking forward to any fix :)
2017-01-19 16:20 GMT+01:00 ISQ-GTT <[email protected]>:
… I'm currently working on a fix.
At some points the RFCs don't specify which charset to use for a string.
Some of them will/could use the remote charset, some of them probably
won't. That should be up to the ssh server implementation.
I'll be only able to test this with the (fixed) charset of the machines
i'm currently connecting to. So there will be some testing left.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#277 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHLo4L6crUDRoacqx-yS8rdD_itm4t3ks5rT39WgaJpZM4Keeat>
.
|
Fixed with #305 |
We would like to use sshj to communicate with various machines which are configured to use ISO 8859-1.
When using sshj, received byte streams which are encoded in ISO 8859-1 get decoded using UTF-8 by default resulting in encoding problems with Umlaute and such.
There's no possibiliy for us to change the encoding on server-side or extend sshj-code to support that charset.
All encoding problems seem to break down to the net.schmizz.sshj.common.Buffer classes readString()- and putString()-methods where UTF-8 is used hard-coded.
It would be great to support arbitrary charsets like other SSH-frameworks (e.g. jsch) or SSH-tools (e.g. PuTTY).
The text was updated successfully, but these errors were encountered: