Java GB to Unicode GBToUnicode(String l_S_Source)

Here you can find the source of GBToUnicode(String l_S_Source)

Description

GB To Unicode

License

LGPL

Declaration

public static String GBToUnicode(String l_S_Source) throws UnsupportedEncodingException 

Method Source Code

//package com.java2s;
/**//from  w w w . jav a2  s  .  co m
 *
 * Methods Descrip: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.
 *
 */

import java.io.UnsupportedEncodingException;

public class Main {

    public static String GBToUnicode(String l_S_Source) throws UnsupportedEncodingException {
        String l_S_Desc = "";
        if (l_S_Source != null && !l_S_Source.trim().equals("")) {
            byte l_b_Proc[] = l_S_Source.getBytes("ISO8859_1");
            l_S_Desc = new String(l_b_Proc, "GBK");
        }
        return l_S_Desc;
    }
}

Related

  1. gbToUtf8(String str)