Unicode码转中文
具体代码(将原本的Unicode码的结果转成中文)
String str=en;
Pattern pattern = Pattern.compile("(\\\\u(\\w{4}))");
Matcher matcher = pattern.matcher(str);
while (matcher.find()) {
String unicodeFull = matcher.group(1);
String unicodeNum = matcher.group(2);
char singleChar = (char) Integer.parseInt(unicodeNum, 16);
str = str.replace(unicodeFull, singleChar + "");
}
System.out.println("str: "+str);