System.out.println(new String(myFileName.getBytes("gbk")));
System.out.println(new String(myFileName.getBytes("utf-8"),"gbk"));
System.out.println(new String(myFileName.getBytes("iso-8859-1"),"gbk"));
System.out.println(new String(myFileName.getBytes("gb2312"), "gbk"));
System.out.println(new String(myFileName.getBytes("utf-8")));
System.out.println(new String(myFileName.getBytes("gbk"),"utf-8"));
System.out.println(new String(myFileName.getBytes("iso-8859-1"),"utf-8"));
System.out.println(new String(myFileName.getBytes("gb2312"), "utf-8"));
System.out.println(new String(myFileName.getBytes("iso-8859-1")));
System.out.println(new String(myFileName.getBytes("gbk"),"iso-8859-1"));
System.out.println(new String(myFileName.getBytes("utf-8"),"iso-8859-1"));
System.out.println(new String(myFileName.getBytes("gb2312"), "iso-8859-1"));
System.out.println(new String(myFileName.getBytes("gb2312")));
System.out.println(new String(myFileName.getBytes("gbk"),"gb2312"));
System.out.println(new String(myFileName.getBytes("utf-8"),"gb2312"));
System.out.println(new String(myFileName.getBytes("iso-8859-1"), "gb2312"));
转自:http://m.blog.csdn.net/xwawa2012/article/details/39579627
网友评论