Java Chinese to String toChineseOfGBK(String str)

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

Description

to Chinese Of GBK

License

Apache License

Declaration

public static String toChineseOfGBK(String str) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.UnsupportedEncodingException;

public class Main {

    public static String toChineseOfGBK(String str) {
        try {/*w  w w .  j  a va2  s .  com*/
            return new String(str.getBytes("ISO-8859-1"), "GBK");
        } catch (UnsupportedEncodingException localUnsupportedEncodingException) {
        }
        return str;
    }
}

Related

  1. GB2ISO(String text)
  2. GBKToUTF(String str)