js判断是否含有GBK以外的字符的函数
发布时间:2016-12-28 来源:查字典编辑
摘要:booleanisGBK(Strings)throwsUnsupportedEncodingException{if(s.equals(ne...
boolean isGBK(String s) throws UnsupportedEncodingException
{
if(s.equals(new String(s.getBytes("gbk"))))
return true;
else
return false;
}