commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CARROLLE Mathieu <mathieu.carro...@petalslink.com>
Subject Fwd: Store file with arabic filename
Date Tue, 23 Feb 2010 16:59:01 GMT
Hi,
I am sending file with arabic filename on ftp server and it doesn't
work. Arabic character are replace by ?. I am using the storeFile method.
Here my code snippet :

  	String filename = null;

         filename = "س.xml";//Unicode value: \u0633

         File file = new File(filename);

         InputStream in = null;

         try {

             in = new FileInputStream(file);

             if (in != null) {

                 FTPClient client = new FTPClient();

                 client.connect("####");

                 client.login("####", "#####");

                 client.setControlEncoding("UTF-8");

                 client.storeFile(filename, in);

                 in.close();

             }

         } catch (Exception e) {

             e.printStackTrace();

         }


Can anybody help me ?

Thanks.

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


Mime
View raw message