I have to upload a file to an FTP server. The filename contains special letters, say äöü
. On the FTP server, I need the filename to be UTF-8 encoded.
My cod
Since Apache Commons NET 3.0 one can use ftpClient.setAutodetectUTF8( true );
to enable autodetection of UTF-8 support on the FTP server. Like setControlEncoding
it must be called before connection.
See the corresponding javadoc.
I have not tested it, but you can try this:
client.setControlEncoding("UTF-8");