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