try {
String SB=null;
StringBuffer sb=new StringBuffer();
String zifuchu="小王";
byte[] bytes=zifuchu.getBytes("GB2312");
for(byte b : bytes){
SB=new String(Integer.toHexString(b)).substring(6, 8);
sb.append(SB);
}
System.out.print(sb.toString());
} catch (Exception e) {
e.printStackTrace();
}