设置默认的Java字符编码?
-Dfile.encoding=whatever
System.setProperty("file.encoding", "UTF-8"); System.setProperty("file.encoding", "UTF-8");
byte inbytes[] = new byte[1024];
FileInputStream fis = new FileInputStream("response.txt");
fis.read(inbytes);
FileOutputStream fos = new FileOutputStream("response-2.txt");
String in = new String(inbytes, "UTF8");
fos.write(in.getBytes());ITMISS
扬帆大鱼
相关分类