Java Chinese to String GB2ISO(String text)

Here you can find the source of GB2ISO(String text)

Description

GBISO

License

Open Source License

Declaration

public static String GB2ISO(String text) 

Method Source Code


//package com.java2s;
import java.io.UnsupportedEncodingException;

public class Main {

    public static String GB2ISO(String text) {
        String result = "";
        try {// ww  w . j a v a  2  s  .  com
            result = new String(text.getBytes("GB2312"), "ISO-8859-1");
        } catch (UnsupportedEncodingException e) {
            result = e.toString();
        }
        return result;
    }
}

Related

  1. GBKToUTF(String str)
  2. toChineseOfGBK(String str)