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

例如:
String s1 = “你好”;
String s2 = new String(s1.getBytes(“GB2312”), “ISO-8859-1”);

猜你喜欢

转载自blog.csdn.net/qq_43059863/article/details/88582995
今日推荐