Hello All, I have a custom client which successfully connects to the SSH server both on cygwin/OpenSSH-server running on windows and to standard SSH servers runnign on Linux. If I send a command like the following in bytes: ===mkdir <Shift_JIS_characters> ===after having encoded the whole command in bytes with Shift_JIS, to a linux SSH server ... it works. BUT if I send a similar command to a cygwin/SSH-server on windows, it fails. It seems like the OpenSSH implementation does not honor the default system encoding specified by the windows operating system for non-Unicode programs. 1) Can someone please hint at what kind of encoding the OpenSSH server would prefer to get its data or decipher user commands in? I hope you say something like UTF-8 or a similar superset. 2) Can you also maybe recommend how to escape my characters, if that's the way to go? Right now if I browse to an existing directory (from the server machine itself using cygwin and NOT my client) with <Shift_JIS_characters> I can see that it likes to escape in this manner: cd \220V\202\265\202\242\203t\203H\203\213\203_/ I just don't know what kind of escape-sequence notation this is ... it seems to resemble Unicode escapes but not exactly. Looking forward to your input .... Thanks!
Corinna Vinschen
2009-Feb-20 09:31 UTC
How to encode Non-English directories and filenames
On Feb 19 12:12, Pulkit Singhal wrote:> Hello All, > > I have a custom client which successfully connects to the SSH server > both on cygwin/OpenSSH-server running on windows and to standard SSH > servers runnign on Linux. > > If I send a command like the following in bytes: > ===> mkdir <Shift_JIS_characters> > ===> after having encoded the whole command in bytes with Shift_JIS, to a > linux SSH server ... it works. > > BUT if I send a similar command to a cygwin/SSH-server on windows, it fails. > > It seems like the OpenSSH implementation does not honor the default > system encoding specified by the windows operating system for > non-Unicode programs.You can try running the sshd service with the environment variable CYGWIN set to "codepage:oem" plus setting LC_CTYPE to "C-JIS". Native language support in Cygwin exists only marginally, especially since the underlying newlib C library is lacking in this area quite a bit. I'm working on that, but it will take time. Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat