【Java】编码转换:UTF-8转GB2312



【Java】编码转换:UTF-8转GB2312

String gStr= new String(uStr.getBytes("UTF-8"), "GB2312");

//uStr:待转换的utf-8编码的字符串

//gStr:转换后的gb2312字符串

你可能感兴趣的:(【Java】编码转换:UTF-8转GB2312)