public class copyFIle {
public static void main(String[] args) throws UnsupportedEncodingException {
String str="中国人民";
//编码
byte data[]=str.getBytes("gbk");
//解码
System.out.println(new String(data,"gbk"));
}
}
public class copyFIle {
public static void main(String[] args) throws UnsupportedEncodingException {
String str="中国人民";
//编码
byte data[]=str.getBytes("gbk");
//解码
System.out.println(new String(data,"gbk"));
}
}
转载于:https://my.oschina.net/u/2511906/blog/3054132