java字符串乱码判断
public static boolean errCodes(String str){ return !(java.nio.charset.Charset.forName("GBK").newEncoder().canEncode(str)); }
//扩展判断是否为中文
public static boolean checkChinese(char ch){ return String.valueOf(ch).matches("[\u4e00-\u9fa5]"); }