Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenSSH: Dev

How to encode Non-English directories and filenames

 

 

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded


pulkitsinghal at gmail

Feb 19, 2009, 12:12 PM

Post #1 of 2 (1017 views)
Permalink
How to encode Non-English directories and filenames

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!
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


vinschen at redhat

Feb 20, 2009, 1:31 AM

Post #2 of 2 (966 views)
Permalink
Re: How to encode Non-English directories and filenames [In reply to]

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
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.