Here you can find the source of isContainChinese(String str)
public static Boolean isContainChinese(String str)
public class Main { public static Boolean isContainChinese(String str) { Boolean isChinese = false; String chinese = "[\u0391-\uFFE5]"; if (!isEmpty(str)) { //from w w w .j a va 2s.com for (int i = 0; i < str.length(); i++) { String temp = str.substring(i, i + 1); if (temp.matches(chinese)) { isChinese = true; } else { } } } return isChinese; } public static boolean isEmpty(String str) { return str == null || str.trim().length() == 0; } }