Java Utililty Methods Chinese Check

List of utility methods to do Chinese Check

Description

The list of methods to do Chinese Check are organized into topic(s).

Method

booleancheckCharIsChiness(char c)
check Char Is Chiness
return String.valueOf(c).getBytes().length == 2 ? true : false;
booleanisChina(String str)
is China
return str.matches("[\\u4E00-\\u9FA5]+");
booleanisChinaLanguage(char[] chars)
is China Language
int[] ints = new int[2];
boolean isChinese = false;
int length = chars.length;
byte[] bytes = null;
for (int i = 0; i < length; i++) {
    bytes = ("" + chars[i]).getBytes();
    if (bytes.length == 2) {
        ints[0] = bytes[0] & 0xff;
...
booleanisChinaLanguage(String str)
is China Language
char[] chars = str.toCharArray();
int[] ints = new int[2];
boolean isChinese = false;
int length = chars.length;
byte[] bytes = null;
for (int i = 0; i < length; i++) {
    bytes = ("" + chars[i]).getBytes();
    if (bytes.length == 2) {
...
booleanisChinaOrEnName(String str)
is China Or En Name
if (!Strings.isNullOrEmpty(str)) {
    if (str.matches(ENGLISHNAME)) {
        return true;
    if (str.matches(ALLCHINESE)) {
        return true;
return false;
booleanisChineseChar(char c)
is Chinese Char
return String.valueOf(c).getBytes("GBK").length > 1;