The 
   looks like this:   
 
 
 
 
Package test.com.gjob.services;
   Import java.util.Properties; 
      public class Test {public static void main (string[] args) {String s = "Introduction"; 
  String TT = gbencoding (s);
      String tt1 = "Hello, I want to tell you one thing"; 
  System.out.println (Decodeunicode ("\\U7B80\\U4ECB")); 
      System.out.println (Decodeunicode (TT1));
      System.out.println (Htmldecoder.decode ("China"));
      String S1 = "\U7B80\U4ECB";
     System.out.println (S.indexof ("\")); 
        public static string gbencoding (final String gbstring) {char[] utfbytes = Gbstring.tochararray (); 
        String unicodebytes = ""; for (int byteindex = 0; Byteindex < utfbytes.length; byteindex++) {String Hexb = integer.tohexstring (utfby 
            Tes[byteindex]); 
           if (Hexb.length () <= 2) {Hexb = "+" + Hexb; 
          } unicodebytes = unicodebytes + "\\u" + Hexb; 
 } System.out.println ("Unicodebytes is:" + unicodebytes);         return unicodebytes; 
         public static string Decodeunicode (final String datastr) {int start = 0; 
         int end = 0; 
         Final StringBuffer buffer = new StringBuffer (); 
           while (Start > 1) {end = Datastr.indexof ("\\u", start + 2); 
           String charstr = ""; 
           if (end = = 1) {charstr = datastr.substring (start + 2, datastr.length ()); 
           else {charstr = datastr.substring (start + 2, end); } Char letter = (char) integer.parseint (CHARSTR, 16); 
          16 binary parse shaping string. 
          Buffer.append (new Character (letter). ToString ()); 
         start = end; 
       return buffer.tostring (); } 
     } 
  
 
 
public static string Decodeunicode (String thestring) {char achar;  
 
   int len = Thestring.length ();  
 
   StringBuffer outbuffer = new StringBuffer (len); for (int x = 0; x < len;)  
 
   {Achar = Thestring.charat (x + +);  
 
    if (Achar = = ' \ ") {Achar = Thestring.charat (x + +);  
 
    if (Achar = = ' U ') {//Read the xxxx int value = 0;  
 
     for (int i = 0; i < 4; i++) {Achar = Thestring.charat (x + +); Switch (achar) {case ' 0 ': Case ' 1 ': Case ' 2 ': Case ' 3 ': Case ' 4 ': CA Se ' 5 ': Case ' 6 ': Case ' 7 ': Case ' 8 ': Case ' 9 ': value = (value << 4) + ACha  
      R-' 0 ';  
      Break  Case ' A ': Case ' B ': Case ' C ': Case ' d ': Case ' e ': Case ' f ': value = (value  
      << 4) + + Achar-' a ';  
      Break  
    Case ' A ': Case ' B ': Case ' C ': Case ' D ':  Case ' E ': Case ' F ': value = (value << 4) + + Achar-' A ';  
      Break  
      Default:throw New IllegalArgumentException ("Malformed \\UXXXX encoding.");  
     } outbuffer.append ((char) value);  
     else {if (Achar = = ' t ') Achar = ' t ';  
 
     else if (Achar = = ' r ') Achar = ' \ r ';  
 
     else if (Achar = = ' n ') Achar = ' \ n ';  
 
     else if (Achar = = ' F ') Achar = ' \f ';  
 
     Outbuffer.append (Achar);  
 
    } else Outbuffer.append (Achar);  
 
   return outbuffer.tostring (); } 
  
 Above this Java Unicode and Chinese conversion of the simple implementation is small series to share all the content, hope to give you a reference, but also hope that we support cloud habitat community.