For GB2312, the first-character code bits range from 0 × 81 to 0 × Fe, the tailmatal code bits are 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;}}} Return ISGB2312;