Hi Atsuhiko,

Thanks for the answer. 

We have following scenario. We are not setting the file encoding for
ChannelSFTP. 

Case 1. Running the application with  VM (file.encoding not set) - Default
system encoding (GBK) -- Working fine 

-- with this uploaded the one file having the Chinese char is successful. 


Case 1. Running the application with VM (file.encoding=UTF-8)  - VM encoding
(UTF-8) --  the same file which is uploaded cannot be download by VM
encoding as UTF-8. 

We are unable to get the root cause. 

But I feel the may be the file name which is provided to the get method is
getting corrupted. 

How to know whether sshd server is running with which encoding ?

Kindly confirm.


Regards,
Piyush

****************************************************************************
***********
This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!

-----Original Message-----
From: Atsuhiko Yamanaka [mailto:[email protected]] 
Sent: Friday, December 10, 2010 9:00 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [JSch-users] Unable to transfer chinese name files from SFTP
transfer (using JSCH.jar 1.44)

Hi,

   +-From: piyush <[email protected]> ------
   |_Date: Wed, 08 Dec 2010 19:54:23 +0530 __
   |
   |As we provide it as utility where our server can run with GBK or UTF-8
   |encoding. Whether setting the encoding like setFilenameEncoding("GBK"), 
   |will not impact in case if the sftp server is running with different 
   |encoding.

If sftpd does not run with UTF-8 encoding, jsch will not work correctly.

   |Why it is able to work with one but not with other machine? 

I guess that other machine must run with other encoding.


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
Skype callto://jcraft/
Twitter: http://twitter.com/ymnk


------------------------------------------------------------------------------
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to