怎样将GB2312编码的字符串转换为ISO-8859-1编码的字符串?

String s1 = "你好";
String s2 = new String(s1.getBytes("GB2312"), "ISO-8859-1");

 

posted @ 2016-12-08 17:39  那一年的我们  阅读(1998)  评论(0)    收藏  举报