From: Hall, Charles Don <hallc3@to...> - 2007-05-11 19:49:19
Has anyone else ever tried using Jsch SFTP on an IBM390 or other EBCDIC
I'm sort-of able to get it to work by forcing everything into ASCII mode at
run-time. (-Dfile.encoding=UTF8 option), and then setting logging back into
EBCDIC via "out = new OutputStreamWriter(System.out, "8859_1");". There are
a couple of drawbacks...I'm doing key-based authentication, so the key file
needs to have ASCII data. And transfers are all done in binary mode; there's
no way to do automatic ASCII/EBCDIC conversion on text files.
I'm debating going into the sources and adding the character set info, but
I'm not sure how easy this would be. At first glance, it seems like it's
just a matter of changing all the FileInputStream/FileOutputStream objects
into charset-aware InputStreamReader/OutputStreamWriter objects. TCP sockets
would always be ASCII, config files would always be EBCDIC, and files being
transferred could use the appropriate charset for ascii-vs-binary transfers.
Has anyone else done anything like this? I don't want to reinvent the
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to EmailAdmin@...
Toys "R" Us, Inc.