List of utility methods to do GBK String Convert
String | gbk2iso(String s) gbkiso return convertCode(s, "GBK", "ISO8859_1"); |
String | gbk2Iso(String str) gbk Iso return new String(str.getBytes("GBK"), "iso-8859-1"); |
String | gbk2Utf8(String str) gbk Utf try { return new String(str.getBytes("GBK"), "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return str; |
int | getGBKByteLength(String data) get GBK Byte Length if (data == null) { return 0; try { return data.getBytes("GBK").length; } catch (UnsupportedEncodingException e) { return data.getBytes().length; |