Thank you
But is there a way to know the caracter enconding used?
The files are sent by our clients, so it could be various ones. 

-----Message d'origine-----
De : Rory Winston [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 2 février 2007 15:03
À : Jakarta Commons Users List; commons-user@jakarta.apache.org
Objet : Re: Commons.net.ftp.FTPClient.listFiles() and file names with 'é'

You can set the encoding used by invoking ftpClient.setControlEncoding() with 
the name of the desired encoding you wish to use.

Rory

"Jakarta Commons Users List" <commons-user@jakarta.apache.org> wrote:

> 
> ------_=_NextPart_001_01C746D1.E0ECD0CE
> Content-Type: text/plain;
>       charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
> 
> Hello!
> I have a problem with the file with accents
> 
> I have one named "bl=E9.txt", but in the filenames list, it is renamed 
> = in "bl?.txt"  (i cannot copy-paste the correct symbol, so i put a ? 
> =
> Instead)
> =20
> 
> Here is my source code, where oFTPClient is a FTPClientInstance, = 
> connected to my FTP repository
> 
> 
>         HashSet oHashSet_Reponse =3D new HashSet();
>         FTPFile[] oFTPFiles =3D oFTPClient.listFiles();
>         for (int i =3D0;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.
> 
> ------_=_NextPart_001_01C746D1.E0ECD0CE--
> 



-----------------------------------------------------------------
Find the home of your dreams with eircom net property Sign up for email alerts 
now http://www.eircom.net/propertyalerts



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to