commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Millet Regis" <MilletRe...@JohnDeere.com>
Subject RE: Commons.net.ftp.FTPClient.listFiles() and file names with 'é'
Date Fri, 02 Feb 2007 14:06:49 GMT
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:rwinston@eircom.net] 
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: 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