我使用URL类来访问FTP服务器,当地址中没有中文时没有问题,但是 当ftp中的文件夹有中文时,就无法访问了,我试过encoder和decoder类,都不行,有什么解决方法么? URL now = new URL("ftp://202.204.208.124/软件/"); BufferedReader in = new BufferedReader(new InputStreamReader(now.openStream(),"gb2312")); String tem; String Content = new String(); while ((tem = in.readLine()) != null) { Content = Content + tem; } System.out.println(Content);
都不懂吗?
用什么编码也不行?