commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Muthukumar Arasu" <tmkuma...@hotmail.com>
Subject [Help] FTP of files with non english file names
Date Thu, 16 Feb 2006 04:36:51 GMT
I was able to narrow down the problem to storeFile and retrieveFile methods 
in FTPClient, where one have to give the remote file name as a String. In my 
case they are Chinese characters (GB18030) which gets garbled up at the 
target machine. How should I pass such characters to these methods. Any help 
would be appreciated.

Thanks
Kumar

>
>I wrote a program to use commons-net to transfer files and it works well 
>for all files with just english characters in it. When I used the program 
>to transfer a file with chinese characters in its name, it puts the file in 
>the target machine but totally creates a garabge file name at the target 
>machine. (For example if I put ~!@123.txt (here ~!@ assume are some chinese 
>characters) then in the server it 1shows up something like ??123.txt. If i 
>programatically retrive the file as get ~!@123.txt, then it is able to 
>retrieve it back.  I think the API translates the characterset into some 
>other characters which it is able to understand on both way file transfers.
>
>If I use the OS command line FTP to get ~!@123.txt then it fails, because 
>the file ??123.txt is only present at the target location.
>
>Could anyone clarify on how to do file transfers using FTPClient with non 
>english character set?
>
>Thanks
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message