Java Unicode Create toUnicode(String str)

Here you can find the source of toUnicode(String str)

Description

to Unicode

License

LGPL

Declaration

public static String toUnicode(String str) 

Method Source Code

//package com.java2s;
/**/*from   ww  w  .  j av a 2  s.  c  om*/
 * Converts a line of text into an array of lower case words using a
 * BreakIterator.wordInstance(). <p>
 *
 * This method is under the Jive Open Source Software License and was
 * written by Mark Imbriaco.
 *
 * @param text a String of text to convert into an array of words
 * @return text broken up into an array of words.
 */

public class Main {

    public static String toUnicode(String str) {
        try {
            return new String(str.getBytes("ISO8859_1"), "GB2312");
        } catch (Exception e) {
            return str;
        }
    }
}

Related

  1. toUnicode(String input)
  2. toUnicode(String input)
  3. toUnicode(String original)
  4. toUnicode(String s)
  5. toUnicode(String source)
  6. toUnicode(String str)
  7. toUnicode(String str)
  8. toUnicode(String str)
  9. toUnicode(String string)