Java examples for java.lang:String Unicode
unicode to String
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { String uniStr = "java2s.com"; System.out.println(unicode2String(uniStr)); }/* ww w. j a v a2s . co m*/ public static String unicode2String(String uniStr) { StringBuilder sb = new StringBuilder(); String[] hex = uniStr.split("\\\\u"); int len = hex.length; for (int i = 0; i < len; i++) { int data = Integer.parseInt(hex[i], 16); sb.append((char) data); } return sb.toString(); } }