Here you can find the source of toBig5(String s)
Parameter | Description |
---|---|
s | The Target string |
public static String toBig5(String s) throws Exception
//package com.java2s; //License from project: Open Source License public class Main { /**/* ww w .jav a 2 s. c om*/ * Encode the string to Big5 * * @param s * The Target string * @return The string after encode. */ public static String toBig5(String s) throws Exception { if (s != null && s.length() > 0) { byte[] byteTmp = s.getBytes("BIG5"); s = new String(byteTmp, "GBK"); } return s; } }