StringBuffer hexcontent= new StringBuffer();
String content="查询";
for(int i=0;i<content.length();i++){
char tmp=content.charAt(i);
hexcontent.append("\\u"+Integer.toHexString((int)tmp)) ;
}
System.out.println(hexcontent);
String content="查询";
for(int i=0;i<content.length();i++){
char tmp=content.charAt(i);
hexcontent.append("\\u"+Integer.toHexString((int)tmp)) ;
}
System.out.println(hexcontent);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货