commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Melvin DeSilva" <mel...@hiteksoftware.com>
Subject [NET] FTP of filenames with chinese, greek characters etc..
Date Fri, 12 May 2006 16:58:15 GMT
Hi,

I am trying to transfer files which have greek or chinese characters in the 
filenames.
Filename1 = ΞΠΦ
Filename2 = 试验

I am using GET from an unix ftp server to windows client.

1) If I do not setContentEncoding(), the files get transferred with 
incorrect filenames.
filenames = ΞΠΦ   and     试验

2) If I setContentEncoding("UTF-8"), the filenames get transferred 
correctly, but the files are empty.

This is my code:
ftp.setContentEncoding("UTF-8");
OutputStream output = new FileOutputStream(localPath);
InputStream input = ftp.retrieveFileStream(remotePath);
transferred = Util.copyStream(input, output);


Thanks in advance

Sincerely,
Melvin Desilva 



---------------------------------------------------------------------
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