That was one of the things I couldn't figure out for
all of the different encodings how this could be
resolved.

One thing that your proposed addition of the
setCommand I am guessing is a method that would set
the command without performing the getBytes call which
was converting my command to a non-unicode set of
bytes.  So in order to send the utf-8 command I would
(in my SSHExec app) convert the string into an array
of bytes using the "UTF8" modifier, and then set the
command using that method call you are going to add,
correct?

If so I can see that working around my issue.

--- Atsuhiko Yamanaka <[EMAIL PROTECTED]> wrote:

> Hi,
> 
>    +-From: Bubba Meetze <[EMAIL PROTECTED]> ------
>    |_Date: Sun, 2 Mar 2008 17:10:04 -0800 (PST) __
>    |
>    |If a user places unicode/utf-8 characters into
> the
>    |command the line:
>    |buf.putString(command.getBytes());
>    |converts them to non-unicode by doing a
>    |command.getBytes() call.
> 
> It is not a bug.
> 
> According to RFC4254[1], any encoding for 'command'
> string
> has not been defined.
> 
>    ...
>    |In my brief test when I changed line 54 of
>    |RequestExec.java from:
>    |buf.putString(command.getBytes());
>    |to
>    |buf.putString(command.getBytes("UTF8"));
> 
> It may make you to be happy, but not others.
> 
> For example, I'm using the locale 'ja_JP.eucJP' on
> the GNU/Linux
> and my colleagues have been using 'ja_JP.SJIS'
> there.
> The 'ja_JP.SJIS' is compatible with MS932/CP932,
> which has been
> widely used in Japan and my colleagues will not have
> such problem
> on the current code.
> 
> Anyway, I'll add the following method for your
> requirements,
> 
>    ChannelExec#setCommand(byte[] command)
> 
> 
> [1] http://www.ietf.org/rfc/rfc4254.txt
> 
> 
> Sincerely,
> --
> Atsuhiko Yamanaka
> JCraft,Inc.
> 1-14-20 HONCHO AOBA-KU,
> SENDAI, MIYAGI 980-0014 Japan.
> Tel +81-22-723-2150
>     +1-415-578-3454
> Fax +81-22-224-8773
> Skype callto://jcraft/
> 



      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to