Java ISO to GB String ISO2GB(String text)

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

Description

ISOGB

License

Open Source License

Declaration

public static String ISO2GB(String text) 

Method Source Code


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

public class Main {

    public static String ISO2GB(String text) {
        String result = "";
        try {//from  ww w  .  j  a v a2s .c om
            result = new String(text.getBytes("ISO-8859-1"), "GB2312");
        } catch (UnsupportedEncodingException e) {
            result = e.toString();
        }
        return result;
    }
}

Related

  1. iso2Gb(String gbString)