/* VISCII 1.1 */
#define LEADING_BYTE_LATIN_VISCII (CHARSET_ID_OFFSET - 3)
-#define LEADING_BYTE_HIRAGANA_JISX0208 (CHARSET_ID_OFFSET - 4)
-#define LEADING_BYTE_KATAKANA_JISX0208 (CHARSET_ID_OFFSET - 5)
+/* MULE VISCII-LOWER (CHARSET_ID_OFFSET_96 + '1') */
+#define LEADING_BYTE_LATIN_VISCII_LOWER (CHARSET_ID_OFFSET - 4)
+
+/* MULE VISCII-UPPER (CHARSET_ID_OFFSET_96 + '2') */
+#define LEADING_BYTE_LATIN_VISCII_UPPER (CHARSET_ID_OFFSET - 5)
+
+/* Big5 Level 1 2/4 2/{(8),9,10,11} 4/0 '0' */
+#define LEADING_BYTE_CHINESE_BIG5_1 (CHARSET_ID_OFFSET - 6)
+
+/* Big5 Level 2 2/4 2/{(8),9,10,11} 4/0 '1' */
+#define LEADING_BYTE_CHINESE_BIG5_2 (CHARSET_ID_OFFSET - 7)
+
+#define LEADING_BYTE_HIRAGANA_JISX0208 (CHARSET_ID_OFFSET - 8)
+#define LEADING_BYTE_KATAKANA_JISX0208 (CHARSET_ID_OFFSET - 9)
#define MIN_LEADING_BYTE_PRIVATE MIN_LEADING_BYTE
-#define MAX_LEADING_BYTE_PRIVATE (CHARSET_ID_OFFSET - 6)
+#define MAX_LEADING_BYTE_PRIVATE (CHARSET_ID_OFFSET - 10)
-#define CHARSET_ID_OFFSET_94 (CHARSET_ID_OFFSET - '0')
+/* #define CHARSET_ID_OFFSET_94 (CHARSET_ID_OFFSET - '0') */
-#define MIN_CHARSET_ID_PRIVATE_94 (CHARSET_ID_OFFSET_94 + '0')
-#define MAX_CHARSET_ID_PRIVATE_94 (CHARSET_ID_OFFSET_94 + '?')
+/* #define MIN_CHARSET_ID_PRIVATE_94 (CHARSET_ID_OFFSET_94 + '0') */
+/* #define MAX_CHARSET_ID_PRIVATE_94 (CHARSET_ID_OFFSET_94 + '?') */
/* ISO 646 IRV */
-#define LEADING_BYTE_ASCII (CHARSET_ID_OFFSET_94 + 'B')
+#define LEADING_BYTE_ASCII 6 /* (CHARSET_ID_OFFSET_94 + 'B') */
/* Right half of JIS X0201-1976 */
-#define LEADING_BYTE_KATAKANA_JISX0201 (CHARSET_ID_OFFSET_94 + 'I')
+#define LEADING_BYTE_KATAKANA_JISX0201 13 /* (CHARSET_ID_OFFSET_94 + 'I') */
/* Left half of JIS X0201-1976 */
-#define LEADING_BYTE_LATIN_JISX0201 (CHARSET_ID_OFFSET_94 + 'J')
-
+#define LEADING_BYTE_LATIN_JISX0201 14 /* (CHARSET_ID_OFFSET_94 + 'J') */
-#define CHARSET_ID_OFFSET_96 (CHARSET_ID_OFFSET_94 + 80)
-#define LEADING_BYTE_LATIN_VISCII_LOWER (CHARSET_ID_OFFSET_96 + '1')
-#define LEADING_BYTE_LATIN_VISCII_UPPER (CHARSET_ID_OFFSET_96 + '2')
+/* #define CHARSET_ID_OFFSET_96 (CHARSET_ID_OFFSET_94 + 80) */
/* Right half of ISO 8859-1 */
-#define LEADING_BYTE_LATIN_ISO8859_1 (CHARSET_ID_OFFSET_96 + 'A')
+#define LEADING_BYTE_LATIN_ISO8859_1 100 /* (CHARSET_ID_OFFSET_96 + 'A') */
/* Right half of ISO 8859-2 */
-#define LEADING_BYTE_LATIN_ISO8859_2 (CHARSET_ID_OFFSET_96 + 'B')
+#define LEADING_BYTE_LATIN_ISO8859_2 101 /* (CHARSET_ID_OFFSET_96 + 'B') */
/* Right half of ISO 8859-3 */
-#define LEADING_BYTE_LATIN_ISO8859_3 (CHARSET_ID_OFFSET_96 + 'C')
+#define LEADING_BYTE_LATIN_ISO8859_3 109 /* (CHARSET_ID_OFFSET_96 + 'C') */
/* Right half of ISO 8859-4 */
-#define LEADING_BYTE_LATIN_ISO8859_4 (CHARSET_ID_OFFSET_96 + 'D')
+#define LEADING_BYTE_LATIN_ISO8859_4 110 /* (CHARSET_ID_OFFSET_96 + 'D') */
/* Right half of ISO 8859-7 */
-#define LEADING_BYTE_GREEK_ISO8859_7 (CHARSET_ID_OFFSET_96 + 'F')
+#define LEADING_BYTE_GREEK_ISO8859_7 126 /* (CHARSET_ID_OFFSET_96 + 'F') */
/* Right half of ISO 8859-6 */
-#define LEADING_BYTE_ARABIC_ISO8859_6 (CHARSET_ID_OFFSET_96 + 'G')
+#define LEADING_BYTE_ARABIC_ISO8859_6 127 /* (CHARSET_ID_OFFSET_96 + 'G') */
/* Right half of ISO 8859-8 */
-#define LEADING_BYTE_HEBREW_ISO8859_8 (CHARSET_ID_OFFSET_96 + 'H')
+#define LEADING_BYTE_HEBREW_ISO8859_8 138 /* (CHARSET_ID_OFFSET_96 + 'H') */
/* Right half of ISO 8859-5 */
-#define LEADING_BYTE_CYRILLIC_ISO8859_5 (CHARSET_ID_OFFSET_96 + 'L')
+#define LEADING_BYTE_CYRILLIC_ISO8859_5 144 /* (CHARSET_ID_OFFSET_96 + 'L') */
/* Right half of ISO 8859-9 */
-#define LEADING_BYTE_LATIN_ISO8859_9 (CHARSET_ID_OFFSET_96 + 'M')
+#define LEADING_BYTE_LATIN_ISO8859_9 148 /* (CHARSET_ID_OFFSET_96 + 'M') */
/* TIS620-2533 */
-#define LEADING_BYTE_THAI_TIS620 (CHARSET_ID_OFFSET_96 + 'T')
-
+#define LEADING_BYTE_THAI_TIS620 166 /* (CHARSET_ID_OFFSET_96 + 'T') */
-#define CHARSET_ID_OFFSET_94x94 (CHARSET_ID_OFFSET_96 + 80)
-/* Big5 Level 1 */
-#define LEADING_BYTE_CHINESE_BIG5_1 ('0' + CHARSET_ID_OFFSET_94x94)
+/* #define CHARSET_ID_OFFSET_94x94 (CHARSET_ID_OFFSET_96 + 80) */
-/* Big5 Level 2 */
-#define LEADING_BYTE_CHINESE_BIG5_2 ('1' + CHARSET_ID_OFFSET_94x94)
-#define MIN_LEADING_BYTE_PRIVATE_2 ('0' + CHARSET_ID_OFFSET_94x94)
-#define MAX_LEADING_BYTE_PRIVATE_2 ('?' + CHARSET_ID_OFFSET_94x94)
+/* #define MIN_LEADING_BYTE_PRIVATE_2 ('0' + CHARSET_ID_OFFSET_94x94) */
+/* #define MAX_LEADING_BYTE_PRIVATE_2 ('?' + CHARSET_ID_OFFSET_94x94) */
-/* Japanese JIS X0208-1978 */
-#define LEADING_BYTE_JAPANESE_JISX0208_1978 \
- ('@' + CHARSET_ID_OFFSET_94x94)
+/* Japanese JIS X0208-1978 2/4 2/{(8),9,10,11} 4/0 (@) */
+#define LEADING_BYTE_JAPANESE_JISX0208_1978 42
-/* Chinese Hanzi GB2312-1980 */
-#define LEADING_BYTE_CHINESE_GB2312 ('A' + CHARSET_ID_OFFSET_94x94)
+/* Chinese Hanzi GB2312-1980 2/4 2/{(8),9,10,11} 4/1 (A) */
+#define LEADING_BYTE_CHINESE_GB2312 58
-/* Japanese JIS X0208-1983 */
-#define LEADING_BYTE_JAPANESE_JISX0208 ('B' + CHARSET_ID_OFFSET_94x94)
+/* Japanese JIS X0208-1983 2/4 2/{(8),9,10,11} 4/2 (B) */
+#define LEADING_BYTE_JAPANESE_JISX0208 87
-/* Hangul KS C5601-1987 */
-#define LEADING_BYTE_KOREAN_KSC5601 ('C' + CHARSET_ID_OFFSET_94x94)
+/* Hangul KS C5601-1987 2/4 2/{8,9,10,11} 4/3 (C) */
+#define LEADING_BYTE_KOREAN_KSC5601 149
-/* Japanese JIS X0212-1990 */
-#define LEADING_BYTE_JAPANESE_JISX0212 ('D' + CHARSET_ID_OFFSET_94x94)
+/* Japanese JIS X0212-1990 2/4 2/{8,9,10,11} 4/4 (D) */
+#define LEADING_BYTE_JAPANESE_JISX0212 159
-/* CCITT Extended GB */
-#define LEADING_BYTE_CHINESE_CCITT_GB ('E' + CHARSET_ID_OFFSET_94x94)
+/* CCITT Extended GB 2/4 2/{8,9,10,11} 4/5 (E) */
+#define LEADING_BYTE_CHINESE_CCITT_GB 165
-/* Chinese CNS11643 Set 1 */
-#define LEADING_BYTE_CHINESE_CNS11643_1 ('G' + CHARSET_ID_OFFSET_94x94)
+/* Chinese CNS11643 Set 1 2/4 2/{8,9,10,11} 4/7 (G) */
+#define LEADING_BYTE_CHINESE_CNS11643_1 171
-/* Chinese CNS11643 Set 2 */
-#define LEADING_BYTE_CHINESE_CNS11643_2 ('H' + CHARSET_ID_OFFSET_94x94)
+/* Chinese CNS11643 Set 2 2/4 2/{8,9,10,11} 4/8 (H) */
+#define LEADING_BYTE_CHINESE_CNS11643_2 172
-/* Chinese CNS11643 Set 3 */
-#define LEADING_BYTE_CHINESE_CNS11643_3 ('I' + CHARSET_ID_OFFSET_94x94)
+/* Chinese CNS11643 Set 3 2/4 2/{8,9,10,11} 4/9 (I) */
+#define LEADING_BYTE_CHINESE_CNS11643_3 183
-/* Chinese CNS11643 Set 4 */
-#define LEADING_BYTE_CHINESE_CNS11643_4 ('J' + CHARSET_ID_OFFSET_94x94)
+/* Chinese CNS11643 Set 4 2/4 2/{8,9,10,11} 4/10 (J) */
+#define LEADING_BYTE_CHINESE_CNS11643_4 184
-/* Chinese CNS11643 Set 5 */
-#define LEADING_BYTE_CHINESE_CNS11643_5 ('K' + CHARSET_ID_OFFSET_94x94)
+/* Chinese CNS11643 Set 5 2/4 2/{8,9,10,11} 4/11 (K) */
+#define LEADING_BYTE_CHINESE_CNS11643_5 185
-/* Chinese CNS11643 Set 6 */
-#define LEADING_BYTE_CHINESE_CNS11643_6 ('L' + CHARSET_ID_OFFSET_94x94)
+/* Chinese CNS11643 Set 6 2/4 2/{8,9,10,11} 4/12 (L) */
+#define LEADING_BYTE_CHINESE_CNS11643_6 186
-/* Chinese CNS11643 Set 7 */
-#define LEADING_BYTE_CHINESE_CNS11643_7 ('M' + CHARSET_ID_OFFSET_94x94)
+/* Chinese CNS11643 Set 7 2/4 2/{8,9,10,11} 4/13 (M) */
+#define LEADING_BYTE_CHINESE_CNS11643_7 187
-/* DPRK Hangul KPS 9566-1997 */
-#define LEADING_BYTE_KOREAN_KPS9566 ('N' + CHARSET_ID_OFFSET_94x94)
+/* DPRK Hangul KPS 9566-1997 2/4 2/{8,9,10,11} 4/14 (N) */
+#define LEADING_BYTE_KOREAN_KPS9566 202
#define NUM_LEADING_BYTES (80 * 3 - MIN_LEADING_BYTE)