Java Unicode to String unicode2String(String unicodeStr)

Here you can find the source of unicode2String(String unicodeStr)

Description

unicode String

License

Open Source License

Declaration

public static String unicode2String(String unicodeStr) 

Method Source Code

//package com.java2s;

public class Main {

    public static String unicode2String(String unicodeStr) {
        StringBuffer sb = new StringBuffer();
        String[] str = unicodeStr.toUpperCase().split("\\\\U");
        for (int i = 0; i < str.length; ++i)
            if (!str[i].equals("")) {
                char c = (char) Integer.parseInt(str[i].trim(), 16);
                sb.append(c);/*from  www  .j a  va  2  s . com*/
            }
        return sb.toString();
    }
}

Related

  1. Unicode2Str(String s)
  2. unicodeStringToPrettyString(String s)
  3. unicodeToAscii(String name, StringBuffer result)
  4. unicodeToAscii(String theString)
  5. unicodeToString(int unicode)