Java编码
将GB2312编码的字符串转换为ISO-8859-1编码的字符串
public class Test { public static void main(String[] args) { System.out.println(); String s1 = "你好"; try { String s2 = new String(s1.getBytes("GB2312"), "ISO-8859-1"); System.out.println(s2); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } }