String str="中国人"; System.out.println(str); byte[] b=str.getBytes("GBK"); System.out.println("GBK Integer.toHexString(t & 0xF).toUpperCase()) .append(" "); } System.out.println(sb.toString()); } 输出结果: 中国人 GBK jdk 1.6/1.7 如果使用 jdk 1.6 和 1.7 来运行用例,结论不同了,最终是8个字节: 中国人 GBK-8 字节码长度:6 D6 D0 B9 FA C8 CB ****** EF BF