JAVA将Unicode转换成GBK字符集
文章目录
/**
- JAVA将Unicode转换成GBK字符集
*
- @param input 待转换字符串
- @return 转换完成字符串
*/
public static String UnicodeToGB(String input) throws UnsupportedEncodingException {
if (isEmpty(input)) {
return "";
}
else {
String s1;
s1 = new String(input.getBytes("ISO8859_1"), "GBK");
return s1;
}
}
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论