1
我有Unicode的問題,當我保存在SD卡上的阿拉伯文名稱的文件,所有的東西都會很好,但是當文件通過commons-net上傳到FTP服務器時,我會得到文件名如PICUTF-8與apache commons-net
任何解決辦法嗎?
這是代號的一部分與FTPClient相關:
FTPClient ftpClient = new FTPClient();
try {
FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_NT);
conf.setServerLanguageCode("ar");
ftpClient.configure(conf);
ftpClient.setControlEncoding("UTF-8");
ftpClient.setAutodetectUTF8(true);
ftpClient.connect(server, port);
ftpClient.login(user, pass);
ftpClient.enterLocalPassiveMode();
ftpClient.setFileType(FTP.BINARY_FILE_TYPE);