List of utility methods to do GB to Unicode
String | GBToUnicode(String l_S_Source) GB To Unicode 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; |
String | gbToUtf8(String str) gb To Utf StringBuffer sb = new StringBuffer(); for (int i = 0; i < str.length(); i++) { String s = str.substring(i, i + 1); if (s.charAt(0) > 0x80) { byte[] bytes = s.getBytes("Unicode"); String binaryStr = ""; for (int j = 2; j < bytes.length; j += 2) { String hexStr = getHexString(bytes[j + 1]); ... |