public String cnConverUnicode(String str){
StringBuilder result= new StringBuilder();
for (int i = 0; i < str.length(); i++){
int chr1 = (char) str.charAt(i);
if(chr1>=19968&&chr1<=171941){//漢字範圍 \u4e00-\u9fa5 (中文)
sb.append("\\u" + Integer.toHexString(chr1));
}else{
sb.append(str.charAt(i));
}
}
return result.toString();
} app