`
空心菜
  • 浏览: 7141 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

转换汉字编码

 
阅读更多
因为用到所以就写了个加密的方法
如您发现有任何错误请Mailto我,
useroot@hotmail.com




/**
* 转换汉字编码
* @param strs
* @return
*/
public static String changeEncode(String strs) {
String temp;
try {
temp = new String(strs.getBytes("ISO8859-1"), "GBK");
} catch (Exception e) {
temp = "";
}
return temp;
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics