For GB2312, the first characterization bit is from 0 × 81 to 0 × Fe, the tail character, respectively, 0 × 40 to 0 × Fe
Public Boolean ISGB2312 (String Str) {char [] Chars = str.tochararray (); boolean ISGB2312 = false; for (int i = 0; i = 0x81 && INTS [0] <= 0xFE && INTS [1]> = 0x40 && INTS [1] <= 0xfe) {ISGB2312 = true; Break;}}} returni ISGB2312 }