commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Millet Regis" <MilletRe...@JohnDeere.com>
Subject Commons.net.ftp.FTPClient.listFiles() and filenames with 'é'
Date Fri, 02 Feb 2007 13:56:03 GMT
Hello!
I have a problem with the file with accents

I have one named "blé.txt", but in the filenames list, it is renamed in "bl?.txt"  (i cannot
copy-paste the correct symbol, so i put a ? Instead)
 

Here is my source code, where oFTPClient is a FTPClientInstance, connected to my FTP repository


        HashSet oHashSet_Reponse = new HashSet();
        FTPFile[] oFTPFiles = oFTPClient.listFiles();
        for (int i =0;i<oFTPFiles.length;i++) {
          if (oFTPFiles[i].isFile()) {
            oHashSet_Reponse.add(oFTPFiles[i].getName());
          }
        }
        return oHashSet_Reponse;


Could anyone help me to find how to make the filename good?
I think it's a character encoding problem. My JRE runs under UTF-8.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message