pps.put("file.encoding","ISO-8859-1");
String str=new String("周".getBytes());
System.out.print(str.length());
System.out.println(str);
byte[] b=str.getBytes("GBK");
String strGBK=new String(b);
System.out.println(strGBK);输出如下:
1周
周
就是说pps.put("file.encoding","ISO-8859-1");这个设置没起作用。
String str=new String("周".getBytes());
System.out.print(str.length());
System.out.println(str);
byte[] b=str.getBytes("GBK");
String strGBK=new String(b);
System.out.println(strGBK);输出如下:
1周
周
就是说pps.put("file.encoding","ISO-8859-1");这个设置没起作用。
你所要达到的效果,应该是javac 的时候指定enconding
JF