跳到主要内容

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

参考答案:

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