boolean isGBK(String s) throws UnsupportedEncodingException { if(s.equals(new String(s.getBytes("gbk")))) return true; else return false; }