ChannelExec.setCommand(String cmd) always sends the command in the local
(client) default encoding. Which is not correct e.g. when working on a
remote
Linux host with UTF-8 encoding.
 
For ChannelSftp, this has been fixed by allowing the client to specify
the encoding.
Same should be possible in ChannelExec (leveraging Util.str2bytes and
Util.bytes2str
utility methods).
 
I would suggest adding
   ChannelExec#setCommand(byte[] cmd)
in order to allow the user specify the command in "raw" form; or, adding
   ChannelExec#setEncoding(String encoding)
in order to allow the user specify the encoding in which the command
should be sent
 
 
Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm
 
 
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to