@Test public void unicodeToCn() { String origin = "\\u6d4b\\u8bd5\\u75\\u6e\\u69\\u63\\u6f\\u64\\u65\\u8f6c\\u7801"; String result = Coder.unicodeToCn(origin); logger.info("unicodeToCn, origin: [{}], result: [{}]", origin, result); }
public static String unicodeToCn(String unicode) { String[] strArray = unicode.split("\\\\u"); String returnStr = ""; for (int i = 1; i < strArray.length; i++) { returnStr += (char) Integer.valueOf(strArray[i], 16).intValue(); } return returnStr; }
Coder { public static String unicodeToCn(String unicode) { String[] strArray = unicode.split("\\\\u"); String returnStr = ""; for (int i = 1; i < strArray.length; i++) { returnStr += (char) Integer.valueOf(strArray[i], 16).intValue(); } return returnStr; } }
Coder { public static String unicodeToCn(String unicode) { String[] strArray = unicode.split("\\\\u"); String returnStr = ""; for (int i = 1; i < strArray.length; i++) { returnStr += (char) Integer.valueOf(strArray[i], 16).intValue(); } return returnStr; } private  Coder(); }
Coder { public static String unicodeToCn(String unicode) { String[] strArray = unicode.split("\\\\u"); String returnStr = ""; for (int i = 1; i < strArray.length; i++) { returnStr += (char) Integer.valueOf(strArray[i], 16).intValue(); } return returnStr; } private  Coder(); static String checkMd5(String originStr); static String checkMd5(byte[] msg); static String encryptPassWithSlat(String passwordMd5, String key); static String decryptPsWithSlat(String desPassword, String key); static boolean manyMd5PasswordCompare(String originPassword, String predictPassword, int loop); static String encryptHex(byte[] b); static byte[] decryptHex(String s); static String encodeBASE64(byte[] key); static byte[] decodeBASE64(String key); static String encodeMd5StrAndBase64(String origin); static String encodeMd5ByteAndBase64(String origin); static String encodeSHA1(String data); static String encodeSHA1ByDigestUtils(String data); static String encodeSHA256(String data); static String encodeSHA256ByDigestUtils(String data); static String initMacKey(); static byte[] encryptHMAC(byte[] data, String key); static String encryptHmacSha256(String data, String key); static String unicodeToCn(String unicode); static String cnToUnicode(String cn); }
Coder { public static String unicodeToCn(String unicode) { String[] strArray = unicode.split("\\\\u"); String returnStr = ""; for (int i = 1; i < strArray.length; i++) { returnStr += (char) Integer.valueOf(strArray[i], 16).intValue(); } return returnStr; } private  Coder(); static String checkMd5(String originStr); static String checkMd5(byte[] msg); static String encryptPassWithSlat(String passwordMd5, String key); static String decryptPsWithSlat(String desPassword, String key); static boolean manyMd5PasswordCompare(String originPassword, String predictPassword, int loop); static String encryptHex(byte[] b); static byte[] decryptHex(String s); static String encodeBASE64(byte[] key); static byte[] decodeBASE64(String key); static String encodeMd5StrAndBase64(String origin); static String encodeMd5ByteAndBase64(String origin); static String encodeSHA1(String data); static String encodeSHA1ByDigestUtils(String data); static String encodeSHA256(String data); static String encodeSHA256ByDigestUtils(String data); static String initMacKey(); static byte[] encryptHMAC(byte[] data, String key); static String encryptHmacSha256(String data, String key); static String unicodeToCn(String unicode); static String cnToUnicode(String cn);  }