update dev300-m58
[ooovba.git] / sal / textenc / tcvtscn6.tab
blob1208c87a7081d0f1cd992daa906da2a3e75e68ed
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  * 
5  * Copyright 2008 by Sun Microsystems, Inc.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * $RCSfile: tcvtscn6.tab,v $
10  * $Revision: 1.12 $
11  *
12  * This file is part of OpenOffice.org.
13  *
14  * OpenOffice.org is free software: you can redistribute it and/or modify
15  * it under the terms of the GNU Lesser General Public License version 3
16  * only, as published by the Free Software Foundation.
17  *
18  * OpenOffice.org is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU Lesser General Public License version 3 for more details
22  * (a copy is included in the LICENSE file that accompanied this code).
23  *
24  * You should have received a copy of the GNU Lesser General Public License
25  * version 3 along with OpenOffice.org.  If not, see
26  * <http://www.openoffice.org/license.html>
27  * for a copy of the LGPLv3 License.
28  *
29  ************************************************************************/
31 /* ======================================================================= */
33 /* This file contain the information tables for all */
34 /* chinese simplified (China) charsets: */
35 /* GB2312, GBK, MS936, APPLE_CHINSIMP */
37 /* GBK is MS-CP 936 and a superset of GB-2312-80. In GB-2312-80 the range */
38 /* is 0xA1-0xFE for the leading byte and 0xA1-0xFE for the trailing byte. */
39 /* In GBK the range is from 0x81-0xFE for the leading byte and 0x40-0xFE */
40 /* for the trailing byte. */
42 /* ======================================================================= */
44 #define GBKOFF      0x61
46 /* ======================================================================= */
48 static ImplDBCSToUniLeadTab const aGB2312UniLeadTab[256] =
50     { 0x0000,    0,    0, NULL },                               /* 0x00 */
51     { 0x0001,    0,    0, NULL },                               /* 0x01 */
52     { 0x0002,    0,    0, NULL },                               /* 0x02 */
53     { 0x0003,    0,    0, NULL },                               /* 0x03 */
54     { 0x0004,    0,    0, NULL },                               /* 0x04 */
55     { 0x0005,    0,    0, NULL },                               /* 0x05 */
56     { 0x0006,    0,    0, NULL },                               /* 0x06 */
57     { 0x0007,    0,    0, NULL },                               /* 0x07 */
58     { 0x0008,    0,    0, NULL },                               /* 0x08 */
59     { 0x0009,    0,    0, NULL },                               /* 0x09 */
60     { 0x000A,    0,    0, NULL },                               /* 0x0A */
61     { 0x000B,    0,    0, NULL },                               /* 0x0B */
62     { 0x000C,    0,    0, NULL },                               /* 0x0C */
63     { 0x000D,    0,    0, NULL },                               /* 0x0D */
64     { 0x000E,    0,    0, NULL },                               /* 0x0E */
65     { 0x000F,    0,    0, NULL },                               /* 0x0F */
66     { 0x0010,    0,    0, NULL },                               /* 0x10 */
67     { 0x0011,    0,    0, NULL },                               /* 0x11 */
68     { 0x0012,    0,    0, NULL },                               /* 0x12 */
69     { 0x0013,    0,    0, NULL },                               /* 0x13 */
70     { 0x0014,    0,    0, NULL },                               /* 0x14 */
71     { 0x0015,    0,    0, NULL },                               /* 0x15 */
72     { 0x0016,    0,    0, NULL },                               /* 0x16 */
73     { 0x0017,    0,    0, NULL },                               /* 0x17 */
74     { 0x0018,    0,    0, NULL },                               /* 0x18 */
75     { 0x0019,    0,    0, NULL },                               /* 0x19 */
76     { 0x001A,    0,    0, NULL },                               /* 0x1A */
77     { 0x001B,    0,    0, NULL },                               /* 0x1B */
78     { 0x001C,    0,    0, NULL },                               /* 0x1C */
79     { 0x001D,    0,    0, NULL },                               /* 0x1D */
80     { 0x001E,    0,    0, NULL },                               /* 0x1E */
81     { 0x001F,    0,    0, NULL },                               /* 0x1F */
82     { 0x0020,    0,    0, NULL },                               /* 0x20 */
83     { 0x0021,    0,    0, NULL },                               /* 0x21 */
84     { 0x0022,    0,    0, NULL },                               /* 0x22 */
85     { 0x0023,    0,    0, NULL },                               /* 0x23 */
86     { 0x0024,    0,    0, NULL },                               /* 0x24 */
87     { 0x0025,    0,    0, NULL },                               /* 0x25 */
88     { 0x0026,    0,    0, NULL },                               /* 0x26 */
89     { 0x0027,    0,    0, NULL },                               /* 0x27 */
90     { 0x0028,    0,    0, NULL },                               /* 0x28 */
91     { 0x0029,    0,    0, NULL },                               /* 0x29 */
92     { 0x002A,    0,    0, NULL },                               /* 0x2A */
93     { 0x002B,    0,    0, NULL },                               /* 0x2B */
94     { 0x002C,    0,    0, NULL },                               /* 0x2C */
95     { 0x002D,    0,    0, NULL },                               /* 0x2D */
96     { 0x002E,    0,    0, NULL },                               /* 0x2E */
97     { 0x002F,    0,    0, NULL },                               /* 0x2F */
98     { 0x0030,    0,    0, NULL },                               /* 0x30 */
99     { 0x0031,    0,    0, NULL },                               /* 0x31 */
100     { 0x0032,    0,    0, NULL },                               /* 0x32 */
101     { 0x0033,    0,    0, NULL },                               /* 0x33 */
102     { 0x0034,    0,    0, NULL },                               /* 0x34 */
103     { 0x0035,    0,    0, NULL },                               /* 0x35 */
104     { 0x0036,    0,    0, NULL },                               /* 0x36 */
105     { 0x0037,    0,    0, NULL },                               /* 0x37 */
106     { 0x0038,    0,    0, NULL },                               /* 0x38 */
107     { 0x0039,    0,    0, NULL },                               /* 0x39 */
108     { 0x003A,    0,    0, NULL },                               /* 0x3A */
109     { 0x003B,    0,    0, NULL },                               /* 0x3B */
110     { 0x003C,    0,    0, NULL },                               /* 0x3C */
111     { 0x003D,    0,    0, NULL },                               /* 0x3D */
112     { 0x003E,    0,    0, NULL },                               /* 0x3E */
113     { 0x003F,    0,    0, NULL },                               /* 0x3F */
114     { 0x0040,    0,    0, NULL },                               /* 0x40 */
115     { 0x0041,    0,    0, NULL },                               /* 0x41 */
116     { 0x0042,    0,    0, NULL },                               /* 0x42 */
117     { 0x0043,    0,    0, NULL },                               /* 0x43 */
118     { 0x0044,    0,    0, NULL },                               /* 0x44 */
119     { 0x0045,    0,    0, NULL },                               /* 0x45 */
120     { 0x0046,    0,    0, NULL },                               /* 0x46 */
121     { 0x0047,    0,    0, NULL },                               /* 0x47 */
122     { 0x0048,    0,    0, NULL },                               /* 0x48 */
123     { 0x0049,    0,    0, NULL },                               /* 0x49 */
124     { 0x004A,    0,    0, NULL },                               /* 0x4A */
125     { 0x004B,    0,    0, NULL },                               /* 0x4B */
126     { 0x004C,    0,    0, NULL },                               /* 0x4C */
127     { 0x004D,    0,    0, NULL },                               /* 0x4D */
128     { 0x004E,    0,    0, NULL },                               /* 0x4E */
129     { 0x004F,    0,    0, NULL },                               /* 0x4F */
130     { 0x0050,    0,    0, NULL },                               /* 0x50 */
131     { 0x0051,    0,    0, NULL },                               /* 0x51 */
132     { 0x0052,    0,    0, NULL },                               /* 0x52 */
133     { 0x0053,    0,    0, NULL },                               /* 0x53 */
134     { 0x0054,    0,    0, NULL },                               /* 0x54 */
135     { 0x0055,    0,    0, NULL },                               /* 0x55 */
136     { 0x0056,    0,    0, NULL },                               /* 0x56 */
137     { 0x0057,    0,    0, NULL },                               /* 0x57 */
138     { 0x0058,    0,    0, NULL },                               /* 0x58 */
139     { 0x0059,    0,    0, NULL },                               /* 0x59 */
140     { 0x005A,    0,    0, NULL },                               /* 0x5A */
141     { 0x005B,    0,    0, NULL },                               /* 0x5B */
142     { 0x005C,    0,    0, NULL },                               /* 0x5C */
143     { 0x005D,    0,    0, NULL },                               /* 0x5D */
144     { 0x005E,    0,    0, NULL },                               /* 0x5E */
145     { 0x005F,    0,    0, NULL },                               /* 0x5F */
146     { 0x0060,    0,    0, NULL },                               /* 0x60 */
147     { 0x0061,    0,    0, NULL },                               /* 0x61 */
148     { 0x0062,    0,    0, NULL },                               /* 0x62 */
149     { 0x0063,    0,    0, NULL },                               /* 0x63 */
150     { 0x0064,    0,    0, NULL },                               /* 0x64 */
151     { 0x0065,    0,    0, NULL },                               /* 0x65 */
152     { 0x0066,    0,    0, NULL },                               /* 0x66 */
153     { 0x0067,    0,    0, NULL },                               /* 0x67 */
154     { 0x0068,    0,    0, NULL },                               /* 0x68 */
155     { 0x0069,    0,    0, NULL },                               /* 0x69 */
156     { 0x006A,    0,    0, NULL },                               /* 0x6A */
157     { 0x006B,    0,    0, NULL },                               /* 0x6B */
158     { 0x006C,    0,    0, NULL },                               /* 0x6C */
159     { 0x006D,    0,    0, NULL },                               /* 0x6D */
160     { 0x006E,    0,    0, NULL },                               /* 0x6E */
161     { 0x006F,    0,    0, NULL },                               /* 0x6F */
162     { 0x0070,    0,    0, NULL },                               /* 0x70 */
163     { 0x0071,    0,    0, NULL },                               /* 0x71 */
164     { 0x0072,    0,    0, NULL },                               /* 0x72 */
165     { 0x0073,    0,    0, NULL },                               /* 0x73 */
166     { 0x0074,    0,    0, NULL },                               /* 0x74 */
167     { 0x0075,    0,    0, NULL },                               /* 0x75 */
168     { 0x0076,    0,    0, NULL },                               /* 0x76 */
169     { 0x0077,    0,    0, NULL },                               /* 0x77 */
170     { 0x0078,    0,    0, NULL },                               /* 0x78 */
171     { 0x0079,    0,    0, NULL },                               /* 0x79 */
172     { 0x007A,    0,    0, NULL },                               /* 0x7A */
173     { 0x007B,    0,    0, NULL },                               /* 0x7B */
174     { 0x007C,    0,    0, NULL },                               /* 0x7C */
175     { 0x007D,    0,    0, NULL },                               /* 0x7D */
176     { 0x007E,    0,    0, NULL },                               /* 0x7E */
177     { 0x007F,    0,    0, NULL },                               /* 0x7F */
178     { 0x20AC,    0,    0, NULL },                               /* 0x80 */
179     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x81 */ /* We convert this as double byte */
180     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x82 */ /* We convert this as double byte */
181     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x83 */ /* We convert this as double byte */
182     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x84 */ /* We convert this as double byte */
183     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x85 */ /* We convert this as double byte */
184     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x86 */ /* We convert this as double byte */
185     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x87 */ /* We convert this as double byte */
186     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x88 */ /* We convert this as double byte */
187     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x89 */ /* We convert this as double byte */
188     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8A */ /* We convert this as double byte */
189     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8B */ /* We convert this as double byte */
190     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8C */ /* We convert this as double byte */
191     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8D */ /* We convert this as double byte */
192     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8E */ /* We convert this as double byte */
193     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8F */ /* We convert this as double byte */
194     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x90 */ /* We convert this as double byte */
195     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x91 */ /* We convert this as double byte */
196     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x92 */ /* We convert this as double byte */
197     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x93 */ /* We convert this as double byte */
198     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x94 */ /* We convert this as double byte */
199     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x95 */ /* We convert this as double byte */
200     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x96 */ /* We convert this as double byte */
201     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x97 */ /* We convert this as double byte */
202     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x98 */ /* We convert this as double byte */
203     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x99 */ /* We convert this as double byte */
204     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9A */ /* We convert this as double byte */
205     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9B */ /* We convert this as double byte */
206     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9C */ /* We convert this as double byte */
207     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9D */ /* We convert this as double byte */
208     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9E */ /* We convert this as double byte */
209     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9F */ /* We convert this as double byte */
210     {      0,    1,    0, NULL },                               /* 0xA0 */
211     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GB_A1 },            /* 0xA1 */
212     {      0, 0xA1, 0xFC, aImplDBCSToUniTab_GB_A2 },            /* 0xA2 */
213     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GB_A3 },            /* 0xA3 */
214     {      0, 0xA1, 0xF3, aImplDBCSToUniTab_GB_A4 },            /* 0xA4 */
215     {      0, 0xA1, 0xF6, aImplDBCSToUniTab_GB_A5 },            /* 0xA5 */
216     {      0, 0xA1, 0xF5, aImplDBCSToUniTab_GB_A6 },            /* 0xA6 */
217     {      0, 0xA1, 0xF1, aImplDBCSToUniTab_GB_A7 },            /* 0xA7 */
218     {      0, 0xA1, 0xE9, aImplDBCSToUniTab_GBK_A8+GBKOFF },    /* 0xA8 */
219     {      0, 0xA1, 0xEF, aImplDBCSToUniTab_GBK_A9+GBKOFF },    /* 0xA9 */
220     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAA */ /* We convert this as double byte */
221     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAB */ /* We convert this as double byte */
222     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAC */ /* We convert this as double byte */
223     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAD */ /* We convert this as double byte */
224     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAE */ /* We convert this as double byte */
225     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAF */ /* We convert this as double byte */
226     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B0+GBKOFF },    /* 0xB0 */
227     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B1+GBKOFF },    /* 0xB1 */
228     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B2+GBKOFF },    /* 0xB2 */
229     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B3+GBKOFF },    /* 0xB3 */
230     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B4+GBKOFF },    /* 0xB4 */
231     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B5+GBKOFF },    /* 0xB5 */
232     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B6+GBKOFF },    /* 0xB6 */
233     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B7+GBKOFF },    /* 0xB7 */
234     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B8+GBKOFF },    /* 0xB8 */
235     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B9+GBKOFF },    /* 0xB9 */
236     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BA+GBKOFF },    /* 0xBA */
237     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BB+GBKOFF },    /* 0xBB */
238     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BC+GBKOFF },    /* 0xBC */
239     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BD+GBKOFF },    /* 0xBD */
240     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BE+GBKOFF },    /* 0xBE */
241     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BF+GBKOFF },    /* 0xBF */
242     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C0+GBKOFF },    /* 0xC0 */
243     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C1+GBKOFF },    /* 0xC1 */
244     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C2+GBKOFF },    /* 0xC2 */
245     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C3+GBKOFF },    /* 0xC3 */
246     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C4+GBKOFF },    /* 0xC4 */
247     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C5+GBKOFF },    /* 0xC5 */
248     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C6+GBKOFF },    /* 0xC6 */
249     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C7+GBKOFF },    /* 0xC7 */
250     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C8+GBKOFF },    /* 0xC8 */
251     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C9+GBKOFF },    /* 0xC9 */
252     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CA+GBKOFF },    /* 0xCA */
253     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CB+GBKOFF },    /* 0xCB */
254     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CC+GBKOFF },    /* 0xCC */
255     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CD+GBKOFF },    /* 0xCD */
256     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CE+GBKOFF },    /* 0xCE */
257     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CF+GBKOFF },    /* 0xCF */
258     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D0+GBKOFF },    /* 0xD0 */
259     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D1+GBKOFF },    /* 0xD1 */
260     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D2+GBKOFF },    /* 0xD2 */
261     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D3+GBKOFF },    /* 0xD3 */
262     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D4+GBKOFF },    /* 0xD4 */
263     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D5+GBKOFF },    /* 0xD5 */
264     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D6+GBKOFF },    /* 0xD6 */
265     {      0, 0xA1, 0xF9, aImplDBCSToUniTab_GBK_D7+GBKOFF },    /* 0xD7 */
266     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D8+GBKOFF },    /* 0xD8 */
267     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D9+GBKOFF },    /* 0xD9 */
268     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DA+GBKOFF },    /* 0xDA */
269     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DB+GBKOFF },    /* 0xDB */
270     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DC+GBKOFF },    /* 0xDC */
271     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DD+GBKOFF },    /* 0xDD */
272     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DE+GBKOFF },    /* 0xDE */
273     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DF+GBKOFF },    /* 0xDF */
274     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E0+GBKOFF },    /* 0xE0 */
275     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E1+GBKOFF },    /* 0xE1 */
276     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E2+GBKOFF },    /* 0xE2 */
277     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E3+GBKOFF },    /* 0xE3 */
278     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E4+GBKOFF },    /* 0xE4 */
279     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E5+GBKOFF },    /* 0xE5 */
280     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E6+GBKOFF },    /* 0xE6 */
281     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E7+GBKOFF },    /* 0xE7 */
282     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E8+GBKOFF },    /* 0xE8 */
283     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E9+GBKOFF },    /* 0xE9 */
284     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_EA+GBKOFF },    /* 0xEA */
285     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_EB+GBKOFF },    /* 0xEB */
286     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_EC+GBKOFF },    /* 0xEC */
287     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_ED+GBKOFF },    /* 0xED */
288     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_EE+GBKOFF },    /* 0xEE */
289     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_EF+GBKOFF },    /* 0xEF */
290     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F0+GBKOFF },    /* 0xF0 */
291     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F1+GBKOFF },    /* 0xF1 */
292     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F2+GBKOFF },    /* 0xF2 */
293     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F3+GBKOFF },    /* 0xF3 */
294     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F4+GBKOFF },    /* 0xF4 */
295     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F5+GBKOFF },    /* 0xF5 */
296     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F6+GBKOFF },    /* 0xF6 */
297     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F7+GBKOFF },    /* 0xF7 */
298     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xF8 */ /* We convert this as double byte */
299     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xF9 */ /* We convert this as double byte */
300     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFA */ /* We convert this as double byte */
301     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFB */ /* We convert this as double byte */
302     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFC */ /* We convert this as double byte */
303     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFD */ /* We convert this as double byte */
304     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFE */ /* We convert this as double byte */
305     {      0,    1,    0, NULL }                                /* 0xFF */
308 /* ----------------------------------------------------------------------- */
310 static ImplUniToDBCSHighTab const aGB2312DBCSHighTab[256] =
312     { 0x00, 0xFC, aImplUniToDBCSTab_GB_00 },                    /* 0x00 */
313     { 0x01, 0xDC, aImplUniToDBCSTab_GB_01 },                    /* 0x01 */
314     { 0x51, 0xC9, aImplUniToDBCSTab_GB_02 },                    /* 0x02 */
315     { 0x91, 0xC9, aImplUniToDBCSTab_GB_03 },                    /* 0x03 */
316     { 0x01, 0x51, aImplUniToDBCSTab_GB_04 },                    /* 0x04 */
317     {    1,    0, NULL },                                       /* 0x05 */
318     {    1,    0, NULL },                                       /* 0x06 */
319     {    1,    0, NULL },                                       /* 0x07 */
320     {    1,    0, NULL },                                       /* 0x08 */
321     {    1,    0, NULL },                                       /* 0x09 */
322     {    1,    0, NULL },                                       /* 0x0A */
323     {    1,    0, NULL },                                       /* 0x0B */
324     {    1,    0, NULL },                                       /* 0x0C */
325     {    1,    0, NULL },                                       /* 0x0D */
326     {    1,    0, NULL },                                       /* 0x0E */
327     {    1,    0, NULL },                                       /* 0x0F */
328     {    1,    0, NULL },                                       /* 0x10 */
329     {    1,    0, NULL },                                       /* 0x11 */
330     {    1,    0, NULL },                                       /* 0x12 */
331     {    1,    0, NULL },                                       /* 0x13 */
332     {    1,    0, NULL },                                       /* 0x14 */
333     {    1,    0, NULL },                                       /* 0x15 */
334     {    1,    0, NULL },                                       /* 0x16 */
335     {    1,    0, NULL },                                       /* 0x17 */
336     {    1,    0, NULL },                                       /* 0x18 */
337     {    1,    0, NULL },                                       /* 0x19 */
338     {    1,    0, NULL },                                       /* 0x1A */
339     {    1,    0, NULL },                                       /* 0x1B */
340     {    1,    0, NULL },                                       /* 0x1C */
341     {    1,    0, NULL },                                       /* 0x1D */
342     { 0x3F, 0x3F, aImplUniToDBCSTab_APPLECHINSIMP_1E },         /* 0x1E */ /* we convert this char also to unicode */
343     {    1,    0, NULL },                                       /* 0x1F */
344     { 0x14, 0xAC, aImplUniToDBCSTab_GB_20 },                    /* 0x20 */
345     { 0x03, 0x93, aImplUniToDBCSTab_GB_21 },                    /* 0x21 */
346     { 0x08, 0xEF, aImplUniToDBCSTab_GB_22 },                    /* 0x22 */
347     { 0x12, 0x12, aImplUniToDBCSTab_GB_23 },                    /* 0x23 */
348     { 0x60, 0x9B, aImplUniToDBCSTab_GB_24 },                    /* 0x24 */
349     { 0x00, 0xCF, aImplUniToDBCSTab_GB_25 },                    /* 0x25 */
350     { 0x05, 0x42, aImplUniToDBCSTab_GB_26 },                    /* 0x26 */
351     {    1,    0, NULL },                                       /* 0x27 */
352     {    1,    0, NULL },                                       /* 0x28 */
353     {    1,    0, NULL },                                       /* 0x29 */
354     {    1,    0, NULL },                                       /* 0x2A */
355     {    1,    0, NULL },                                       /* 0x2B */
356     {    1,    0, NULL },                                       /* 0x2C */
357     {    1,    0, NULL },                                       /* 0x2D */
358     {    1,    0, NULL },                                       /* 0x2E */
359     {    1,    0, NULL },                                       /* 0x2F */
360     { 0x00, 0xFB, aImplUniToDBCSTab_GB_30 },                    /* 0x30 */
361     { 0x05, 0x29, aImplUniToDBCSTab_GB_31 },                    /* 0x31 */
362     { 0x20, 0x29, aImplUniToDBCSTab_GBK_32 },                   /* 0x32 */
363     {    1,    0, NULL },                                       /* 0x33 */
364     {    1,    0, NULL },                                       /* 0x34 */
365     {    1,    0, NULL },                                       /* 0x35 */
366     {    1,    0, NULL },                                       /* 0x36 */
367     {    1,    0, NULL },                                       /* 0x37 */
368     {    1,    0, NULL },                                       /* 0x38 */
369     {    1,    0, NULL },                                       /* 0x39 */
370     {    1,    0, NULL },                                       /* 0x3A */
371     {    1,    0, NULL },                                       /* 0x3B */
372     {    1,    0, NULL },                                       /* 0x3C */
373     {    1,    0, NULL },                                       /* 0x3D */
374     {    1,    0, NULL },                                       /* 0x3E */
375     {    1,    0, NULL },                                       /* 0x3F */
376     {    1,    0, NULL },                                       /* 0x40 */
377     {    1,    0, NULL },                                       /* 0x41 */
378     {    1,    0, NULL },                                       /* 0x42 */
379     {    1,    0, NULL },                                       /* 0x43 */
380     {    1,    0, NULL },                                       /* 0x44 */
381     {    1,    0, NULL },                                       /* 0x45 */
382     {    1,    0, NULL },                                       /* 0x46 */
383     {    1,    0, NULL },                                       /* 0x47 */
384     {    1,    0, NULL },                                       /* 0x48 */
385     {    1,    0, NULL },                                       /* 0x49 */
386     {    1,    0, NULL },                                       /* 0x4A */
387     {    1,    0, NULL },                                       /* 0x4B */
388     {    1,    0, NULL },                                       /* 0x4C */
389     {    1,    0, NULL },                                       /* 0x4D */
390     { 0x00, 0xFF, aImplUniToDBCSTab_GB_4E },                    /* 0x4E */
391     { 0x01, 0xFE, aImplUniToDBCSTab_GB_4F },                    /* 0x4F */
392     { 0x0C, 0xFB, aImplUniToDBCSTab_GB_50 },                    /* 0x50 */
393     { 0x06, 0xFF, aImplUniToDBCSTab_GB_51 },                    /* 0x51 */
394     { 0x00, 0xFF, aImplUniToDBCSTab_GB_52 },                    /* 0x52 */
395     { 0x00, 0xFD, aImplUniToDBCSTab_GB_53 },                    /* 0x53 */
396     { 0x01, 0xFF, aImplUniToDBCSTab_GB_54 },                    /* 0x54 */
397     { 0x01, 0xFE, aImplUniToDBCSTab_GB_55 },                    /* 0x55 */
398     { 0x00, 0xFF, aImplUniToDBCSTab_GB_56 },                    /* 0x56 */
399     { 0x03, 0xFD, aImplUniToDBCSTab_GB_57 },                    /* 0x57 */
400     { 0x00, 0xF9, aImplUniToDBCSTab_GB_58 },                    /* 0x58 */
401     { 0x02, 0xFF, aImplUniToDBCSTab_GB_59 },                    /* 0x59 */
402     { 0x01, 0xF1, aImplUniToDBCSTab_GB_5A },                    /* 0x5A */
403     { 0x09, 0xFF, aImplUniToDBCSTab_GB_5B },                    /* 0x5B */
404     { 0x01, 0xFB, aImplUniToDBCSTab_GB_5C },                    /* 0x5C */
405     { 0x02, 0xFE, aImplUniToDBCSTab_GB_5D },                    /* 0x5D */
406     { 0x01, 0xFF, aImplUniToDBCSTab_GB_5E },                    /* 0x5E */
407     { 0x00, 0xFF, aImplUniToDBCSTab_GB_5F },                    /* 0x5F */
408     { 0x00, 0xFA, aImplUniToDBCSTab_GB_60 },                    /* 0x60 */
409     { 0x00, 0xFF, aImplUniToDBCSTab_GB_61 },                    /* 0x61 */
410     { 0x06, 0xFF, aImplUniToDBCSTab_GB_62 },                    /* 0x62 */
411     { 0x01, 0xFF, aImplUniToDBCSTab_GB_63 },                    /* 0x63 */
412     { 0x00, 0xE6, aImplUniToDBCSTab_GB_64 },                    /* 0x64 */
413     { 0x00, 0xFA, aImplUniToDBCSTab_GB_65 },                    /* 0x65 */
414     { 0x00, 0xFF, aImplUniToDBCSTab_GB_66 },                    /* 0x66 */
415     { 0x00, 0xFF, aImplUniToDBCSTab_GB_67 },                    /* 0x67 */
416     { 0x00, 0xFC, aImplUniToDBCSTab_GB_68 },                    /* 0x68 */
417     { 0x01, 0xFF, aImplUniToDBCSTab_GB_69 },                    /* 0x69 */
418     { 0x0A, 0xAC, aImplUniToDBCSTab_GB_6A },                    /* 0x6A */
419     { 0x20, 0xFD, aImplUniToDBCSTab_GB_6B },                    /* 0x6B */
420     { 0x05, 0xFE, aImplUniToDBCSTab_GB_6C },                    /* 0x6C */
421     { 0x01, 0xFC, aImplUniToDBCSTab_GB_6D },                    /* 0x6D */
422     { 0x05, 0xF9, aImplUniToDBCSTab_GB_6E },                    /* 0x6E */
423     { 0x02, 0xEF, aImplUniToDBCSTab_GB_6F },                    /* 0x6F */
424     { 0x11, 0xFD, aImplUniToDBCSTab_GB_70 },                    /* 0x70 */
425     { 0x09, 0xF9, aImplUniToDBCSTab_GB_71 },                    /* 0x71 */
426     { 0x06, 0xFC, aImplUniToDBCSTab_GB_72 },                    /* 0x72 */
427     { 0x01, 0xF2, aImplUniToDBCSTab_GB_73 },                    /* 0x73 */
428     { 0x03, 0xFF, aImplUniToDBCSTab_GB_74 },                    /* 0x74 */
429     { 0x04, 0xFF, aImplUniToDBCSTab_GB_75 },                    /* 0x75 */
430     { 0x00, 0xFE, aImplUniToDBCSTab_GB_76 },                    /* 0x76 */
431     { 0x01, 0xFF, aImplUniToDBCSTab_GB_77 },                    /* 0x77 */
432     { 0x00, 0xFA, aImplUniToDBCSTab_GB_78 },                    /* 0x78 */
433     { 0x01, 0xFD, aImplUniToDBCSTab_GB_79 },                    /* 0x79 */
434     { 0x00, 0xFF, aImplUniToDBCSTab_GB_7A },                    /* 0x7A */
435     { 0x03, 0xFE, aImplUniToDBCSTab_GB_7B },                    /* 0x7B */
436     { 0x07, 0xFB, aImplUniToDBCSTab_GB_7C },                    /* 0x7C */
437     { 0x0A, 0xAE, aImplUniToDBCSTab_GB_7D },                    /* 0x7D */
438     { 0x3B, 0xFF, aImplUniToDBCSTab_GB_7E },                    /* 0x7E */
439     { 0x00, 0xFC, aImplUniToDBCSTab_GB_7F },                    /* 0x7F */
440     { 0x00, 0xFD, aImplUniToDBCSTab_GB_80 },                    /* 0x80 */
441     { 0x02, 0xFE, aImplUniToDBCSTab_GB_81 },                    /* 0x81 */
442     { 0x00, 0xFB, aImplUniToDBCSTab_GB_82 },                    /* 0x82 */
443     { 0x01, 0xFD, aImplUniToDBCSTab_GB_83 },                    /* 0x83 */
444     { 0x01, 0xFF, aImplUniToDBCSTab_GB_84 },                    /* 0x84 */
445     { 0x0C, 0xFF, aImplUniToDBCSTab_GB_85 },                    /* 0x85 */
446     { 0x05, 0xFE, aImplUniToDBCSTab_GB_86 },                    /* 0x86 */
447     { 0x00, 0xFE, aImplUniToDBCSTab_GB_87 },                    /* 0x87 */
448     { 0x03, 0xFE, aImplUniToDBCSTab_GB_88 },                    /* 0x88 */
449     { 0x02, 0xF3, aImplUniToDBCSTab_GB_89 },                    /* 0x89 */
450     { 0x00, 0x93, aImplUniToDBCSTab_GB_8A },                    /* 0x8A */
451     { 0x07, 0xFF, aImplUniToDBCSTab_GB_8B },                    /* 0x8B */
452     { 0x00, 0x98, aImplUniToDBCSTab_GB_8C },                    /* 0x8C */
453     { 0x1D, 0xFD, aImplUniToDBCSTab_GB_8D },                    /* 0x8D */
454     { 0x05, 0xCE, aImplUniToDBCSTab_GB_8E },                    /* 0x8E */
455     { 0x66, 0xFD, aImplUniToDBCSTab_GB_8F },                    /* 0x8F */
456     { 0x00, 0xFE, aImplUniToDBCSTab_GB_90 },                    /* 0x90 */
457     { 0x02, 0xDC, aImplUniToDBCSTab_GB_91 },                    /* 0x91 */
458     { 0x74, 0xC8, aImplUniToDBCSTab_GB_92 },                    /* 0x92 */
459     { 0x3E, 0xD6, aImplUniToDBCSTab_GB_93 },                    /* 0x93 */
460     { 0x3E, 0xFF, aImplUniToDBCSTab_GB_94 },                    /* 0x94 */
461     { 0x00, 0xFE, aImplUniToDBCSTab_GB_95 },                    /* 0x95 */
462     { 0x00, 0xFE, aImplUniToDBCSTab_GB_96 },                    /* 0x96 */
463     { 0x00, 0xF6, aImplUniToDBCSTab_GB_97 },                    /* 0x97 */
464     { 0x75, 0xE9, aImplUniToDBCSTab_GB_98 },                    /* 0x98 */
465     { 0x0D, 0xA8, aImplUniToDBCSTab_GB_99 },                    /* 0x99 */
466     { 0x6C, 0xFB, aImplUniToDBCSTab_GB_9A },                    /* 0x9A */
467     { 0x03, 0x54, aImplUniToDBCSTab_GB_9B },                    /* 0x9B */
468     { 0x7C, 0xE2, aImplUniToDBCSTab_GB_9C },                    /* 0x9C */
469     {    1,    0, NULL },                                       /* 0x9D */
470     { 0x1F, 0xFE, aImplUniToDBCSTab_GB_9E },                    /* 0x9E */
471     { 0x0B, 0xA0, aImplUniToDBCSTab_GB_9F },                    /* 0x9F */
472     {    1,    0, NULL },                                       /* 0xA0 */
473     {    1,    0, NULL },                                       /* 0xA1 */
474     {    1,    0, NULL },                                       /* 0xA2 */
475     {    1,    0, NULL },                                       /* 0xA3 */
476     {    1,    0, NULL },                                       /* 0xA4 */
477     {    1,    0, NULL },                                       /* 0xA5 */
478     {    1,    0, NULL },                                       /* 0xA6 */
479     {    1,    0, NULL },                                       /* 0xA7 */
480     {    1,    0, NULL },                                       /* 0xA8 */
481     {    1,    0, NULL },                                       /* 0xA9 */
482     {    1,    0, NULL },                                       /* 0xAA */
483     {    1,    0, NULL },                                       /* 0xAB */
484     {    1,    0, NULL },                                       /* 0xAC */
485     {    1,    0, NULL },                                       /* 0xAD */
486     {    1,    0, NULL },                                       /* 0xAE */
487     {    1,    0, NULL },                                       /* 0xAF */
488     {    1,    0, NULL },                                       /* 0xB0 */
489     {    1,    0, NULL },                                       /* 0xB1 */
490     {    1,    0, NULL },                                       /* 0xB2 */
491     {    1,    0, NULL },                                       /* 0xB3 */
492     {    1,    0, NULL },                                       /* 0xB4 */
493     {    1,    0, NULL },                                       /* 0xB5 */
494     {    1,    0, NULL },                                       /* 0xB6 */
495     {    1,    0, NULL },                                       /* 0xB7 */
496     {    1,    0, NULL },                                       /* 0xB8 */
497     {    1,    0, NULL },                                       /* 0xB9 */
498     {    1,    0, NULL },                                       /* 0xBA */
499     {    1,    0, NULL },                                       /* 0xBB */
500     {    1,    0, NULL },                                       /* 0xBC */
501     {    1,    0, NULL },                                       /* 0xBD */
502     {    1,    0, NULL },                                       /* 0xBE */
503     {    1,    0, NULL },                                       /* 0xBF */
504     {    1,    0, NULL },                                       /* 0xC0 */
505     {    1,    0, NULL },                                       /* 0xC1 */
506     {    1,    0, NULL },                                       /* 0xC2 */
507     {    1,    0, NULL },                                       /* 0xC3 */
508     {    1,    0, NULL },                                       /* 0xC4 */
509     {    1,    0, NULL },                                       /* 0xC5 */
510     {    1,    0, NULL },                                       /* 0xC6 */
511     {    1,    0, NULL },                                       /* 0xC7 */
512     {    1,    0, NULL },                                       /* 0xC8 */
513     {    1,    0, NULL },                                       /* 0xC9 */
514     {    1,    0, NULL },                                       /* 0xCA */
515     {    1,    0, NULL },                                       /* 0xCB */
516     {    1,    0, NULL },                                       /* 0xCC */
517     {    1,    0, NULL },                                       /* 0xCD */
518     {    1,    0, NULL },                                       /* 0xCE */
519     {    1,    0, NULL },                                       /* 0xCF */
520     {    1,    0, NULL },                                       /* 0xD0 */
521     {    1,    0, NULL },                                       /* 0xD1 */
522     {    1,    0, NULL },                                       /* 0xD2 */
523     {    1,    0, NULL },                                       /* 0xD3 */
524     {    1,    0, NULL },                                       /* 0xD4 */
525     {    1,    0, NULL },                                       /* 0xD5 */
526     {    1,    0, NULL },                                       /* 0xD6 */
527     {    1,    0, NULL },                                       /* 0xD7 */
528     {    1,    0, NULL },                                       /* 0xD8 */
529     {    1,    0, NULL },                                       /* 0xD9 */
530     {    1,    0, NULL },                                       /* 0xDA */
531     {    1,    0, NULL },                                       /* 0xDB */
532     {    1,    0, NULL },                                       /* 0xDC */
533     {    1,    0, NULL },                                       /* 0xDD */
534     {    1,    0, NULL },                                       /* 0xDE */
535     {    1,    0, NULL },                                       /* 0xDF */
536     {    1,    0, NULL },                                       /* 0xE0 */
537     {    1,    0, NULL },                                       /* 0xE1 */
538     {    1,    0, NULL },                                       /* 0xE2 */
539     {    1,    0, NULL },                                       /* 0xE3 */
540     {    1,    0, NULL },                                       /* 0xE4 */
541     {    1,    0, NULL },                                       /* 0xE5 */
542     {    1,    0, NULL },                                       /* 0xE6 */
543     {    1,    0, NULL },                                       /* 0xE7 */
544     {    1,    0, NULL },                                       /* 0xE8 */
545     {    1,    0, NULL },                                       /* 0xE9 */
546     {    1,    0, NULL },                                       /* 0xEA */
547     {    1,    0, NULL },                                       /* 0xEB */
548     {    1,    0, NULL },                                       /* 0xEC */
549     {    1,    0, NULL },                                       /* 0xED */
550     {    1,    0, NULL },                                       /* 0xEE */
551     {    1,    0, NULL },                                       /* 0xEF */
552     {    1,    0, NULL },                                       /* 0xF0 */
553     {    1,    0, NULL },                                       /* 0xF1 */
554     {    1,    0, NULL },                                       /* 0xF2 */
555     {    1,    0, NULL },                                       /* 0xF3 */
556     {    1,    0, NULL },                                       /* 0xF4 */
557     {    1,    0, NULL },                                       /* 0xF5 */
558     {    1,    0, NULL },                                       /* 0xF6 */
559     {    1,    0, NULL },                                       /* 0xF7 */
560     {    1,    0, NULL },                                       /* 0xF8 */
561     {    1,    0, NULL },                                       /* 0xF9 */
562     {    1,    0, NULL },                                       /* 0xFA */
563     {    1,    0, NULL },                                       /* 0xFB */
564     {    1,    0, NULL },                                       /* 0xFC */
565     {    1,    0, NULL },                                       /* 0xFD */
566     { 0x31, 0x44, aImplUniToDBCSTab_GB_FE },                    /* 0xFE */
567     { 0x01, 0xE5, aImplUniToDBCSTab_GB_FF }                     /* 0xFF */
570 /* ----------------------------------------------------------------------- */
572 /* F8A1-FEFE    --> E000-E29F */
573 /* AAA1-AFFE    --> E2A0-E4DF */
575 #define DBCS_EUDC_MS936_COUNT       2
576 static ImplDBCSEUDCData const aImplMS936DBCSEUDCTab[DBCS_EUDC_MS936_COUNT] =
578     /* EUDC-Range (the mapping defined by MS is A0-FF, because the */
579     /* unicode range is E000-E29F and E2A0-E4DF) */
580     /* Lead:    F8-FE */
581     /* Trail:   A1-FE */
582     { 0xF8, 0xFE, 0xA0, 0xFF, 0, 0, 0, 0, 1, 0x60, 0xE000, 0xE29F },
583     /* Lead:    AA-AF */
584     /* Trail:   A1-FE */
585     { 0xAA, 0xAF, 0xA0, 0xFF, 0, 0, 0, 0, 1, 0x60, 0xE2A0, 0xE4DF }
588 /* ----------------------------------------------------------------------- */
590 static ImplDBCSConvertData const aImplGB2312DBCSCvtData =
592     aGB2312UniLeadTab,
593     aGB2312DBCSHighTab,
594     0x00, 0xFF,
595     0xA1, 0xFE,
596     aImplMS936DBCSEUDCTab,
597     DBCS_EUDC_MS936_COUNT
600 /* ----------------------------------------------------------------------- */
602 static ImplTextEncodingData const aImplGB2312TextEncodingData
603     = { { &aImplGB2312DBCSCvtData,
604           ImplDBCSToUnicode,
605           ImplUnicodeToDBCS,
606           NULL,
607           NULL,
608           NULL,
609           NULL,
610           NULL,
611           NULL },
612         1,
613         2,
614         2,
615         134,
616         "euc-cn",
617         "gb2312",
618         RTL_TEXTENCODING_INFO_ASCII
619             | RTL_TEXTENCODING_INFO_MULTIBYTE
620             | RTL_TEXTENCODING_INFO_MIME };
621     /* SCRIPT_CHINESE_SIMPLIFIED, pc code page 936, mac encoding 25 */
623 /* ======================================================================= */
625 static ImplTextEncodingData const aImplEUCCNTextEncodingData
626     = { { &aImplGB2312DBCSCvtData,
627           ImplDBCSToUnicode,
628           ImplUnicodeToDBCS,
629           NULL,
630           NULL,
631           NULL,
632           NULL,
633           NULL,
634           NULL },
635         1,
636         2,
637         2,
638         134,
639         "euc-cn",
640         "gb2312",
641         RTL_TEXTENCODING_INFO_ASCII | RTL_TEXTENCODING_INFO_MULTIBYTE };
642     /* SCRIPT_CHINESE_SIMPLIFIED, pc code page 936, mac encoding 25 */
644 /* ======================================================================= */
646 static ImplDBCSToUniLeadTab const aGBT12345UniLeadTab[256] =
648     { 0x0000,    0,    0, NULL },                               /* 0x00 */
649     { 0x0001,    0,    0, NULL },                               /* 0x01 */
650     { 0x0002,    0,    0, NULL },                               /* 0x02 */
651     { 0x0003,    0,    0, NULL },                               /* 0x03 */
652     { 0x0004,    0,    0, NULL },                               /* 0x04 */
653     { 0x0005,    0,    0, NULL },                               /* 0x05 */
654     { 0x0006,    0,    0, NULL },                               /* 0x06 */
655     { 0x0007,    0,    0, NULL },                               /* 0x07 */
656     { 0x0008,    0,    0, NULL },                               /* 0x08 */
657     { 0x0009,    0,    0, NULL },                               /* 0x09 */
658     { 0x000A,    0,    0, NULL },                               /* 0x0A */
659     { 0x000B,    0,    0, NULL },                               /* 0x0B */
660     { 0x000C,    0,    0, NULL },                               /* 0x0C */
661     { 0x000D,    0,    0, NULL },                               /* 0x0D */
662     { 0x000E,    0,    0, NULL },                               /* 0x0E */
663     { 0x000F,    0,    0, NULL },                               /* 0x0F */
664     { 0x0010,    0,    0, NULL },                               /* 0x10 */
665     { 0x0011,    0,    0, NULL },                               /* 0x11 */
666     { 0x0012,    0,    0, NULL },                               /* 0x12 */
667     { 0x0013,    0,    0, NULL },                               /* 0x13 */
668     { 0x0014,    0,    0, NULL },                               /* 0x14 */
669     { 0x0015,    0,    0, NULL },                               /* 0x15 */
670     { 0x0016,    0,    0, NULL },                               /* 0x16 */
671     { 0x0017,    0,    0, NULL },                               /* 0x17 */
672     { 0x0018,    0,    0, NULL },                               /* 0x18 */
673     { 0x0019,    0,    0, NULL },                               /* 0x19 */
674     { 0x001A,    0,    0, NULL },                               /* 0x1A */
675     { 0x001B,    0,    0, NULL },                               /* 0x1B */
676     { 0x001C,    0,    0, NULL },                               /* 0x1C */
677     { 0x001D,    0,    0, NULL },                               /* 0x1D */
678     { 0x001E,    0,    0, NULL },                               /* 0x1E */
679     { 0x001F,    0,    0, NULL },                               /* 0x1F */
680     { 0x0020,    0,    0, NULL },                               /* 0x20 */
681     { 0x0021,    0,    0, NULL },                               /* 0x21 */
682     { 0x0022,    0,    0, NULL },                               /* 0x22 */
683     { 0x0023,    0,    0, NULL },                               /* 0x23 */
684     { 0x0024,    0,    0, NULL },                               /* 0x24 */
685     { 0x0025,    0,    0, NULL },                               /* 0x25 */
686     { 0x0026,    0,    0, NULL },                               /* 0x26 */
687     { 0x0027,    0,    0, NULL },                               /* 0x27 */
688     { 0x0028,    0,    0, NULL },                               /* 0x28 */
689     { 0x0029,    0,    0, NULL },                               /* 0x29 */
690     { 0x002A,    0,    0, NULL },                               /* 0x2A */
691     { 0x002B,    0,    0, NULL },                               /* 0x2B */
692     { 0x002C,    0,    0, NULL },                               /* 0x2C */
693     { 0x002D,    0,    0, NULL },                               /* 0x2D */
694     { 0x002E,    0,    0, NULL },                               /* 0x2E */
695     { 0x002F,    0,    0, NULL },                               /* 0x2F */
696     { 0x0030,    0,    0, NULL },                               /* 0x30 */
697     { 0x0031,    0,    0, NULL },                               /* 0x31 */
698     { 0x0032,    0,    0, NULL },                               /* 0x32 */
699     { 0x0033,    0,    0, NULL },                               /* 0x33 */
700     { 0x0034,    0,    0, NULL },                               /* 0x34 */
701     { 0x0035,    0,    0, NULL },                               /* 0x35 */
702     { 0x0036,    0,    0, NULL },                               /* 0x36 */
703     { 0x0037,    0,    0, NULL },                               /* 0x37 */
704     { 0x0038,    0,    0, NULL },                               /* 0x38 */
705     { 0x0039,    0,    0, NULL },                               /* 0x39 */
706     { 0x003A,    0,    0, NULL },                               /* 0x3A */
707     { 0x003B,    0,    0, NULL },                               /* 0x3B */
708     { 0x003C,    0,    0, NULL },                               /* 0x3C */
709     { 0x003D,    0,    0, NULL },                               /* 0x3D */
710     { 0x003E,    0,    0, NULL },                               /* 0x3E */
711     { 0x003F,    0,    0, NULL },                               /* 0x3F */
712     { 0x0040,    0,    0, NULL },                               /* 0x40 */
713     { 0x0041,    0,    0, NULL },                               /* 0x41 */
714     { 0x0042,    0,    0, NULL },                               /* 0x42 */
715     { 0x0043,    0,    0, NULL },                               /* 0x43 */
716     { 0x0044,    0,    0, NULL },                               /* 0x44 */
717     { 0x0045,    0,    0, NULL },                               /* 0x45 */
718     { 0x0046,    0,    0, NULL },                               /* 0x46 */
719     { 0x0047,    0,    0, NULL },                               /* 0x47 */
720     { 0x0048,    0,    0, NULL },                               /* 0x48 */
721     { 0x0049,    0,    0, NULL },                               /* 0x49 */
722     { 0x004A,    0,    0, NULL },                               /* 0x4A */
723     { 0x004B,    0,    0, NULL },                               /* 0x4B */
724     { 0x004C,    0,    0, NULL },                               /* 0x4C */
725     { 0x004D,    0,    0, NULL },                               /* 0x4D */
726     { 0x004E,    0,    0, NULL },                               /* 0x4E */
727     { 0x004F,    0,    0, NULL },                               /* 0x4F */
728     { 0x0050,    0,    0, NULL },                               /* 0x50 */
729     { 0x0051,    0,    0, NULL },                               /* 0x51 */
730     { 0x0052,    0,    0, NULL },                               /* 0x52 */
731     { 0x0053,    0,    0, NULL },                               /* 0x53 */
732     { 0x0054,    0,    0, NULL },                               /* 0x54 */
733     { 0x0055,    0,    0, NULL },                               /* 0x55 */
734     { 0x0056,    0,    0, NULL },                               /* 0x56 */
735     { 0x0057,    0,    0, NULL },                               /* 0x57 */
736     { 0x0058,    0,    0, NULL },                               /* 0x58 */
737     { 0x0059,    0,    0, NULL },                               /* 0x59 */
738     { 0x005A,    0,    0, NULL },                               /* 0x5A */
739     { 0x005B,    0,    0, NULL },                               /* 0x5B */
740     { 0x005C,    0,    0, NULL },                               /* 0x5C */
741     { 0x005D,    0,    0, NULL },                               /* 0x5D */
742     { 0x005E,    0,    0, NULL },                               /* 0x5E */
743     { 0x005F,    0,    0, NULL },                               /* 0x5F */
744     { 0x0060,    0,    0, NULL },                               /* 0x60 */
745     { 0x0061,    0,    0, NULL },                               /* 0x61 */
746     { 0x0062,    0,    0, NULL },                               /* 0x62 */
747     { 0x0063,    0,    0, NULL },                               /* 0x63 */
748     { 0x0064,    0,    0, NULL },                               /* 0x64 */
749     { 0x0065,    0,    0, NULL },                               /* 0x65 */
750     { 0x0066,    0,    0, NULL },                               /* 0x66 */
751     { 0x0067,    0,    0, NULL },                               /* 0x67 */
752     { 0x0068,    0,    0, NULL },                               /* 0x68 */
753     { 0x0069,    0,    0, NULL },                               /* 0x69 */
754     { 0x006A,    0,    0, NULL },                               /* 0x6A */
755     { 0x006B,    0,    0, NULL },                               /* 0x6B */
756     { 0x006C,    0,    0, NULL },                               /* 0x6C */
757     { 0x006D,    0,    0, NULL },                               /* 0x6D */
758     { 0x006E,    0,    0, NULL },                               /* 0x6E */
759     { 0x006F,    0,    0, NULL },                               /* 0x6F */
760     { 0x0070,    0,    0, NULL },                               /* 0x70 */
761     { 0x0071,    0,    0, NULL },                               /* 0x71 */
762     { 0x0072,    0,    0, NULL },                               /* 0x72 */
763     { 0x0073,    0,    0, NULL },                               /* 0x73 */
764     { 0x0074,    0,    0, NULL },                               /* 0x74 */
765     { 0x0075,    0,    0, NULL },                               /* 0x75 */
766     { 0x0076,    0,    0, NULL },                               /* 0x76 */
767     { 0x0077,    0,    0, NULL },                               /* 0x77 */
768     { 0x0078,    0,    0, NULL },                               /* 0x78 */
769     { 0x0079,    0,    0, NULL },                               /* 0x79 */
770     { 0x007A,    0,    0, NULL },                               /* 0x7A */
771     { 0x007B,    0,    0, NULL },                               /* 0x7B */
772     { 0x007C,    0,    0, NULL },                               /* 0x7C */
773     { 0x007D,    0,    0, NULL },                               /* 0x7D */
774     { 0x007E,    0,    0, NULL },                               /* 0x7E */
775     { 0x007F,    0,    0, NULL },                               /* 0x7F */
776     { 0x20AC,    0,    0, NULL },                               /* 0x80 */
777     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x81 */ /* We convert this as double byte */
778     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x82 */ /* We convert this as double byte */
779     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x83 */ /* We convert this as double byte */
780     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x84 */ /* We convert this as double byte */
781     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x85 */ /* We convert this as double byte */
782     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x86 */ /* We convert this as double byte */
783     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x87 */ /* We convert this as double byte */
784     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x88 */ /* We convert this as double byte */
785     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x89 */ /* We convert this as double byte */
786     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8A */ /* We convert this as double byte */
787     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8B */ /* We convert this as double byte */
788     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8C */ /* We convert this as double byte */
789     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8D */ /* We convert this as double byte */
790     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8E */ /* We convert this as double byte */
791     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8F */ /* We convert this as double byte */
792     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x90 */ /* We convert this as double byte */
793     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x91 */ /* We convert this as double byte */
794     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x92 */ /* We convert this as double byte */
795     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x93 */ /* We convert this as double byte */
796     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x94 */ /* We convert this as double byte */
797     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x95 */ /* We convert this as double byte */
798     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x96 */ /* We convert this as double byte */
799     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x97 */ /* We convert this as double byte */
800     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x98 */ /* We convert this as double byte */
801     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x99 */ /* We convert this as double byte */
802     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9A */ /* We convert this as double byte */
803     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9B */ /* We convert this as double byte */
804     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9C */ /* We convert this as double byte */
805     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9D */ /* We convert this as double byte */
806     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9E */ /* We convert this as double byte */
807     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9F */ /* We convert this as double byte */
808     {      0,    1,    0, NULL },                               /* 0xA0 */
809     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GB_A1 },            /* 0xA1 */
810     {      0, 0xA1, 0xFC, aImplDBCSToUniTab_GB_A2 },            /* 0xA2 */
811     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GB_A3 },            /* 0xA3 */
812     {      0, 0xA1, 0xF3, aImplDBCSToUniTab_GB_A4 },            /* 0xA4 */
813     {      0, 0xA1, 0xF6, aImplDBCSToUniTab_GB_A5 },            /* 0xA5 */
814     {      0, 0xA1, 0xF5, aImplDBCSToUniTab_GB_A6 },            /* 0xA6 */
815     {      0, 0xA1, 0xF1, aImplDBCSToUniTab_GB_A7 },            /* 0xA7 */
816     {      0, 0xA1, 0xE9, aImplDBCSToUniTab_GBK_A8+GBKOFF },    /* 0xA8 */
817     {      0, 0xA1, 0xEF, aImplDBCSToUniTab_GBK_A9+GBKOFF },    /* 0xA9 */
818     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAA */ /* We convert this as double byte */
819     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAB */ /* We convert this as double byte */
820     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAC */ /* We convert this as double byte */
821     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAD */ /* We convert this as double byte */
822     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAE */ /* We convert this as double byte */
823     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAF */ /* We convert this as double byte */
824     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_B0 },           /* 0xB0 */
825     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_B1 },           /* 0xB1 */
826     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_B2 },           /* 0xB2 */
827     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_B3 },           /* 0xB3 */
828     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_B4 },           /* 0xB4 */
829     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_B5 },           /* 0xB5 */
830     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_B6 },           /* 0xB6 */
831     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_B7 },           /* 0xB7 */
832     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_B8 },           /* 0xB8 */
833     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_B9 },           /* 0xB9 */
834     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_BA },           /* 0xBA */
835     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_BB },           /* 0xBB */
836     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_BC },           /* 0xBC */
837     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_BD },           /* 0xBD */
838     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_BE },           /* 0xBE */
839     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_BF },           /* 0xBF */
840     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_C0 },           /* 0xC0 */
841     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_C1 },           /* 0xC1 */
842     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_C2 },           /* 0xC2 */
843     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_C3 },           /* 0xC3 */
844     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_C4 },           /* 0xC4 */
845     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_C5 },           /* 0xC5 */
846     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_C6 },           /* 0xC6 */
847     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_C7 },           /* 0xC7 */
848     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_C8 },           /* 0xC8 */
849     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_C9 },           /* 0xC9 */
850     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_CA },           /* 0xCA */
851     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_CB },           /* 0xCB */
852     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_CC },           /* 0xCC */
853     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_CD },           /* 0xCD */
854     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_CE },           /* 0xCE */
855     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_CF },           /* 0xCF */
856     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_D0 },           /* 0xD0 */
857     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_D1 },           /* 0xD1 */
858     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_D2 },           /* 0xD2 */
859     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_D3 },           /* 0xD3 */
860     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_D4 },           /* 0xD4 */
861     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_D5 },           /* 0xD5 */
862     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_D6 },           /* 0xD6 */
863     {      0, 0xA1, 0xF9, aImplDBCSToUniTab_GBT_D7 },           /* 0xD7 */
864     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_D8 },           /* 0xD8 */
865     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_D9 },           /* 0xD9 */
866     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_DA },           /* 0xDA */
867     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_DB },           /* 0xDB */
868     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_DC },           /* 0xDC */
869     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_DD },           /* 0xDD */
870     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_DE },           /* 0xDE */
871     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_DF },           /* 0xDF */
872     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_E0 },           /* 0xE0 */
873     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_E1 },           /* 0xE1 */
874     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_E2 },           /* 0xE2 */
875     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_E3 },           /* 0xE3 */
876     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_E4 },           /* 0xE4 */
877     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_E5 },           /* 0xE5 */
878     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_E6 },           /* 0xE6 */
879     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_E7 },           /* 0xE7 */
880     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_E8 },           /* 0xE8 */
881     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_E9 },           /* 0xE9 */
882     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_EA },           /* 0xEA */
883     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_EB },           /* 0xEB */
884     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_EC },           /* 0xEC */
885     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_ED },           /* 0xED */
886     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_EE },           /* 0xEE */
887     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_EF },           /* 0xEF */
888     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_F0 },           /* 0xF0 */
889     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_F1 },           /* 0xF1 */
890     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_F2 },           /* 0xF2 */
891     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_F3 },           /* 0xF3 */
892     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_F4 },           /* 0xF4 */
893     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_F5 },           /* 0xF5 */
894     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_F6 },           /* 0xF6 */
895     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_F7 },           /* 0xF7 */
896     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBT_F8 },           /* 0xF8 */
897     {      0, 0xA1, 0xA9, aImplDBCSToUniTab_GBT_F9 },           /* 0xF9 */
898     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFA */ /* We convert this as double byte */
899     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFB */ /* We convert this as double byte */
900     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFC */ /* We convert this as double byte */
901     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFD */ /* We convert this as double byte */
902     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFE */ /* We convert this as double byte */
903     {      0,    1,    0, NULL }                                /* 0xFF */
906 /* ----------------------------------------------------------------------- */
908 static ImplUniToDBCSHighTab const aGBT12345DBCSHighTab[256] =
910     { 0x00, 0xFC, aImplUniToDBCSTab_GB_00 },                    /* 0x00 */
911     { 0x01, 0xDC, aImplUniToDBCSTab_GB_01 },                    /* 0x01 */
912     { 0x51, 0xC9, aImplUniToDBCSTab_GB_02 },                    /* 0x02 */
913     { 0x91, 0xC9, aImplUniToDBCSTab_GB_03 },                    /* 0x03 */
914     { 0x01, 0x51, aImplUniToDBCSTab_GB_04 },                    /* 0x04 */
915     {    1,    0, NULL },                                       /* 0x05 */
916     {    1,    0, NULL },                                       /* 0x06 */
917     {    1,    0, NULL },                                       /* 0x07 */
918     {    1,    0, NULL },                                       /* 0x08 */
919     {    1,    0, NULL },                                       /* 0x09 */
920     {    1,    0, NULL },                                       /* 0x0A */
921     {    1,    0, NULL },                                       /* 0x0B */
922     {    1,    0, NULL },                                       /* 0x0C */
923     {    1,    0, NULL },                                       /* 0x0D */
924     {    1,    0, NULL },                                       /* 0x0E */
925     {    1,    0, NULL },                                       /* 0x0F */
926     {    1,    0, NULL },                                       /* 0x10 */
927     {    1,    0, NULL },                                       /* 0x11 */
928     {    1,    0, NULL },                                       /* 0x12 */
929     {    1,    0, NULL },                                       /* 0x13 */
930     {    1,    0, NULL },                                       /* 0x14 */
931     {    1,    0, NULL },                                       /* 0x15 */
932     {    1,    0, NULL },                                       /* 0x16 */
933     {    1,    0, NULL },                                       /* 0x17 */
934     {    1,    0, NULL },                                       /* 0x18 */
935     {    1,    0, NULL },                                       /* 0x19 */
936     {    1,    0, NULL },                                       /* 0x1A */
937     {    1,    0, NULL },                                       /* 0x1B */
938     {    1,    0, NULL },                                       /* 0x1C */
939     {    1,    0, NULL },                                       /* 0x1D */
940     { 0x3F, 0x3F, aImplUniToDBCSTab_APPLECHINSIMP_1E },         /* 0x1E */ /* we convert this char also to unicode */
941     {    1,    0, NULL },                                       /* 0x1F */
942     { 0x14, 0xAC, aImplUniToDBCSTab_GB_20 },                    /* 0x20 */
943     { 0x03, 0x93, aImplUniToDBCSTab_GB_21 },                    /* 0x21 */
944     { 0x08, 0xEF, aImplUniToDBCSTab_GB_22 },                    /* 0x22 */
945     { 0x12, 0x12, aImplUniToDBCSTab_GB_23 },                    /* 0x23 */
946     { 0x60, 0x9B, aImplUniToDBCSTab_GB_24 },                    /* 0x24 */
947     { 0x00, 0xCF, aImplUniToDBCSTab_GB_25 },                    /* 0x25 */
948     { 0x05, 0x42, aImplUniToDBCSTab_GB_26 },                    /* 0x26 */
949     {    1,    0, NULL },                                       /* 0x27 */
950     {    1,    0, NULL },                                       /* 0x28 */
951     {    1,    0, NULL },                                       /* 0x29 */
952     {    1,    0, NULL },                                       /* 0x2A */
953     {    1,    0, NULL },                                       /* 0x2B */
954     {    1,    0, NULL },                                       /* 0x2C */
955     {    1,    0, NULL },                                       /* 0x2D */
956     {    1,    0, NULL },                                       /* 0x2E */
957     {    1,    0, NULL },                                       /* 0x2F */
958     { 0x00, 0xFB, aImplUniToDBCSTab_GB_30 },                    /* 0x30 */
959     { 0x05, 0x29, aImplUniToDBCSTab_GB_31 },                    /* 0x31 */
960     { 0x20, 0x29, aImplUniToDBCSTab_GBK_32 },                   /* 0x32 */
961     {    1,    0, NULL },                                       /* 0x33 */
962     {    1,    0, NULL },                                       /* 0x34 */
963     {    1,    0, NULL },                                       /* 0x35 */
964     {    1,    0, NULL },                                       /* 0x36 */
965     {    1,    0, NULL },                                       /* 0x37 */
966     {    1,    0, NULL },                                       /* 0x38 */
967     {    1,    0, NULL },                                       /* 0x39 */
968     {    1,    0, NULL },                                       /* 0x3A */
969     {    1,    0, NULL },                                       /* 0x3B */
970     {    1,    0, NULL },                                       /* 0x3C */
971     {    1,    0, NULL },                                       /* 0x3D */
972     {    1,    0, NULL },                                       /* 0x3E */
973     {    1,    0, NULL },                                       /* 0x3F */
974     {    1,    0, NULL },                                       /* 0x40 */
975     {    1,    0, NULL },                                       /* 0x41 */
976     {    1,    0, NULL },                                       /* 0x42 */
977     {    1,    0, NULL },                                       /* 0x43 */
978     {    1,    0, NULL },                                       /* 0x44 */
979     {    1,    0, NULL },                                       /* 0x45 */
980     {    1,    0, NULL },                                       /* 0x46 */
981     {    1,    0, NULL },                                       /* 0x47 */
982     {    1,    0, NULL },                                       /* 0x48 */
983     {    1,    0, NULL },                                       /* 0x49 */
984     {    1,    0, NULL },                                       /* 0x4A */
985     {    1,    0, NULL },                                       /* 0x4B */
986     {    1,    0, NULL },                                       /* 0x4C */
987     {    1,    0, NULL },                                       /* 0x4D */
988     { 0x00, 0xFF, aImplUniToDBCSTab_GBT_4E },                   /* 0x4E */
989     { 0x01, 0xFE, aImplUniToDBCSTab_GBT_4F },                   /* 0x4F */
990     { 0x00, 0xFB, aImplUniToDBCSTab_GBT_50 },                   /* 0x50 */
991     { 0x00, 0xFD, aImplUniToDBCSTab_GBT_51 },                   /* 0x51 */
992     { 0x00, 0xFF, aImplUniToDBCSTab_GBT_52 },                   /* 0x52 */
993     { 0x00, 0xFC, aImplUniToDBCSTab_GBT_53 },                   /* 0x53 */
994     { 0x01, 0xFF, aImplUniToDBCSTab_GBT_54 },                   /* 0x54 */
995     { 0x01, 0xFE, aImplUniToDBCSTab_GBT_55 },                   /* 0x55 */
996     { 0x00, 0xFF, aImplUniToDBCSTab_GBT_56 },                   /* 0x56 */
997     { 0x03, 0xFD, aImplUniToDBCSTab_GBT_57 },                   /* 0x57 */
998     { 0x00, 0xFD, aImplUniToDBCSTab_GBT_58 },                   /* 0x58 */
999     { 0x02, 0xFF, aImplUniToDBCSTab_GBT_59 },                   /* 0x59 */
1000     { 0x01, 0xFB, aImplUniToDBCSTab_GBT_5A },                   /* 0x5A */
1001     { 0x00, 0xFA, aImplUniToDBCSTab_GBT_5B },                   /* 0x5B */
1002     { 0x01, 0xFD, aImplUniToDBCSTab_GBT_5C },                   /* 0x5C */
1003     { 0x06, 0xFE, aImplUniToDBCSTab_GBT_5D },                   /* 0x5D */
1004     { 0x02, 0xFF, aImplUniToDBCSTab_GBT_5E },                   /* 0x5E */
1005     { 0x01, 0xFF, aImplUniToDBCSTab_GBT_5F },                   /* 0x5F */
1006     { 0x0A, 0xFB, aImplUniToDBCSTab_GBT_60 },                   /* 0x60 */
1007     { 0x00, 0xFF, aImplUniToDBCSTab_GBT_61 },                   /* 0x61 */
1008     { 0x00, 0xFF, aImplUniToDBCSTab_GBT_62 },                   /* 0x62 */
1009     { 0x01, 0xF8, aImplUniToDBCSTab_GBT_63 },                   /* 0x63 */
1010     { 0x0B, 0xFE, aImplUniToDBCSTab_GBT_64 },                   /* 0x64 */
1011     { 0x00, 0xFA, aImplUniToDBCSTab_GBT_65 },                   /* 0x65 */
1012     { 0x00, 0xFF, aImplUniToDBCSTab_GBT_66 },                   /* 0x66 */
1013     { 0x00, 0xFF, aImplUniToDBCSTab_GBT_67 },                   /* 0x67 */
1014     { 0x00, 0xFC, aImplUniToDBCSTab_GBT_68 },                   /* 0x68 */
1015     { 0x01, 0xFF, aImplUniToDBCSTab_GBT_69 },                   /* 0x69 */
1016     { 0x01, 0xFB, aImplUniToDBCSTab_GBT_6A },                   /* 0x6A */
1017     { 0x04, 0xFF, aImplUniToDBCSTab_GBT_6B },                   /* 0x6B */
1018     { 0x05, 0xF5, aImplUniToDBCSTab_GBT_6C },                   /* 0x6C */
1019     { 0x04, 0xFC, aImplUniToDBCSTab_GBT_6D },                   /* 0x6D */
1020     { 0x05, 0xFF, aImplUniToDBCSTab_GBT_6E },                   /* 0x6E */
1021     { 0x01, 0xFE, aImplUniToDBCSTab_GBT_6F },                   /* 0x6F */
1022     { 0x05, 0xFD, aImplUniToDBCSTab_GBT_70 },                   /* 0x70 */
1023     { 0x09, 0xFE, aImplUniToDBCSTab_GBT_71 },                   /* 0x71 */
1024     { 0x06, 0xFD, aImplUniToDBCSTab_GBT_72 },                   /* 0x72 */
1025     { 0x01, 0xFE, aImplUniToDBCSTab_GBT_73 },                   /* 0x73 */
1026     { 0x03, 0xFF, aImplUniToDBCSTab_GBT_74 },                   /* 0x74 */
1027     { 0x04, 0xFF, aImplUniToDBCSTab_GBT_75 },                   /* 0x75 */
1028     { 0x00, 0xFE, aImplUniToDBCSTab_GBT_76 },                   /* 0x76 */
1029     { 0x01, 0xFD, aImplUniToDBCSTab_GBT_77 },                   /* 0x77 */
1030     { 0x02, 0xFD, aImplUniToDBCSTab_GBT_78 },                   /* 0x78 */
1031     { 0x01, 0xFB, aImplUniToDBCSTab_GBT_79 },                   /* 0x79 */
1032     { 0x00, 0xFF, aImplUniToDBCSTab_GBT_7A },                   /* 0x7A */
1033     { 0x04, 0xFE, aImplUniToDBCSTab_GBT_7B },                   /* 0x7B */
1034     { 0x00, 0xFE, aImplUniToDBCSTab_GBT_7C },                   /* 0x7C */
1035     { 0x00, 0xFB, aImplUniToDBCSTab_GBT_7D },                   /* 0x7D */
1036     { 0x08, 0x9C, aImplUniToDBCSTab_GBT_7E },                   /* 0x7E */
1037     { 0x36, 0xFC, aImplUniToDBCSTab_GBT_7F },                   /* 0x7F */
1038     { 0x00, 0xFD, aImplUniToDBCSTab_GBT_80 },                   /* 0x80 */
1039     { 0x02, 0xFE, aImplUniToDBCSTab_GBT_81 },                   /* 0x81 */
1040     { 0x00, 0xFB, aImplUniToDBCSTab_GBT_82 },                   /* 0x82 */
1041     { 0x01, 0xFD, aImplUniToDBCSTab_GBT_83 },                   /* 0x83 */
1042     { 0x01, 0xFF, aImplUniToDBCSTab_GBT_84 },                   /* 0x84 */
1043     { 0x0C, 0xFF, aImplUniToDBCSTab_GBT_85 },                   /* 0x85 */
1044     { 0x04, 0xFE, aImplUniToDBCSTab_GBT_86 },                   /* 0x86 */
1045     { 0x00, 0xFE, aImplUniToDBCSTab_GBT_87 },                   /* 0x87 */
1046     { 0x03, 0xFE, aImplUniToDBCSTab_GBT_88 },                   /* 0x88 */
1047     { 0x02, 0xF8, aImplUniToDBCSTab_GBT_89 },                   /* 0x89 */
1048     { 0x00, 0xFE, aImplUniToDBCSTab_GBT_8A },                   /* 0x8A */
1049     { 0x00, 0xFE, aImplUniToDBCSTab_GBT_8B },                   /* 0x8B */
1050     { 0x07, 0xFE, aImplUniToDBCSTab_GBT_8C },                   /* 0x8C */
1051     { 0x04, 0xFD, aImplUniToDBCSTab_GBT_8D },                   /* 0x8D */
1052     { 0x05, 0xFE, aImplUniToDBCSTab_GBT_8E },                   /* 0x8E */
1053     { 0x03, 0xFD, aImplUniToDBCSTab_GBT_8F },                   /* 0x8F */
1054     { 0x00, 0xFE, aImplUniToDBCSTab_GBT_90 },                   /* 0x90 */
1055     { 0x02, 0xFA, aImplUniToDBCSTab_GBT_91 },                   /* 0x91 */
1056     { 0x00, 0xFC, aImplUniToDBCSTab_GBT_92 },                   /* 0x92 */
1057     { 0x01, 0xF9, aImplUniToDBCSTab_GBT_93 },                   /* 0x93 */
1058     { 0x03, 0x7F, aImplUniToDBCSTab_GBT_94 },                   /* 0x94 */
1059     { 0x77, 0xE5, aImplUniToDBCSTab_GBT_95 },                   /* 0x95 */
1060     { 0x1C, 0xFB, aImplUniToDBCSTab_GBT_96 },                   /* 0x96 */
1061     { 0x00, 0xFF, aImplUniToDBCSTab_GBT_97 },                   /* 0x97 */
1062     { 0x01, 0xFE, aImplUniToDBCSTab_GBT_98 },                   /* 0x98 */
1063     { 0x03, 0xFF, aImplUniToDBCSTab_GBT_99 },                   /* 0x99 */
1064     { 0x01, 0xFB, aImplUniToDBCSTab_GBT_9A },                   /* 0x9A */
1065     { 0x03, 0xFF, aImplUniToDBCSTab_GBT_9B },                   /* 0x9B */
1066     { 0x08, 0xF6, aImplUniToDBCSTab_GBT_9C },                   /* 0x9C */
1067     { 0x06, 0xFA, aImplUniToDBCSTab_GBT_9D },                   /* 0x9D */
1068     { 0x0C, 0xFF, aImplUniToDBCSTab_GBT_9E },                   /* 0x9E */
1069     { 0x09, 0xA0, aImplUniToDBCSTab_GBT_9F },                   /* 0x9F */
1070     {    1,    0, NULL },                                       /* 0xA0 */
1071     {    1,    0, NULL },                                       /* 0xA1 */
1072     {    1,    0, NULL },                                       /* 0xA2 */
1073     {    1,    0, NULL },                                       /* 0xA3 */
1074     {    1,    0, NULL },                                       /* 0xA4 */
1075     {    1,    0, NULL },                                       /* 0xA5 */
1076     {    1,    0, NULL },                                       /* 0xA6 */
1077     {    1,    0, NULL },                                       /* 0xA7 */
1078     {    1,    0, NULL },                                       /* 0xA8 */
1079     {    1,    0, NULL },                                       /* 0xA9 */
1080     {    1,    0, NULL },                                       /* 0xAA */
1081     {    1,    0, NULL },                                       /* 0xAB */
1082     {    1,    0, NULL },                                       /* 0xAC */
1083     {    1,    0, NULL },                                       /* 0xAD */
1084     {    1,    0, NULL },                                       /* 0xAE */
1085     {    1,    0, NULL },                                       /* 0xAF */
1086     {    1,    0, NULL },                                       /* 0xB0 */
1087     {    1,    0, NULL },                                       /* 0xB1 */
1088     {    1,    0, NULL },                                       /* 0xB2 */
1089     {    1,    0, NULL },                                       /* 0xB3 */
1090     {    1,    0, NULL },                                       /* 0xB4 */
1091     {    1,    0, NULL },                                       /* 0xB5 */
1092     {    1,    0, NULL },                                       /* 0xB6 */
1093     {    1,    0, NULL },                                       /* 0xB7 */
1094     {    1,    0, NULL },                                       /* 0xB8 */
1095     {    1,    0, NULL },                                       /* 0xB9 */
1096     {    1,    0, NULL },                                       /* 0xBA */
1097     {    1,    0, NULL },                                       /* 0xBB */
1098     {    1,    0, NULL },                                       /* 0xBC */
1099     {    1,    0, NULL },                                       /* 0xBD */
1100     {    1,    0, NULL },                                       /* 0xBE */
1101     {    1,    0, NULL },                                       /* 0xBF */
1102     {    1,    0, NULL },                                       /* 0xC0 */
1103     {    1,    0, NULL },                                       /* 0xC1 */
1104     {    1,    0, NULL },                                       /* 0xC2 */
1105     {    1,    0, NULL },                                       /* 0xC3 */
1106     {    1,    0, NULL },                                       /* 0xC4 */
1107     {    1,    0, NULL },                                       /* 0xC5 */
1108     {    1,    0, NULL },                                       /* 0xC6 */
1109     {    1,    0, NULL },                                       /* 0xC7 */
1110     {    1,    0, NULL },                                       /* 0xC8 */
1111     {    1,    0, NULL },                                       /* 0xC9 */
1112     {    1,    0, NULL },                                       /* 0xCA */
1113     {    1,    0, NULL },                                       /* 0xCB */
1114     {    1,    0, NULL },                                       /* 0xCC */
1115     {    1,    0, NULL },                                       /* 0xCD */
1116     {    1,    0, NULL },                                       /* 0xCE */
1117     {    1,    0, NULL },                                       /* 0xCF */
1118     {    1,    0, NULL },                                       /* 0xD0 */
1119     {    1,    0, NULL },                                       /* 0xD1 */
1120     {    1,    0, NULL },                                       /* 0xD2 */
1121     {    1,    0, NULL },                                       /* 0xD3 */
1122     {    1,    0, NULL },                                       /* 0xD4 */
1123     {    1,    0, NULL },                                       /* 0xD5 */
1124     {    1,    0, NULL },                                       /* 0xD6 */
1125     {    1,    0, NULL },                                       /* 0xD7 */
1126     {    1,    0, NULL },                                       /* 0xD8 */
1127     {    1,    0, NULL },                                       /* 0xD9 */
1128     {    1,    0, NULL },                                       /* 0xDA */
1129     {    1,    0, NULL },                                       /* 0xDB */
1130     {    1,    0, NULL },                                       /* 0xDC */
1131     {    1,    0, NULL },                                       /* 0xDD */
1132     {    1,    0, NULL },                                       /* 0xDE */
1133     {    1,    0, NULL },                                       /* 0xDF */
1134     {    1,    0, NULL },                                       /* 0xE0 */
1135     {    1,    0, NULL },                                       /* 0xE1 */
1136     {    1,    0, NULL },                                       /* 0xE2 */
1137     {    1,    0, NULL },                                       /* 0xE3 */
1138     {    1,    0, NULL },                                       /* 0xE4 */
1139     {    1,    0, NULL },                                       /* 0xE5 */
1140     {    1,    0, NULL },                                       /* 0xE6 */
1141     {    1,    0, NULL },                                       /* 0xE7 */
1142     {    1,    0, NULL },                                       /* 0xE8 */
1143     {    1,    0, NULL },                                       /* 0xE9 */
1144     {    1,    0, NULL },                                       /* 0xEA */
1145     {    1,    0, NULL },                                       /* 0xEB */
1146     {    1,    0, NULL },                                       /* 0xEC */
1147     {    1,    0, NULL },                                       /* 0xED */
1148     {    1,    0, NULL },                                       /* 0xEE */
1149     {    1,    0, NULL },                                       /* 0xEF */
1150     {    1,    0, NULL },                                       /* 0xF0 */
1151     {    1,    0, NULL },                                       /* 0xF1 */
1152     {    1,    0, NULL },                                       /* 0xF2 */
1153     {    1,    0, NULL },                                       /* 0xF3 */
1154     {    1,    0, NULL },                                       /* 0xF4 */
1155     {    1,    0, NULL },                                       /* 0xF5 */
1156     {    1,    0, NULL },                                       /* 0xF6 */
1157     {    1,    0, NULL },                                       /* 0xF7 */
1158     {    1,    0, NULL },                                       /* 0xF8 */
1159     {    1,    0, NULL },                                       /* 0xF9 */
1160     {    1,    0, NULL },                                       /* 0xFA */
1161     {    1,    0, NULL },                                       /* 0xFB */
1162     {    1,    0, NULL },                                       /* 0xFC */
1163     {    1,    0, NULL },                                       /* 0xFD */
1164     { 0x31, 0x44, aImplUniToDBCSTab_GB_FE },                    /* 0xFE */
1165     { 0x01, 0xE5, aImplUniToDBCSTab_GB_FF }                     /* 0xFF */
1168 /* ----------------------------------------------------------------------- */
1170 static ImplDBCSConvertData const aImplGBT12345DBCSCvtData =
1172     aGBT12345UniLeadTab,
1173     aGBT12345DBCSHighTab,
1174     0x00, 0xFF,
1175     0xA1, 0xFE,
1176     aImplMS936DBCSEUDCTab,
1177     DBCS_EUDC_MS936_COUNT
1180 /* ----------------------------------------------------------------------- */
1182 static ImplTextEncodingData const aImplGBT12345TextEncodingData
1183     = { { &aImplGBT12345DBCSCvtData,
1184           ImplDBCSToUnicode,
1185           ImplUnicodeToDBCS,
1186           NULL,
1187           NULL,
1188           NULL,
1189           NULL,
1190           NULL,
1191           NULL },
1192         1,
1193         2,
1194         2,
1195         134,
1196         "euc-cn",
1197         "cn-gb-12345",
1198         RTL_TEXTENCODING_INFO_ASCII
1199             | RTL_TEXTENCODING_INFO_MULTIBYTE
1200             | RTL_TEXTENCODING_INFO_MIME };
1201     /* SCRIPT_CHINESE_SIMPLIFIED, pc code page 936, mac encoding 25 */
1203 /* ======================================================================= */
1205 /* #100054# In the GBK range FE50--FEA0, added those mappings (in both
1206    directions) taken from GB-18030 that do not map to Unicode PUA (i.e., those
1207    mappings marked with an * below):
1209    FE50 -> U+2E81 *
1210    FE51 -> U+E816
1211    FE52 -> U+E817
1212    FE53 -> U+E818
1213    FE54 -> U+2E84 *
1214    FE55 -> U+3473 *
1215    FE56 -> U+3447 *
1216    FE57 -> U+2E88 *
1217    FE58 -> U+2E8B *
1218    FE59 -> U+E81E
1219    FE5A -> U+359E *
1220    FE5B -> U+361A *
1221    FE5C -> U+360E *
1222    FE5D -> U+2E8C *
1223    FE5E -> U+2E97 *
1224    FE5F -> U+396E *
1225    FE60 -> U+3918 *
1226    FE61 -> U+E826
1227    FE62 -> U+39CF *
1228    FE63 -> U+39DF *
1229    FE64 -> U+3A73 *
1230    FE65 -> U+39D0 *
1231    FE66 -> U+E82B
1232    FE67 -> U+E82C
1233    FE68 -> U+3B4E *
1234    FE69 -> U+3C6E *
1235    FE6A -> U+3CE0 *
1236    FE6B -> U+2EA7 *
1237    FE6C -> U+E831
1238    FE6D -> U+E832
1239    FE6E -> U+2EAA *
1240    FE6F -> U+4056 *
1241    FE70 -> U+415F *
1242    FE71 -> U+2EAE *
1243    FE72 -> U+4337 *
1244    FE73 -> U+2EB3 *
1245    FE74 -> U+2EB6 *
1246    FE75 -> U+2EB7 *
1247    FE76 -> U+E83B
1248    FE77 -> U+43B1 *
1249    FE78 -> U+43AC *
1250    FE79 -> U+2EBB *
1251    FE7A -> U+43DD *
1252    FE7B -> U+44D6 *
1253    FE7C -> U+4661 *
1254    FE7D -> U+464C *
1255    FE7E -> U+E843
1256    FE80 -> U+4723 *
1257    FE81 -> U+4729 *
1258    FE82 -> U+477C *
1259    FE83 -> U+478D *
1260    FE84 -> U+2ECA *
1261    FE85 -> U+4947 *
1262    FE86 -> U+497A *
1263    FE87 -> U+497D *
1264    FE88 -> U+4982 *
1265    FE89 -> U+4983 *
1266    FE8A -> U+4985 *
1267    FE8B -> U+4986 *
1268    FE8C -> U+499F *
1269    FE8D -> U+499B *
1270    FE8E -> U+49B7 *
1271    FE8F -> U+49B6 *
1272    FE90 -> U+E854
1273    FE91 -> U+E855
1274    FE92 -> U+4CA3 *
1275    FE93 -> U+4C9F *
1276    FE94 -> U+4CA0 *
1277    FE95 -> U+4CA1 *
1278    FE96 -> U+4C77 *
1279    FE97 -> U+4CA2 *
1280    FE98 -> U+4D13 *
1281    FE99 -> U+4D14 *
1282    FE9A -> U+4D15 *
1283    FE9B -> U+4D16 *
1284    FE9C -> U+4D17 *
1285    FE9D -> U+4D18 *
1286    FE9E -> U+4D19 *
1287    FE9F -> U+4DAE *
1288    FEA0 -> U+E864
1291 static ImplDBCSToUniLeadTab const aGBKUniLeadTab[256] =
1293     { 0x0000,    0,    0, NULL },                               /* 0x00 */
1294     { 0x0001,    0,    0, NULL },                               /* 0x01 */
1295     { 0x0002,    0,    0, NULL },                               /* 0x02 */
1296     { 0x0003,    0,    0, NULL },                               /* 0x03 */
1297     { 0x0004,    0,    0, NULL },                               /* 0x04 */
1298     { 0x0005,    0,    0, NULL },                               /* 0x05 */
1299     { 0x0006,    0,    0, NULL },                               /* 0x06 */
1300     { 0x0007,    0,    0, NULL },                               /* 0x07 */
1301     { 0x0008,    0,    0, NULL },                               /* 0x08 */
1302     { 0x0009,    0,    0, NULL },                               /* 0x09 */
1303     { 0x000A,    0,    0, NULL },                               /* 0x0A */
1304     { 0x000B,    0,    0, NULL },                               /* 0x0B */
1305     { 0x000C,    0,    0, NULL },                               /* 0x0C */
1306     { 0x000D,    0,    0, NULL },                               /* 0x0D */
1307     { 0x000E,    0,    0, NULL },                               /* 0x0E */
1308     { 0x000F,    0,    0, NULL },                               /* 0x0F */
1309     { 0x0010,    0,    0, NULL },                               /* 0x10 */
1310     { 0x0011,    0,    0, NULL },                               /* 0x11 */
1311     { 0x0012,    0,    0, NULL },                               /* 0x12 */
1312     { 0x0013,    0,    0, NULL },                               /* 0x13 */
1313     { 0x0014,    0,    0, NULL },                               /* 0x14 */
1314     { 0x0015,    0,    0, NULL },                               /* 0x15 */
1315     { 0x0016,    0,    0, NULL },                               /* 0x16 */
1316     { 0x0017,    0,    0, NULL },                               /* 0x17 */
1317     { 0x0018,    0,    0, NULL },                               /* 0x18 */
1318     { 0x0019,    0,    0, NULL },                               /* 0x19 */
1319     { 0x001A,    0,    0, NULL },                               /* 0x1A */
1320     { 0x001B,    0,    0, NULL },                               /* 0x1B */
1321     { 0x001C,    0,    0, NULL },                               /* 0x1C */
1322     { 0x001D,    0,    0, NULL },                               /* 0x1D */
1323     { 0x001E,    0,    0, NULL },                               /* 0x1E */
1324     { 0x001F,    0,    0, NULL },                               /* 0x1F */
1325     { 0x0020,    0,    0, NULL },                               /* 0x20 */
1326     { 0x0021,    0,    0, NULL },                               /* 0x21 */
1327     { 0x0022,    0,    0, NULL },                               /* 0x22 */
1328     { 0x0023,    0,    0, NULL },                               /* 0x23 */
1329     { 0x0024,    0,    0, NULL },                               /* 0x24 */
1330     { 0x0025,    0,    0, NULL },                               /* 0x25 */
1331     { 0x0026,    0,    0, NULL },                               /* 0x26 */
1332     { 0x0027,    0,    0, NULL },                               /* 0x27 */
1333     { 0x0028,    0,    0, NULL },                               /* 0x28 */
1334     { 0x0029,    0,    0, NULL },                               /* 0x29 */
1335     { 0x002A,    0,    0, NULL },                               /* 0x2A */
1336     { 0x002B,    0,    0, NULL },                               /* 0x2B */
1337     { 0x002C,    0,    0, NULL },                               /* 0x2C */
1338     { 0x002D,    0,    0, NULL },                               /* 0x2D */
1339     { 0x002E,    0,    0, NULL },                               /* 0x2E */
1340     { 0x002F,    0,    0, NULL },                               /* 0x2F */
1341     { 0x0030,    0,    0, NULL },                               /* 0x30 */
1342     { 0x0031,    0,    0, NULL },                               /* 0x31 */
1343     { 0x0032,    0,    0, NULL },                               /* 0x32 */
1344     { 0x0033,    0,    0, NULL },                               /* 0x33 */
1345     { 0x0034,    0,    0, NULL },                               /* 0x34 */
1346     { 0x0035,    0,    0, NULL },                               /* 0x35 */
1347     { 0x0036,    0,    0, NULL },                               /* 0x36 */
1348     { 0x0037,    0,    0, NULL },                               /* 0x37 */
1349     { 0x0038,    0,    0, NULL },                               /* 0x38 */
1350     { 0x0039,    0,    0, NULL },                               /* 0x39 */
1351     { 0x003A,    0,    0, NULL },                               /* 0x3A */
1352     { 0x003B,    0,    0, NULL },                               /* 0x3B */
1353     { 0x003C,    0,    0, NULL },                               /* 0x3C */
1354     { 0x003D,    0,    0, NULL },                               /* 0x3D */
1355     { 0x003E,    0,    0, NULL },                               /* 0x3E */
1356     { 0x003F,    0,    0, NULL },                               /* 0x3F */
1357     { 0x0040,    0,    0, NULL },                               /* 0x40 */
1358     { 0x0041,    0,    0, NULL },                               /* 0x41 */
1359     { 0x0042,    0,    0, NULL },                               /* 0x42 */
1360     { 0x0043,    0,    0, NULL },                               /* 0x43 */
1361     { 0x0044,    0,    0, NULL },                               /* 0x44 */
1362     { 0x0045,    0,    0, NULL },                               /* 0x45 */
1363     { 0x0046,    0,    0, NULL },                               /* 0x46 */
1364     { 0x0047,    0,    0, NULL },                               /* 0x47 */
1365     { 0x0048,    0,    0, NULL },                               /* 0x48 */
1366     { 0x0049,    0,    0, NULL },                               /* 0x49 */
1367     { 0x004A,    0,    0, NULL },                               /* 0x4A */
1368     { 0x004B,    0,    0, NULL },                               /* 0x4B */
1369     { 0x004C,    0,    0, NULL },                               /* 0x4C */
1370     { 0x004D,    0,    0, NULL },                               /* 0x4D */
1371     { 0x004E,    0,    0, NULL },                               /* 0x4E */
1372     { 0x004F,    0,    0, NULL },                               /* 0x4F */
1373     { 0x0050,    0,    0, NULL },                               /* 0x50 */
1374     { 0x0051,    0,    0, NULL },                               /* 0x51 */
1375     { 0x0052,    0,    0, NULL },                               /* 0x52 */
1376     { 0x0053,    0,    0, NULL },                               /* 0x53 */
1377     { 0x0054,    0,    0, NULL },                               /* 0x54 */
1378     { 0x0055,    0,    0, NULL },                               /* 0x55 */
1379     { 0x0056,    0,    0, NULL },                               /* 0x56 */
1380     { 0x0057,    0,    0, NULL },                               /* 0x57 */
1381     { 0x0058,    0,    0, NULL },                               /* 0x58 */
1382     { 0x0059,    0,    0, NULL },                               /* 0x59 */
1383     { 0x005A,    0,    0, NULL },                               /* 0x5A */
1384     { 0x005B,    0,    0, NULL },                               /* 0x5B */
1385     { 0x005C,    0,    0, NULL },                               /* 0x5C */
1386     { 0x005D,    0,    0, NULL },                               /* 0x5D */
1387     { 0x005E,    0,    0, NULL },                               /* 0x5E */
1388     { 0x005F,    0,    0, NULL },                               /* 0x5F */
1389     { 0x0060,    0,    0, NULL },                               /* 0x60 */
1390     { 0x0061,    0,    0, NULL },                               /* 0x61 */
1391     { 0x0062,    0,    0, NULL },                               /* 0x62 */
1392     { 0x0063,    0,    0, NULL },                               /* 0x63 */
1393     { 0x0064,    0,    0, NULL },                               /* 0x64 */
1394     { 0x0065,    0,    0, NULL },                               /* 0x65 */
1395     { 0x0066,    0,    0, NULL },                               /* 0x66 */
1396     { 0x0067,    0,    0, NULL },                               /* 0x67 */
1397     { 0x0068,    0,    0, NULL },                               /* 0x68 */
1398     { 0x0069,    0,    0, NULL },                               /* 0x69 */
1399     { 0x006A,    0,    0, NULL },                               /* 0x6A */
1400     { 0x006B,    0,    0, NULL },                               /* 0x6B */
1401     { 0x006C,    0,    0, NULL },                               /* 0x6C */
1402     { 0x006D,    0,    0, NULL },                               /* 0x6D */
1403     { 0x006E,    0,    0, NULL },                               /* 0x6E */
1404     { 0x006F,    0,    0, NULL },                               /* 0x6F */
1405     { 0x0070,    0,    0, NULL },                               /* 0x70 */
1406     { 0x0071,    0,    0, NULL },                               /* 0x71 */
1407     { 0x0072,    0,    0, NULL },                               /* 0x72 */
1408     { 0x0073,    0,    0, NULL },                               /* 0x73 */
1409     { 0x0074,    0,    0, NULL },                               /* 0x74 */
1410     { 0x0075,    0,    0, NULL },                               /* 0x75 */
1411     { 0x0076,    0,    0, NULL },                               /* 0x76 */
1412     { 0x0077,    0,    0, NULL },                               /* 0x77 */
1413     { 0x0078,    0,    0, NULL },                               /* 0x78 */
1414     { 0x0079,    0,    0, NULL },                               /* 0x79 */
1415     { 0x007A,    0,    0, NULL },                               /* 0x7A */
1416     { 0x007B,    0,    0, NULL },                               /* 0x7B */
1417     { 0x007C,    0,    0, NULL },                               /* 0x7C */
1418     { 0x007D,    0,    0, NULL },                               /* 0x7D */
1419     { 0x007E,    0,    0, NULL },                               /* 0x7E */
1420     { 0x007F,    0,    0, NULL },                               /* 0x7F */
1421     { 0x20AC,    0,    0, NULL },                               /* 0x80 */
1422     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_81 },           /* 0x81 */
1423     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_82 },           /* 0x82 */
1424     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_83 },           /* 0x83 */
1425     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_84 },           /* 0x84 */
1426     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_85 },           /* 0x85 */
1427     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_86 },           /* 0x86 */
1428     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_87 },           /* 0x87 */
1429     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_88 },           /* 0x88 */
1430     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_89 },           /* 0x89 */
1431     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8A },           /* 0x8A */
1432     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8B },           /* 0x8B */
1433     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8C },           /* 0x8C */
1434     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8D },           /* 0x8D */
1435     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8E },           /* 0x8E */
1436     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8F },           /* 0x8F */
1437     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_90 },           /* 0x90 */
1438     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_91 },           /* 0x91 */
1439     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_92 },           /* 0x92 */
1440     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_93 },           /* 0x93 */
1441     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_94 },           /* 0x94 */
1442     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_95 },           /* 0x95 */
1443     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_96 },           /* 0x96 */
1444     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_97 },           /* 0x97 */
1445     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_98 },           /* 0x98 */
1446     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_99 },           /* 0x99 */
1447     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9A },           /* 0x9A */
1448     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9B },           /* 0x9B */
1449     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9C },           /* 0x9C */
1450     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9D },           /* 0x9D */
1451     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9E },           /* 0x9E */
1452     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9F },           /* 0x9F */
1453     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_A0 },           /* 0xA0 */
1454     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GB_A1 },            /* 0xA1 */
1455     {      0, 0xA1, 0xFC, aImplDBCSToUniTab_GB_A2 },            /* 0xA2 */
1456     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GB_A3 },            /* 0xA3 */
1457     {      0, 0xA1, 0xF3, aImplDBCSToUniTab_GB_A4 },            /* 0xA4 */
1458     {      0, 0xA1, 0xF6, aImplDBCSToUniTab_GB_A5 },            /* 0xA5 */
1459     {      0, 0xA1, 0xF5, aImplDBCSToUniTab_GB_A6 },            /* 0xA6 */
1460     {      0, 0xA1, 0xF1, aImplDBCSToUniTab_GB_A7 },            /* 0xA7 */
1461     {      0, 0x40, 0xE9, aImplDBCSToUniTab_GBK_A8 },           /* 0xA8 */
1462     {      0, 0x40, 0xEF, aImplDBCSToUniTab_GBK_A9 },           /* 0xA9 */
1463     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AA },           /* 0xAA */
1464     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AB },           /* 0xAB */
1465     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AC },           /* 0xAC */
1466     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AD },           /* 0xAD */
1467     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AE },           /* 0xAE */
1468     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AF },           /* 0xAF */
1469     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B0 },           /* 0xB0 */
1470     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B1 },           /* 0xB1 */
1471     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B2 },           /* 0xB2 */
1472     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B3 },           /* 0xB3 */
1473     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B4 },           /* 0xB4 */
1474     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B5 },           /* 0xB5 */
1475     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B6 },           /* 0xB6 */
1476     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B7 },           /* 0xB7 */
1477     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B8 },           /* 0xB8 */
1478     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B9 },           /* 0xB9 */
1479     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BA },           /* 0xBA */
1480     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BB },           /* 0xBB */
1481     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BC },           /* 0xBC */
1482     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BD },           /* 0xBD */
1483     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BE },           /* 0xBE */
1484     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BF },           /* 0xBF */
1485     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C0 },           /* 0xC0 */
1486     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C1 },           /* 0xC1 */
1487     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C2 },           /* 0xC2 */
1488     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C3 },           /* 0xC3 */
1489     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C4 },           /* 0xC4 */
1490     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C5 },           /* 0xC5 */
1491     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C6 },           /* 0xC6 */
1492     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C7 },           /* 0xC7 */
1493     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C8 },           /* 0xC8 */
1494     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C9 },           /* 0xC9 */
1495     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CA },           /* 0xCA */
1496     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CB },           /* 0xCB */
1497     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CC },           /* 0xCC */
1498     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CD },           /* 0xCD */
1499     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CE },           /* 0xCE */
1500     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CF },           /* 0xCF */
1501     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D0 },           /* 0xD0 */
1502     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D1 },           /* 0xD1 */
1503     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D2 },           /* 0xD2 */
1504     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D3 },           /* 0xD3 */
1505     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D4 },           /* 0xD4 */
1506     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D5 },           /* 0xD5 */
1507     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D6 },           /* 0xD6 */
1508     {      0, 0x40, 0xF9, aImplDBCSToUniTab_GBK_D7 },           /* 0xD7 */
1509     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D8 },           /* 0xD8 */
1510     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D9 },           /* 0xD9 */
1511     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DA },           /* 0xDA */
1512     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DB },           /* 0xDB */
1513     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DC },           /* 0xDC */
1514     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DD },           /* 0xDD */
1515     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DE },           /* 0xDE */
1516     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DF },           /* 0xDF */
1517     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E0 },           /* 0xE0 */
1518     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E1 },           /* 0xE1 */
1519     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E2 },           /* 0xE2 */
1520     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E3 },           /* 0xE3 */
1521     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E4 },           /* 0xE4 */
1522     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E5 },           /* 0xE5 */
1523     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E6 },           /* 0xE6 */
1524     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E7 },           /* 0xE7 */
1525     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E8 },           /* 0xE8 */
1526     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E9 },           /* 0xE9 */
1527     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_EA },           /* 0xEA */
1528     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_EB },           /* 0xEB */
1529     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_EC },           /* 0xEC */
1530     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_ED },           /* 0xED */
1531     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_EE },           /* 0xEE */
1532     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_EF },           /* 0xEF */
1533     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F0 },           /* 0xF0 */
1534     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F1 },           /* 0xF1 */
1535     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F2 },           /* 0xF2 */
1536     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F3 },           /* 0xF3 */
1537     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F4 },           /* 0xF4 */
1538     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F5 },           /* 0xF5 */
1539     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F6 },           /* 0xF6 */
1540     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F7 },           /* 0xF7 */
1541     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_F8 },           /* 0xF8 */
1542     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_F9 },           /* 0xF9 */
1543     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_FA },           /* 0xFA */
1544     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_FB },           /* 0xFB */
1545     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_FC },           /* 0xFC */
1546     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_FD },           /* 0xFD */
1547     {      0, 0x40, 0x9F, aImplDBCSToUniTab_GBK_FE },           /* 0xFE */
1548     {      0,    1,    0, NULL }                                /* 0xFF */
1551 /* ----------------------------------------------------------------------- */
1553 static ImplUniToDBCSHighTab const aGBKDBCSHighTab[256] =
1555     { 0x00, 0xFC, aImplUniToDBCSTab_GB_00 },                    /* 0x00 */
1556     { 0x01, 0xDC, aImplUniToDBCSTab_GB_01 },                    /* 0x01 */
1557     { 0x51, 0xD9, aImplUniToDBCSTab_GBK_02 },                   /* 0x02 */
1558     { 0x91, 0xC9, aImplUniToDBCSTab_GB_03 },                    /* 0x03 */
1559     { 0x01, 0x51, aImplUniToDBCSTab_GB_04 },                    /* 0x04 */
1560     {    1,    0, NULL },                                       /* 0x05 */
1561     {    1,    0, NULL },                                       /* 0x06 */
1562     {    1,    0, NULL },                                       /* 0x07 */
1563     {    1,    0, NULL },                                       /* 0x08 */
1564     {    1,    0, NULL },                                       /* 0x09 */
1565     {    1,    0, NULL },                                       /* 0x0A */
1566     {    1,    0, NULL },                                       /* 0x0B */
1567     {    1,    0, NULL },                                       /* 0x0C */
1568     {    1,    0, NULL },                                       /* 0x0D */
1569     {    1,    0, NULL },                                       /* 0x0E */
1570     {    1,    0, NULL },                                       /* 0x0F */
1571     {    1,    0, NULL },                                       /* 0x10 */
1572     {    1,    0, NULL },                                       /* 0x11 */
1573     {    1,    0, NULL },                                       /* 0x12 */
1574     {    1,    0, NULL },                                       /* 0x13 */
1575     {    1,    0, NULL },                                       /* 0x14 */
1576     {    1,    0, NULL },                                       /* 0x15 */
1577     {    1,    0, NULL },                                       /* 0x16 */
1578     {    1,    0, NULL },                                       /* 0x17 */
1579     {    1,    0, NULL },                                       /* 0x18 */
1580     {    1,    0, NULL },                                       /* 0x19 */
1581     {    1,    0, NULL },                                       /* 0x1A */
1582     {    1,    0, NULL },                                       /* 0x1B */
1583     {    1,    0, NULL },                                       /* 0x1C */
1584     {    1,    0, NULL },                                       /* 0x1D */
1585     { 0x3F, 0x3F, aImplUniToDBCSTab_APPLECHINSIMP_1E },         /* 0x1E */ /* we convert this char also to unicode */
1586     {    1,    0, NULL },                                       /* 0x1F */
1587     { 0x10, 0xAC, aImplUniToDBCSTab_GBK_20 },                   /* 0x20 */
1588     { 0x03, 0x99, aImplUniToDBCSTab_GBK_21 },                   /* 0x21 */
1589     { 0x08, 0xEF, aImplUniToDBCSTab_GBK_22 },                   /* 0x22 */
1590     { 0x12, 0x12, aImplUniToDBCSTab_GB_23 },                    /* 0x23 */
1591     { 0x60, 0x9B, aImplUniToDBCSTab_GB_24 },                    /* 0x24 */
1592     { 0x00, 0xE5, aImplUniToDBCSTab_GBK_25 },                   /* 0x25 */
1593     { 0x05, 0x42, aImplUniToDBCSTab_GBK_26 },                   /* 0x26 */
1594     {    1,    0, NULL },                                       /* 0x27 */
1595     {    1,    0, NULL },                                       /* 0x28 */
1596     {    1,    0, NULL },                                       /* 0x29 */
1597     {    1,    0, NULL },                                       /* 0x2A */
1598     {    1,    0, NULL },                                       /* 0x2B */
1599     {    1,    0, NULL },                                       /* 0x2C */
1600     {    1,    0, NULL },                                       /* 0x2D */
1601     { 0x81, 0xCA, aImplUniToDBCSTab_GBK_2E },                   /* 0x2E */
1602     {    1,    0, NULL },                                       /* 0x2F */
1603     { 0x00, 0xFE, aImplUniToDBCSTab_GBK_30 },                   /* 0x30 */
1604     { 0x05, 0x29, aImplUniToDBCSTab_GB_31 },                    /* 0x31 */
1605     { 0x20, 0xA3, aImplUniToDBCSTab_GBK_32 },                   /* 0x32 */
1606     { 0x8E, 0xD5, aImplUniToDBCSTab_GBK_33 },                   /* 0x33 */
1607     { 0x47, 0x73, aImplUniToDBCSTab_GBK_34 },                   /* 0x34 */
1608     { 0x9E, 0x9E, aImplUniToDBCSTab_GBK_35 },                   /* 0x35 */
1609     { 0x0E, 0x1A, aImplUniToDBCSTab_GBK_36 },                   /* 0x36 */
1610     {    1,    0, NULL },                                       /* 0x37 */
1611     {    1,    0, NULL },                                       /* 0x38 */
1612     { 0x18, 0xDF, aImplUniToDBCSTab_GBK_39 },                   /* 0x39 */
1613     { 0x73, 0x73, aImplUniToDBCSTab_GBK_3A },                   /* 0x3A */
1614     { 0x4E, 0x4E, aImplUniToDBCSTab_GBK_3B },                   /* 0x3B */
1615     { 0x6E, 0xE0, aImplUniToDBCSTab_GBK_3C },                   /* 0x3C */
1616     {    1,    0, NULL },                                       /* 0x3D */
1617     {    1,    0, NULL },                                       /* 0x3E */
1618     {    1,    0, NULL },                                       /* 0x3F */
1619     { 0x56, 0x56, aImplUniToDBCSTab_GBK_40 },                   /* 0x40 */
1620     { 0x5F, 0x5F, aImplUniToDBCSTab_GBK_41 },                   /* 0x41 */
1621     {    1,    0, NULL },                                       /* 0x42 */
1622     { 0x37, 0xDD, aImplUniToDBCSTab_GBK_43 },                   /* 0x43 */
1623     { 0xD6, 0xD6, aImplUniToDBCSTab_GBK_44 },                   /* 0x44 */
1624     {    1,    0, NULL },                                       /* 0x45 */
1625     { 0x4C, 0x61, aImplUniToDBCSTab_GBK_46 },                   /* 0x46 */
1626     { 0x23, 0x8D, aImplUniToDBCSTab_GBK_47 },                   /* 0x47 */
1627     {    1,    0, NULL },                                       /* 0x48 */
1628     { 0x47, 0xB7, aImplUniToDBCSTab_GBK_49 },                   /* 0x49 */
1629     {    1,    0, NULL },                                       /* 0x4A */
1630     {    1,    0, NULL },                                       /* 0x4B */
1631     { 0x77, 0xA3, aImplUniToDBCSTab_GBK_4C },                   /* 0x4C */
1632     { 0x13, 0xAE, aImplUniToDBCSTab_GBK_4D },                   /* 0x4D */
1633     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_4E },                   /* 0x4E */
1634     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_4F },                   /* 0x4F */
1635     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_50 },                   /* 0x50 */
1636     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_51 },                   /* 0x51 */
1637     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_52 },                   /* 0x52 */
1638     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_53 },                   /* 0x53 */
1639     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_54 },                   /* 0x54 */
1640     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_55 },                   /* 0x55 */
1641     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_56 },                   /* 0x56 */
1642     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_57 },                   /* 0x57 */
1643     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_58 },                   /* 0x58 */
1644     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_59 },                   /* 0x59 */
1645     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5A },                   /* 0x5A */
1646     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5B },                   /* 0x5B */
1647     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5C },                   /* 0x5C */
1648     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5D },                   /* 0x5D */
1649     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5E },                   /* 0x5E */
1650     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5F },                   /* 0x5F */
1651     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_60 },                   /* 0x60 */
1652     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_61 },                   /* 0x61 */
1653     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_62 },                   /* 0x62 */
1654     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_63 },                   /* 0x63 */
1655     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_64 },                   /* 0x64 */
1656     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_65 },                   /* 0x65 */
1657     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_66 },                   /* 0x66 */
1658     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_67 },                   /* 0x67 */
1659     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_68 },                   /* 0x68 */
1660     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_69 },                   /* 0x69 */
1661     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6A },                   /* 0x6A */
1662     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6B },                   /* 0x6B */
1663     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6C },                   /* 0x6C */
1664     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6D },                   /* 0x6D */
1665     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6E },                   /* 0x6E */
1666     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6F },                   /* 0x6F */
1667     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_70 },                   /* 0x70 */
1668     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_71 },                   /* 0x71 */
1669     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_72 },                   /* 0x72 */
1670     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_73 },                   /* 0x73 */
1671     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_74 },                   /* 0x74 */
1672     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_75 },                   /* 0x75 */
1673     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_76 },                   /* 0x76 */
1674     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_77 },                   /* 0x77 */
1675     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_78 },                   /* 0x78 */
1676     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_79 },                   /* 0x79 */
1677     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7A },                   /* 0x7A */
1678     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7B },                   /* 0x7B */
1679     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7C },                   /* 0x7C */
1680     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7D },                   /* 0x7D */
1681     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7E },                   /* 0x7E */
1682     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7F },                   /* 0x7F */
1683     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_80 },                   /* 0x80 */
1684     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_81 },                   /* 0x81 */
1685     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_82 },                   /* 0x82 */
1686     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_83 },                   /* 0x83 */
1687     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_84 },                   /* 0x84 */
1688     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_85 },                   /* 0x85 */
1689     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_86 },                   /* 0x86 */
1690     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_87 },                   /* 0x87 */
1691     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_88 },                   /* 0x88 */
1692     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_89 },                   /* 0x89 */
1693     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8A },                   /* 0x8A */
1694     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8B },                   /* 0x8B */
1695     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8C },                   /* 0x8C */
1696     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8D },                   /* 0x8D */
1697     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8E },                   /* 0x8E */
1698     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8F },                   /* 0x8F */
1699     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_90 },                   /* 0x90 */
1700     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_91 },                   /* 0x91 */
1701     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_92 },                   /* 0x92 */
1702     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_93 },                   /* 0x93 */
1703     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_94 },                   /* 0x94 */
1704     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_95 },                   /* 0x95 */
1705     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_96 },                   /* 0x96 */
1706     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_97 },                   /* 0x97 */
1707     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_98 },                   /* 0x98 */
1708     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_99 },                   /* 0x99 */
1709     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_9A },                   /* 0x9A */
1710     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_9B },                   /* 0x9B */
1711     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_9C },                   /* 0x9C */
1712     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_9D },                   /* 0x9D */
1713     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_9E },                   /* 0x9E */
1714     { 0x00, 0xA5, aImplUniToDBCSTab_GBK_9F },                   /* 0x9F */
1715     {    1,    0, NULL },                                       /* 0xA0 */
1716     {    1,    0, NULL },                                       /* 0xA1 */
1717     {    1,    0, NULL },                                       /* 0xA2 */
1718     {    1,    0, NULL },                                       /* 0xA3 */
1719     {    1,    0, NULL },                                       /* 0xA4 */
1720     {    1,    0, NULL },                                       /* 0xA5 */
1721     {    1,    0, NULL },                                       /* 0xA6 */
1722     {    1,    0, NULL },                                       /* 0xA7 */
1723     {    1,    0, NULL },                                       /* 0xA8 */
1724     {    1,    0, NULL },                                       /* 0xA9 */
1725     {    1,    0, NULL },                                       /* 0xAA */
1726     {    1,    0, NULL },                                       /* 0xAB */
1727     {    1,    0, NULL },                                       /* 0xAC */
1728     {    1,    0, NULL },                                       /* 0xAD */
1729     {    1,    0, NULL },                                       /* 0xAE */
1730     {    1,    0, NULL },                                       /* 0xAF */
1731     {    1,    0, NULL },                                       /* 0xB0 */
1732     {    1,    0, NULL },                                       /* 0xB1 */
1733     {    1,    0, NULL },                                       /* 0xB2 */
1734     {    1,    0, NULL },                                       /* 0xB3 */
1735     {    1,    0, NULL },                                       /* 0xB4 */
1736     {    1,    0, NULL },                                       /* 0xB5 */
1737     {    1,    0, NULL },                                       /* 0xB6 */
1738     {    1,    0, NULL },                                       /* 0xB7 */
1739     {    1,    0, NULL },                                       /* 0xB8 */
1740     {    1,    0, NULL },                                       /* 0xB9 */
1741     {    1,    0, NULL },                                       /* 0xBA */
1742     {    1,    0, NULL },                                       /* 0xBB */
1743     {    1,    0, NULL },                                       /* 0xBC */
1744     {    1,    0, NULL },                                       /* 0xBD */
1745     {    1,    0, NULL },                                       /* 0xBE */
1746     {    1,    0, NULL },                                       /* 0xBF */
1747     {    1,    0, NULL },                                       /* 0xC0 */
1748     {    1,    0, NULL },                                       /* 0xC1 */
1749     {    1,    0, NULL },                                       /* 0xC2 */
1750     {    1,    0, NULL },                                       /* 0xC3 */
1751     {    1,    0, NULL },                                       /* 0xC4 */
1752     {    1,    0, NULL },                                       /* 0xC5 */
1753     {    1,    0, NULL },                                       /* 0xC6 */
1754     {    1,    0, NULL },                                       /* 0xC7 */
1755     {    1,    0, NULL },                                       /* 0xC8 */
1756     {    1,    0, NULL },                                       /* 0xC9 */
1757     {    1,    0, NULL },                                       /* 0xCA */
1758     {    1,    0, NULL },                                       /* 0xCB */
1759     {    1,    0, NULL },                                       /* 0xCC */
1760     {    1,    0, NULL },                                       /* 0xCD */
1761     {    1,    0, NULL },                                       /* 0xCE */
1762     {    1,    0, NULL },                                       /* 0xCF */
1763     {    1,    0, NULL },                                       /* 0xD0 */
1764     {    1,    0, NULL },                                       /* 0xD1 */
1765     {    1,    0, NULL },                                       /* 0xD2 */
1766     {    1,    0, NULL },                                       /* 0xD3 */
1767     {    1,    0, NULL },                                       /* 0xD4 */
1768     {    1,    0, NULL },                                       /* 0xD5 */
1769     {    1,    0, NULL },                                       /* 0xD6 */
1770     {    1,    0, NULL },                                       /* 0xD7 */
1771     {    1,    0, NULL },                                       /* 0xD8 */
1772     {    1,    0, NULL },                                       /* 0xD9 */
1773     {    1,    0, NULL },                                       /* 0xDA */
1774     {    1,    0, NULL },                                       /* 0xDB */
1775     {    1,    0, NULL },                                       /* 0xDC */
1776     {    1,    0, NULL },                                       /* 0xDD */
1777     {    1,    0, NULL },                                       /* 0xDE */
1778     {    1,    0, NULL },                                       /* 0xDF */
1779     {    1,    0, NULL },                                       /* 0xE0 */
1780     {    1,    0, NULL },                                       /* 0xE1 */
1781     {    1,    0, NULL },                                       /* 0xE2 */
1782     {    1,    0, NULL },                                       /* 0xE3 */
1783     {    1,    0, NULL },                                       /* 0xE4 */
1784     {    1,    0, NULL },                                       /* 0xE5 */
1785     {    1,    0, NULL },                                       /* 0xE6 */
1786     {    1,    0, NULL },                                       /* 0xE7 */
1787     {    1,    0, NULL },                                       /* 0xE8 */
1788     {    1,    0, NULL },                                       /* 0xE9 */
1789     {    1,    0, NULL },                                       /* 0xEA */
1790     {    1,    0, NULL },                                       /* 0xEB */
1791     {    1,    0, NULL },                                       /* 0xEC */
1792     {    1,    0, NULL },                                       /* 0xED */
1793     {    1,    0, NULL },                                       /* 0xEE */
1794     {    1,    0, NULL },                                       /* 0xEF */
1795     {    1,    0, NULL },                                       /* 0xF0 */
1796     {    1,    0, NULL },                                       /* 0xF1 */
1797     {    1,    0, NULL },                                       /* 0xF2 */
1798     {    1,    0, NULL },                                       /* 0xF3 */
1799     {    1,    0, NULL },                                       /* 0xF4 */
1800     {    1,    0, NULL },                                       /* 0xF5 */
1801     {    1,    0, NULL },                                       /* 0xF6 */
1802     {    1,    0, NULL },                                       /* 0xF7 */
1803     {    1,    0, NULL },                                       /* 0xF8 */
1804     { 0x2C, 0xF1, aImplUniToDBCSTab_GBK_F9 },                   /* 0xF9 */
1805     { 0x0C, 0x29, aImplUniToDBCSTab_GBK_FA },                   /* 0xFA */
1806     {    1,    0, NULL },                                       /* 0xFB */
1807     {    1,    0, NULL },                                       /* 0xFC */
1808     {    1,    0, NULL },                                       /* 0xFD */
1809     { 0x30, 0x6B, aImplUniToDBCSTab_GBK_FE },                   /* 0xFE */
1810     { 0x01, 0xE5, aImplUniToDBCSTab_GBK_FF }                    /* 0xFF */
1813 /* ----------------------------------------------------------------------- */
1815 static ImplDBCSConvertData const aImplGBKDBCSCvtData =
1817     aGBKUniLeadTab,
1818     aGBKDBCSHighTab,
1819     0x00, 0xFF,
1820     0x40, 0xFE,
1821     aImplMS936DBCSEUDCTab,
1822     DBCS_EUDC_MS936_COUNT
1825 /* ----------------------------------------------------------------------- */
1827 static ImplTextEncodingData const aImplGBKTextEncodingData
1828     = { { &aImplGBKDBCSCvtData,
1829           ImplDBCSToUnicode,
1830           ImplUnicodeToDBCS,
1831           NULL,
1832           NULL,
1833           NULL,
1834           NULL,
1835           NULL,
1836           NULL },
1837         1,
1838         2,
1839         2,
1840         134,
1841         "euc-cn",
1842         "GBK",
1843         RTL_TEXTENCODING_INFO_MULTIBYTE | RTL_TEXTENCODING_INFO_MIME };
1844     /* SCRIPT_CHINESE_SIMPLIFIED, pc code page 936, mac encoding 25 */
1846 /* ======================================================================= */
1848 static ImplDBCSToUniLeadTab const aMS936UniLeadTab[256] =
1850     { 0x0000,    0,    0, NULL },                               /* 0x00 */
1851     { 0x0001,    0,    0, NULL },                               /* 0x01 */
1852     { 0x0002,    0,    0, NULL },                               /* 0x02 */
1853     { 0x0003,    0,    0, NULL },                               /* 0x03 */
1854     { 0x0004,    0,    0, NULL },                               /* 0x04 */
1855     { 0x0005,    0,    0, NULL },                               /* 0x05 */
1856     { 0x0006,    0,    0, NULL },                               /* 0x06 */
1857     { 0x0007,    0,    0, NULL },                               /* 0x07 */
1858     { 0x0008,    0,    0, NULL },                               /* 0x08 */
1859     { 0x0009,    0,    0, NULL },                               /* 0x09 */
1860     { 0x000A,    0,    0, NULL },                               /* 0x0A */
1861     { 0x000B,    0,    0, NULL },                               /* 0x0B */
1862     { 0x000C,    0,    0, NULL },                               /* 0x0C */
1863     { 0x000D,    0,    0, NULL },                               /* 0x0D */
1864     { 0x000E,    0,    0, NULL },                               /* 0x0E */
1865     { 0x000F,    0,    0, NULL },                               /* 0x0F */
1866     { 0x0010,    0,    0, NULL },                               /* 0x10 */
1867     { 0x0011,    0,    0, NULL },                               /* 0x11 */
1868     { 0x0012,    0,    0, NULL },                               /* 0x12 */
1869     { 0x0013,    0,    0, NULL },                               /* 0x13 */
1870     { 0x0014,    0,    0, NULL },                               /* 0x14 */
1871     { 0x0015,    0,    0, NULL },                               /* 0x15 */
1872     { 0x0016,    0,    0, NULL },                               /* 0x16 */
1873     { 0x0017,    0,    0, NULL },                               /* 0x17 */
1874     { 0x0018,    0,    0, NULL },                               /* 0x18 */
1875     { 0x0019,    0,    0, NULL },                               /* 0x19 */
1876     { 0x001A,    0,    0, NULL },                               /* 0x1A */
1877     { 0x001B,    0,    0, NULL },                               /* 0x1B */
1878     { 0x001C,    0,    0, NULL },                               /* 0x1C */
1879     { 0x001D,    0,    0, NULL },                               /* 0x1D */
1880     { 0x001E,    0,    0, NULL },                               /* 0x1E */
1881     { 0x001F,    0,    0, NULL },                               /* 0x1F */
1882     { 0x0020,    0,    0, NULL },                               /* 0x20 */
1883     { 0x0021,    0,    0, NULL },                               /* 0x21 */
1884     { 0x0022,    0,    0, NULL },                               /* 0x22 */
1885     { 0x0023,    0,    0, NULL },                               /* 0x23 */
1886     { 0x0024,    0,    0, NULL },                               /* 0x24 */
1887     { 0x0025,    0,    0, NULL },                               /* 0x25 */
1888     { 0x0026,    0,    0, NULL },                               /* 0x26 */
1889     { 0x0027,    0,    0, NULL },                               /* 0x27 */
1890     { 0x0028,    0,    0, NULL },                               /* 0x28 */
1891     { 0x0029,    0,    0, NULL },                               /* 0x29 */
1892     { 0x002A,    0,    0, NULL },                               /* 0x2A */
1893     { 0x002B,    0,    0, NULL },                               /* 0x2B */
1894     { 0x002C,    0,    0, NULL },                               /* 0x2C */
1895     { 0x002D,    0,    0, NULL },                               /* 0x2D */
1896     { 0x002E,    0,    0, NULL },                               /* 0x2E */
1897     { 0x002F,    0,    0, NULL },                               /* 0x2F */
1898     { 0x0030,    0,    0, NULL },                               /* 0x30 */
1899     { 0x0031,    0,    0, NULL },                               /* 0x31 */
1900     { 0x0032,    0,    0, NULL },                               /* 0x32 */
1901     { 0x0033,    0,    0, NULL },                               /* 0x33 */
1902     { 0x0034,    0,    0, NULL },                               /* 0x34 */
1903     { 0x0035,    0,    0, NULL },                               /* 0x35 */
1904     { 0x0036,    0,    0, NULL },                               /* 0x36 */
1905     { 0x0037,    0,    0, NULL },                               /* 0x37 */
1906     { 0x0038,    0,    0, NULL },                               /* 0x38 */
1907     { 0x0039,    0,    0, NULL },                               /* 0x39 */
1908     { 0x003A,    0,    0, NULL },                               /* 0x3A */
1909     { 0x003B,    0,    0, NULL },                               /* 0x3B */
1910     { 0x003C,    0,    0, NULL },                               /* 0x3C */
1911     { 0x003D,    0,    0, NULL },                               /* 0x3D */
1912     { 0x003E,    0,    0, NULL },                               /* 0x3E */
1913     { 0x003F,    0,    0, NULL },                               /* 0x3F */
1914     { 0x0040,    0,    0, NULL },                               /* 0x40 */
1915     { 0x0041,    0,    0, NULL },                               /* 0x41 */
1916     { 0x0042,    0,    0, NULL },                               /* 0x42 */
1917     { 0x0043,    0,    0, NULL },                               /* 0x43 */
1918     { 0x0044,    0,    0, NULL },                               /* 0x44 */
1919     { 0x0045,    0,    0, NULL },                               /* 0x45 */
1920     { 0x0046,    0,    0, NULL },                               /* 0x46 */
1921     { 0x0047,    0,    0, NULL },                               /* 0x47 */
1922     { 0x0048,    0,    0, NULL },                               /* 0x48 */
1923     { 0x0049,    0,    0, NULL },                               /* 0x49 */
1924     { 0x004A,    0,    0, NULL },                               /* 0x4A */
1925     { 0x004B,    0,    0, NULL },                               /* 0x4B */
1926     { 0x004C,    0,    0, NULL },                               /* 0x4C */
1927     { 0x004D,    0,    0, NULL },                               /* 0x4D */
1928     { 0x004E,    0,    0, NULL },                               /* 0x4E */
1929     { 0x004F,    0,    0, NULL },                               /* 0x4F */
1930     { 0x0050,    0,    0, NULL },                               /* 0x50 */
1931     { 0x0051,    0,    0, NULL },                               /* 0x51 */
1932     { 0x0052,    0,    0, NULL },                               /* 0x52 */
1933     { 0x0053,    0,    0, NULL },                               /* 0x53 */
1934     { 0x0054,    0,    0, NULL },                               /* 0x54 */
1935     { 0x0055,    0,    0, NULL },                               /* 0x55 */
1936     { 0x0056,    0,    0, NULL },                               /* 0x56 */
1937     { 0x0057,    0,    0, NULL },                               /* 0x57 */
1938     { 0x0058,    0,    0, NULL },                               /* 0x58 */
1939     { 0x0059,    0,    0, NULL },                               /* 0x59 */
1940     { 0x005A,    0,    0, NULL },                               /* 0x5A */
1941     { 0x005B,    0,    0, NULL },                               /* 0x5B */
1942     { 0x005C,    0,    0, NULL },                               /* 0x5C */
1943     { 0x005D,    0,    0, NULL },                               /* 0x5D */
1944     { 0x005E,    0,    0, NULL },                               /* 0x5E */
1945     { 0x005F,    0,    0, NULL },                               /* 0x5F */
1946     { 0x0060,    0,    0, NULL },                               /* 0x60 */
1947     { 0x0061,    0,    0, NULL },                               /* 0x61 */
1948     { 0x0062,    0,    0, NULL },                               /* 0x62 */
1949     { 0x0063,    0,    0, NULL },                               /* 0x63 */
1950     { 0x0064,    0,    0, NULL },                               /* 0x64 */
1951     { 0x0065,    0,    0, NULL },                               /* 0x65 */
1952     { 0x0066,    0,    0, NULL },                               /* 0x66 */
1953     { 0x0067,    0,    0, NULL },                               /* 0x67 */
1954     { 0x0068,    0,    0, NULL },                               /* 0x68 */
1955     { 0x0069,    0,    0, NULL },                               /* 0x69 */
1956     { 0x006A,    0,    0, NULL },                               /* 0x6A */
1957     { 0x006B,    0,    0, NULL },                               /* 0x6B */
1958     { 0x006C,    0,    0, NULL },                               /* 0x6C */
1959     { 0x006D,    0,    0, NULL },                               /* 0x6D */
1960     { 0x006E,    0,    0, NULL },                               /* 0x6E */
1961     { 0x006F,    0,    0, NULL },                               /* 0x6F */
1962     { 0x0070,    0,    0, NULL },                               /* 0x70 */
1963     { 0x0071,    0,    0, NULL },                               /* 0x71 */
1964     { 0x0072,    0,    0, NULL },                               /* 0x72 */
1965     { 0x0073,    0,    0, NULL },                               /* 0x73 */
1966     { 0x0074,    0,    0, NULL },                               /* 0x74 */
1967     { 0x0075,    0,    0, NULL },                               /* 0x75 */
1968     { 0x0076,    0,    0, NULL },                               /* 0x76 */
1969     { 0x0077,    0,    0, NULL },                               /* 0x77 */
1970     { 0x0078,    0,    0, NULL },                               /* 0x78 */
1971     { 0x0079,    0,    0, NULL },                               /* 0x79 */
1972     { 0x007A,    0,    0, NULL },                               /* 0x7A */
1973     { 0x007B,    0,    0, NULL },                               /* 0x7B */
1974     { 0x007C,    0,    0, NULL },                               /* 0x7C */
1975     { 0x007D,    0,    0, NULL },                               /* 0x7D */
1976     { 0x007E,    0,    0, NULL },                               /* 0x7E */
1977     { 0x007F,    0,    0, NULL },                               /* 0x7F */
1978     { 0x20AC,    0,    0, NULL },                               /* 0x80 */
1979     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_81 },           /* 0x81 */
1980     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_82 },           /* 0x82 */
1981     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_83 },           /* 0x83 */
1982     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_84 },           /* 0x84 */
1983     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_85 },           /* 0x85 */
1984     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_86 },           /* 0x86 */
1985     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_87 },           /* 0x87 */
1986     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_88 },           /* 0x88 */
1987     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_89 },           /* 0x89 */
1988     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8A },           /* 0x8A */
1989     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8B },           /* 0x8B */
1990     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8C },           /* 0x8C */
1991     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8D },           /* 0x8D */
1992     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8E },           /* 0x8E */
1993     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_8F },           /* 0x8F */
1994     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_90 },           /* 0x90 */
1995     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_91 },           /* 0x91 */
1996     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_92 },           /* 0x92 */
1997     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_93 },           /* 0x93 */
1998     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_94 },           /* 0x94 */
1999     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_95 },           /* 0x95 */
2000     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_96 },           /* 0x96 */
2001     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_97 },           /* 0x97 */
2002     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_98 },           /* 0x98 */
2003     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_99 },           /* 0x99 */
2004     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9A },           /* 0x9A */
2005     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9B },           /* 0x9B */
2006     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9C },           /* 0x9C */
2007     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9D },           /* 0x9D */
2008     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9E },           /* 0x9E */
2009     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_9F },           /* 0x9F */
2010     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_A0 },           /* 0xA0 */
2011     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GB_A1 },            /* 0xA1 */
2012     {      0, 0xA1, 0xFC, aImplDBCSToUniTab_GB_A2 },            /* 0xA2 */
2013     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GB_A3 },            /* 0xA3 */
2014     {      0, 0xA1, 0xF3, aImplDBCSToUniTab_GB_A4 },            /* 0xA4 */
2015     {      0, 0xA1, 0xF6, aImplDBCSToUniTab_GB_A5 },            /* 0xA5 */
2016     {      0, 0xA1, 0xF5, aImplDBCSToUniTab_GB_A6 },            /* 0xA6 */
2017     {      0, 0xA1, 0xF1, aImplDBCSToUniTab_GB_A7 },            /* 0xA7 */
2018     {      0, 0x40, 0xE9, aImplDBCSToUniTab_GBK_A8 },           /* 0xA8 */
2019     {      0, 0x40, 0xEF, aImplDBCSToUniTab_GBK_A9 },           /* 0xA9 */
2020     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AA },           /* 0xAA */
2021     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AB },           /* 0xAB */
2022     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AC },           /* 0xAC */
2023     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AD },           /* 0xAD */
2024     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AE },           /* 0xAE */
2025     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_AF },           /* 0xAF */
2026     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B0 },           /* 0xB0 */
2027     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B1 },           /* 0xB1 */
2028     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B2 },           /* 0xB2 */
2029     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B3 },           /* 0xB3 */
2030     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B4 },           /* 0xB4 */
2031     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B5 },           /* 0xB5 */
2032     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B6 },           /* 0xB6 */
2033     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B7 },           /* 0xB7 */
2034     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B8 },           /* 0xB8 */
2035     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_B9 },           /* 0xB9 */
2036     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BA },           /* 0xBA */
2037     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BB },           /* 0xBB */
2038     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BC },           /* 0xBC */
2039     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BD },           /* 0xBD */
2040     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BE },           /* 0xBE */
2041     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_BF },           /* 0xBF */
2042     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C0 },           /* 0xC0 */
2043     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C1 },           /* 0xC1 */
2044     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C2 },           /* 0xC2 */
2045     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C3 },           /* 0xC3 */
2046     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C4 },           /* 0xC4 */
2047     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C5 },           /* 0xC5 */
2048     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C6 },           /* 0xC6 */
2049     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C7 },           /* 0xC7 */
2050     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C8 },           /* 0xC8 */
2051     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_C9 },           /* 0xC9 */
2052     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CA },           /* 0xCA */
2053     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CB },           /* 0xCB */
2054     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CC },           /* 0xCC */
2055     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CD },           /* 0xCD */
2056     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CE },           /* 0xCE */
2057     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_CF },           /* 0xCF */
2058     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D0 },           /* 0xD0 */
2059     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D1 },           /* 0xD1 */
2060     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D2 },           /* 0xD2 */
2061     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D3 },           /* 0xD3 */
2062     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D4 },           /* 0xD4 */
2063     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D5 },           /* 0xD5 */
2064     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D6 },           /* 0xD6 */
2065     {      0, 0x40, 0xF9, aImplDBCSToUniTab_GBK_D7 },           /* 0xD7 */
2066     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D8 },           /* 0xD8 */
2067     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_D9 },           /* 0xD9 */
2068     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DA },           /* 0xDA */
2069     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DB },           /* 0xDB */
2070     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DC },           /* 0xDC */
2071     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DD },           /* 0xDD */
2072     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DE },           /* 0xDE */
2073     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_DF },           /* 0xDF */
2074     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E0 },           /* 0xE0 */
2075     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E1 },           /* 0xE1 */
2076     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E2 },           /* 0xE2 */
2077     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E3 },           /* 0xE3 */
2078     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E4 },           /* 0xE4 */
2079     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E5 },           /* 0xE5 */
2080     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E6 },           /* 0xE6 */
2081     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E7 },           /* 0xE7 */
2082     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E8 },           /* 0xE8 */
2083     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_E9 },           /* 0xE9 */
2084     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_EA },           /* 0xEA */
2085     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_EB },           /* 0xEB */
2086     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_EC },           /* 0xEC */
2087     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_ED },           /* 0xED */
2088     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_EE },           /* 0xEE */
2089     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_EF },           /* 0xEF */
2090     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F0 },           /* 0xF0 */
2091     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F1 },           /* 0xF1 */
2092     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F2 },           /* 0xF2 */
2093     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F3 },           /* 0xF3 */
2094     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F4 },           /* 0xF4 */
2095     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F5 },           /* 0xF5 */
2096     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F6 },           /* 0xF6 */
2097     {      0, 0x40, 0xFE, aImplDBCSToUniTab_GBK_F7 },           /* 0xF7 */
2098     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_F8 },           /* 0xF8 */
2099     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_F9 },           /* 0xF9 */
2100     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_FA },           /* 0xFA */
2101     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_FB },           /* 0xFB */
2102     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_FC },           /* 0xFC */
2103     {      0, 0x40, 0xA0, aImplDBCSToUniTab_GBK_FD },           /* 0xFD */
2104     {      0, 0x40, 0x4F, aImplDBCSToUniTab_GBK_FE },           /* 0xFE */
2105     {      0,    1,    0, NULL }                                /* 0xFF */
2108 /* ----------------------------------------------------------------------- */
2110 static ImplUniToDBCSHighTab const aMS936DBCSHighTab[256] =
2112     { 0x00, 0xFC, aImplUniToDBCSTab_GB_00 },                    /* 0x00 */
2113     { 0x01, 0xDC, aImplUniToDBCSTab_GB_01 },                    /* 0x01 */
2114     { 0x51, 0xD9, aImplUniToDBCSTab_GBK_02 },                   /* 0x02 */
2115     { 0x91, 0xC9, aImplUniToDBCSTab_GB_03 },                    /* 0x03 */
2116     { 0x01, 0x51, aImplUniToDBCSTab_GB_04 },                    /* 0x04 */
2117     {    1,    0, NULL },                                       /* 0x05 */
2118     {    1,    0, NULL },                                       /* 0x06 */
2119     {    1,    0, NULL },                                       /* 0x07 */
2120     {    1,    0, NULL },                                       /* 0x08 */
2121     {    1,    0, NULL },                                       /* 0x09 */
2122     {    1,    0, NULL },                                       /* 0x0A */
2123     {    1,    0, NULL },                                       /* 0x0B */
2124     {    1,    0, NULL },                                       /* 0x0C */
2125     {    1,    0, NULL },                                       /* 0x0D */
2126     {    1,    0, NULL },                                       /* 0x0E */
2127     {    1,    0, NULL },                                       /* 0x0F */
2128     {    1,    0, NULL },                                       /* 0x10 */
2129     {    1,    0, NULL },                                       /* 0x11 */
2130     {    1,    0, NULL },                                       /* 0x12 */
2131     {    1,    0, NULL },                                       /* 0x13 */
2132     {    1,    0, NULL },                                       /* 0x14 */
2133     {    1,    0, NULL },                                       /* 0x15 */
2134     {    1,    0, NULL },                                       /* 0x16 */
2135     {    1,    0, NULL },                                       /* 0x17 */
2136     {    1,    0, NULL },                                       /* 0x18 */
2137     {    1,    0, NULL },                                       /* 0x19 */
2138     {    1,    0, NULL },                                       /* 0x1A */
2139     {    1,    0, NULL },                                       /* 0x1B */
2140     {    1,    0, NULL },                                       /* 0x1C */
2141     {    1,    0, NULL },                                       /* 0x1D */
2142     { 0x3F, 0x3F, aImplUniToDBCSTab_APPLECHINSIMP_1E },         /* 0x1E */ /* we convert this char also to unicode */
2143     {    1,    0, NULL },                                       /* 0x1F */
2144     { 0x10, 0xAC, aImplUniToDBCSTab_GBK_20 },                   /* 0x20 */
2145     { 0x03, 0x99, aImplUniToDBCSTab_GBK_21 },                   /* 0x21 */
2146     { 0x08, 0xEF, aImplUniToDBCSTab_GBK_22 },                   /* 0x22 */
2147     { 0x12, 0x12, aImplUniToDBCSTab_GB_23 },                    /* 0x23 */
2148     { 0x60, 0x9B, aImplUniToDBCSTab_GB_24 },                    /* 0x24 */
2149     { 0x00, 0xE5, aImplUniToDBCSTab_GBK_25 },                   /* 0x25 */
2150     { 0x05, 0x42, aImplUniToDBCSTab_GBK_26 },                   /* 0x26 */
2151     {    1,    0, NULL },                                       /* 0x27 */
2152     {    1,    0, NULL },                                       /* 0x28 */
2153     {    1,    0, NULL },                                       /* 0x29 */
2154     {    1,    0, NULL },                                       /* 0x2A */
2155     {    1,    0, NULL },                                       /* 0x2B */
2156     {    1,    0, NULL },                                       /* 0x2C */
2157     {    1,    0, NULL },                                       /* 0x2D */
2158     {    1,    0, NULL },                                       /* 0x2E */
2159     {    1,    0, NULL },                                       /* 0x2F */
2160     { 0x00, 0xFE, aImplUniToDBCSTab_GBK_30 },                   /* 0x30 */
2161     { 0x05, 0x29, aImplUniToDBCSTab_GB_31 },                    /* 0x31 */
2162     { 0x20, 0xA3, aImplUniToDBCSTab_GBK_32 },                   /* 0x32 */
2163     { 0x8E, 0xD5, aImplUniToDBCSTab_GBK_33 },                   /* 0x33 */
2164     {    1,    0, NULL },                                       /* 0x34 */
2165     {    1,    0, NULL },                                       /* 0x35 */
2166     {    1,    0, NULL },                                       /* 0x36 */
2167     {    1,    0, NULL },                                       /* 0x37 */
2168     {    1,    0, NULL },                                       /* 0x38 */
2169     {    1,    0, NULL },                                       /* 0x39 */
2170     {    1,    0, NULL },                                       /* 0x3A */
2171     {    1,    0, NULL },                                       /* 0x3B */
2172     {    1,    0, NULL },                                       /* 0x3C */
2173     {    1,    0, NULL },                                       /* 0x3D */
2174     {    1,    0, NULL },                                       /* 0x3E */
2175     {    1,    0, NULL },                                       /* 0x3F */
2176     {    1,    0, NULL },                                       /* 0x40 */
2177     {    1,    0, NULL },                                       /* 0x41 */
2178     {    1,    0, NULL },                                       /* 0x42 */
2179     {    1,    0, NULL },                                       /* 0x43 */
2180     {    1,    0, NULL },                                       /* 0x44 */
2181     {    1,    0, NULL },                                       /* 0x45 */
2182     {    1,    0, NULL },                                       /* 0x46 */
2183     {    1,    0, NULL },                                       /* 0x47 */
2184     {    1,    0, NULL },                                       /* 0x48 */
2185     {    1,    0, NULL },                                       /* 0x49 */
2186     {    1,    0, NULL },                                       /* 0x4A */
2187     {    1,    0, NULL },                                       /* 0x4B */
2188     {    1,    0, NULL },                                       /* 0x4C */
2189     {    1,    0, NULL },                                       /* 0x4D */
2190     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_4E },                   /* 0x4E */
2191     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_4F },                   /* 0x4F */
2192     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_50 },                   /* 0x50 */
2193     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_51 },                   /* 0x51 */
2194     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_52 },                   /* 0x52 */
2195     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_53 },                   /* 0x53 */
2196     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_54 },                   /* 0x54 */
2197     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_55 },                   /* 0x55 */
2198     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_56 },                   /* 0x56 */
2199     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_57 },                   /* 0x57 */
2200     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_58 },                   /* 0x58 */
2201     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_59 },                   /* 0x59 */
2202     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5A },                   /* 0x5A */
2203     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5B },                   /* 0x5B */
2204     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5C },                   /* 0x5C */
2205     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5D },                   /* 0x5D */
2206     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5E },                   /* 0x5E */
2207     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_5F },                   /* 0x5F */
2208     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_60 },                   /* 0x60 */
2209     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_61 },                   /* 0x61 */
2210     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_62 },                   /* 0x62 */
2211     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_63 },                   /* 0x63 */
2212     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_64 },                   /* 0x64 */
2213     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_65 },                   /* 0x65 */
2214     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_66 },                   /* 0x66 */
2215     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_67 },                   /* 0x67 */
2216     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_68 },                   /* 0x68 */
2217     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_69 },                   /* 0x69 */
2218     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6A },                   /* 0x6A */
2219     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6B },                   /* 0x6B */
2220     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6C },                   /* 0x6C */
2221     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6D },                   /* 0x6D */
2222     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6E },                   /* 0x6E */
2223     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_6F },                   /* 0x6F */
2224     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_70 },                   /* 0x70 */
2225     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_71 },                   /* 0x71 */
2226     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_72 },                   /* 0x72 */
2227     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_73 },                   /* 0x73 */
2228     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_74 },                   /* 0x74 */
2229     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_75 },                   /* 0x75 */
2230     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_76 },                   /* 0x76 */
2231     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_77 },                   /* 0x77 */
2232     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_78 },                   /* 0x78 */
2233     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_79 },                   /* 0x79 */
2234     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7A },                   /* 0x7A */
2235     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7B },                   /* 0x7B */
2236     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7C },                   /* 0x7C */
2237     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7D },                   /* 0x7D */
2238     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7E },                   /* 0x7E */
2239     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_7F },                   /* 0x7F */
2240     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_80 },                   /* 0x80 */
2241     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_81 },                   /* 0x81 */
2242     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_82 },                   /* 0x82 */
2243     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_83 },                   /* 0x83 */
2244     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_84 },                   /* 0x84 */
2245     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_85 },                   /* 0x85 */
2246     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_86 },                   /* 0x86 */
2247     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_87 },                   /* 0x87 */
2248     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_88 },                   /* 0x88 */
2249     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_89 },                   /* 0x89 */
2250     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8A },                   /* 0x8A */
2251     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8B },                   /* 0x8B */
2252     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8C },                   /* 0x8C */
2253     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8D },                   /* 0x8D */
2254     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8E },                   /* 0x8E */
2255     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_8F },                   /* 0x8F */
2256     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_90 },                   /* 0x90 */
2257     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_91 },                   /* 0x91 */
2258     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_92 },                   /* 0x92 */
2259     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_93 },                   /* 0x93 */
2260     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_94 },                   /* 0x94 */
2261     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_95 },                   /* 0x95 */
2262     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_96 },                   /* 0x96 */
2263     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_97 },                   /* 0x97 */
2264     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_98 },                   /* 0x98 */
2265     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_99 },                   /* 0x99 */
2266     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_9A },                   /* 0x9A */
2267     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_9B },                   /* 0x9B */
2268     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_9C },                   /* 0x9C */
2269     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_9D },                   /* 0x9D */
2270     { 0x00, 0xFF, aImplUniToDBCSTab_GBK_9E },                   /* 0x9E */
2271     { 0x00, 0xA5, aImplUniToDBCSTab_GBK_9F },                   /* 0x9F */
2272     {    1,    0, NULL },                                       /* 0xA0 */
2273     {    1,    0, NULL },                                       /* 0xA1 */
2274     {    1,    0, NULL },                                       /* 0xA2 */
2275     {    1,    0, NULL },                                       /* 0xA3 */
2276     {    1,    0, NULL },                                       /* 0xA4 */
2277     {    1,    0, NULL },                                       /* 0xA5 */
2278     {    1,    0, NULL },                                       /* 0xA6 */
2279     {    1,    0, NULL },                                       /* 0xA7 */
2280     {    1,    0, NULL },                                       /* 0xA8 */
2281     {    1,    0, NULL },                                       /* 0xA9 */
2282     {    1,    0, NULL },                                       /* 0xAA */
2283     {    1,    0, NULL },                                       /* 0xAB */
2284     {    1,    0, NULL },                                       /* 0xAC */
2285     {    1,    0, NULL },                                       /* 0xAD */
2286     {    1,    0, NULL },                                       /* 0xAE */
2287     {    1,    0, NULL },                                       /* 0xAF */
2288     {    1,    0, NULL },                                       /* 0xB0 */
2289     {    1,    0, NULL },                                       /* 0xB1 */
2290     {    1,    0, NULL },                                       /* 0xB2 */
2291     {    1,    0, NULL },                                       /* 0xB3 */
2292     {    1,    0, NULL },                                       /* 0xB4 */
2293     {    1,    0, NULL },                                       /* 0xB5 */
2294     {    1,    0, NULL },                                       /* 0xB6 */
2295     {    1,    0, NULL },                                       /* 0xB7 */
2296     {    1,    0, NULL },                                       /* 0xB8 */
2297     {    1,    0, NULL },                                       /* 0xB9 */
2298     {    1,    0, NULL },                                       /* 0xBA */
2299     {    1,    0, NULL },                                       /* 0xBB */
2300     {    1,    0, NULL },                                       /* 0xBC */
2301     {    1,    0, NULL },                                       /* 0xBD */
2302     {    1,    0, NULL },                                       /* 0xBE */
2303     {    1,    0, NULL },                                       /* 0xBF */
2304     {    1,    0, NULL },                                       /* 0xC0 */
2305     {    1,    0, NULL },                                       /* 0xC1 */
2306     {    1,    0, NULL },                                       /* 0xC2 */
2307     {    1,    0, NULL },                                       /* 0xC3 */
2308     {    1,    0, NULL },                                       /* 0xC4 */
2309     {    1,    0, NULL },                                       /* 0xC5 */
2310     {    1,    0, NULL },                                       /* 0xC6 */
2311     {    1,    0, NULL },                                       /* 0xC7 */
2312     {    1,    0, NULL },                                       /* 0xC8 */
2313     {    1,    0, NULL },                                       /* 0xC9 */
2314     {    1,    0, NULL },                                       /* 0xCA */
2315     {    1,    0, NULL },                                       /* 0xCB */
2316     {    1,    0, NULL },                                       /* 0xCC */
2317     {    1,    0, NULL },                                       /* 0xCD */
2318     {    1,    0, NULL },                                       /* 0xCE */
2319     {    1,    0, NULL },                                       /* 0xCF */
2320     {    1,    0, NULL },                                       /* 0xD0 */
2321     {    1,    0, NULL },                                       /* 0xD1 */
2322     {    1,    0, NULL },                                       /* 0xD2 */
2323     {    1,    0, NULL },                                       /* 0xD3 */
2324     {    1,    0, NULL },                                       /* 0xD4 */
2325     {    1,    0, NULL },                                       /* 0xD5 */
2326     {    1,    0, NULL },                                       /* 0xD6 */
2327     {    1,    0, NULL },                                       /* 0xD7 */
2328     {    1,    0, NULL },                                       /* 0xD8 */
2329     {    1,    0, NULL },                                       /* 0xD9 */
2330     {    1,    0, NULL },                                       /* 0xDA */
2331     {    1,    0, NULL },                                       /* 0xDB */
2332     {    1,    0, NULL },                                       /* 0xDC */
2333     {    1,    0, NULL },                                       /* 0xDD */
2334     {    1,    0, NULL },                                       /* 0xDE */
2335     {    1,    0, NULL },                                       /* 0xDF */
2336     {    1,    0, NULL },                                       /* 0xE0 */
2337     {    1,    0, NULL },                                       /* 0xE1 */
2338     {    1,    0, NULL },                                       /* 0xE2 */
2339     {    1,    0, NULL },                                       /* 0xE3 */
2340     {    1,    0, NULL },                                       /* 0xE4 */
2341     {    1,    0, NULL },                                       /* 0xE5 */
2342     {    1,    0, NULL },                                       /* 0xE6 */
2343     {    1,    0, NULL },                                       /* 0xE7 */
2344     {    1,    0, NULL },                                       /* 0xE8 */
2345     {    1,    0, NULL },                                       /* 0xE9 */
2346     {    1,    0, NULL },                                       /* 0xEA */
2347     {    1,    0, NULL },                                       /* 0xEB */
2348     {    1,    0, NULL },                                       /* 0xEC */
2349     {    1,    0, NULL },                                       /* 0xED */
2350     {    1,    0, NULL },                                       /* 0xEE */
2351     {    1,    0, NULL },                                       /* 0xEF */
2352     {    1,    0, NULL },                                       /* 0xF0 */
2353     {    1,    0, NULL },                                       /* 0xF1 */
2354     {    1,    0, NULL },                                       /* 0xF2 */
2355     {    1,    0, NULL },                                       /* 0xF3 */
2356     {    1,    0, NULL },                                       /* 0xF4 */
2357     {    1,    0, NULL },                                       /* 0xF5 */
2358     {    1,    0, NULL },                                       /* 0xF6 */
2359     {    1,    0, NULL },                                       /* 0xF7 */
2360     {    1,    0, NULL },                                       /* 0xF8 */
2361     { 0x2C, 0xF1, aImplUniToDBCSTab_GBK_F9 },                   /* 0xF9 */
2362     { 0x0C, 0x29, aImplUniToDBCSTab_GBK_FA },                   /* 0xFA */
2363     {    1,    0, NULL },                                       /* 0xFB */
2364     {    1,    0, NULL },                                       /* 0xFC */
2365     {    1,    0, NULL },                                       /* 0xFD */
2366     { 0x30, 0x6B, aImplUniToDBCSTab_GBK_FE },                   /* 0xFE */
2367     { 0x01, 0xE5, aImplUniToDBCSTab_GBK_FF }                    /* 0xFF */
2370 /* ----------------------------------------------------------------------- */
2372 static ImplDBCSConvertData const aImplMS936DBCSCvtData =
2374     aMS936UniLeadTab,
2375     aMS936DBCSHighTab,
2376     0x00, 0xFF,
2377     0x40, 0xFE,
2378     aImplMS936DBCSEUDCTab,
2379     DBCS_EUDC_MS936_COUNT
2382 /* ----------------------------------------------------------------------- */
2384 static ImplTextEncodingData const aImplMS936TextEncodingData
2385     = { { &aImplMS936DBCSCvtData,
2386           ImplDBCSToUnicode,
2387           ImplUnicodeToDBCS,
2388           NULL,
2389           NULL,
2390           NULL,
2391           NULL,
2392           NULL,
2393           NULL },
2394         1,
2395         2,
2396         2,
2397         134,
2398         "euc-cn",
2399         "gb2312",
2400         RTL_TEXTENCODING_INFO_MULTIBYTE };
2401     /* WIN/DOS/OS2, SCRIPT_CHINESE_SIMPLIFIED, pc code page 936, mac encoding
2402        25 */
2404 /* ======================================================================= */
2406 static ImplDBCSToUniLeadTab const aAPPLECHINSIMPUniLeadTab[256] =
2408     { 0x0000,    0,    0, NULL },                               /* 0x00 */
2409     { 0x0001,    0,    0, NULL },                               /* 0x01 */
2410     { 0x0002,    0,    0, NULL },                               /* 0x02 */
2411     { 0x0003,    0,    0, NULL },                               /* 0x03 */
2412     { 0x0004,    0,    0, NULL },                               /* 0x04 */
2413     { 0x0005,    0,    0, NULL },                               /* 0x05 */
2414     { 0x0006,    0,    0, NULL },                               /* 0x06 */
2415     { 0x0007,    0,    0, NULL },                               /* 0x07 */
2416     { 0x0008,    0,    0, NULL },                               /* 0x08 */
2417     { 0x0009,    0,    0, NULL },                               /* 0x09 */
2418     { 0x000A,    0,    0, NULL },                               /* 0x0A */
2419     { 0x000B,    0,    0, NULL },                               /* 0x0B */
2420     { 0x000C,    0,    0, NULL },                               /* 0x0C */
2421     { 0x000D,    0,    0, NULL },                               /* 0x0D */
2422     { 0x000E,    0,    0, NULL },                               /* 0x0E */
2423     { 0x000F,    0,    0, NULL },                               /* 0x0F */
2424     { 0x0010,    0,    0, NULL },                               /* 0x10 */
2425     { 0x0011,    0,    0, NULL },                               /* 0x11 */
2426     { 0x0012,    0,    0, NULL },                               /* 0x12 */
2427     { 0x0013,    0,    0, NULL },                               /* 0x13 */
2428     { 0x0014,    0,    0, NULL },                               /* 0x14 */
2429     { 0x0015,    0,    0, NULL },                               /* 0x15 */
2430     { 0x0016,    0,    0, NULL },                               /* 0x16 */
2431     { 0x0017,    0,    0, NULL },                               /* 0x17 */
2432     { 0x0018,    0,    0, NULL },                               /* 0x18 */
2433     { 0x0019,    0,    0, NULL },                               /* 0x19 */
2434     { 0x001A,    0,    0, NULL },                               /* 0x1A */
2435     { 0x001B,    0,    0, NULL },                               /* 0x1B */
2436     { 0x001C,    0,    0, NULL },                               /* 0x1C */
2437     { 0x001D,    0,    0, NULL },                               /* 0x1D */
2438     { 0x001E,    0,    0, NULL },                               /* 0x1E */
2439     { 0x001F,    0,    0, NULL },                               /* 0x1F */
2440     { 0x0020,    0,    0, NULL },                               /* 0x20 */
2441     { 0x0021,    0,    0, NULL },                               /* 0x21 */
2442     { 0x0022,    0,    0, NULL },                               /* 0x22 */
2443     { 0x0023,    0,    0, NULL },                               /* 0x23 */
2444     { 0x0024,    0,    0, NULL },                               /* 0x24 */
2445     { 0x0025,    0,    0, NULL },                               /* 0x25 */
2446     { 0x0026,    0,    0, NULL },                               /* 0x26 */
2447     { 0x0027,    0,    0, NULL },                               /* 0x27 */
2448     { 0x0028,    0,    0, NULL },                               /* 0x28 */
2449     { 0x0029,    0,    0, NULL },                               /* 0x29 */
2450     { 0x002A,    0,    0, NULL },                               /* 0x2A */
2451     { 0x002B,    0,    0, NULL },                               /* 0x2B */
2452     { 0x002C,    0,    0, NULL },                               /* 0x2C */
2453     { 0x002D,    0,    0, NULL },                               /* 0x2D */
2454     { 0x002E,    0,    0, NULL },                               /* 0x2E */
2455     { 0x002F,    0,    0, NULL },                               /* 0x2F */
2456     { 0x0030,    0,    0, NULL },                               /* 0x30 */
2457     { 0x0031,    0,    0, NULL },                               /* 0x31 */
2458     { 0x0032,    0,    0, NULL },                               /* 0x32 */
2459     { 0x0033,    0,    0, NULL },                               /* 0x33 */
2460     { 0x0034,    0,    0, NULL },                               /* 0x34 */
2461     { 0x0035,    0,    0, NULL },                               /* 0x35 */
2462     { 0x0036,    0,    0, NULL },                               /* 0x36 */
2463     { 0x0037,    0,    0, NULL },                               /* 0x37 */
2464     { 0x0038,    0,    0, NULL },                               /* 0x38 */
2465     { 0x0039,    0,    0, NULL },                               /* 0x39 */
2466     { 0x003A,    0,    0, NULL },                               /* 0x3A */
2467     { 0x003B,    0,    0, NULL },                               /* 0x3B */
2468     { 0x003C,    0,    0, NULL },                               /* 0x3C */
2469     { 0x003D,    0,    0, NULL },                               /* 0x3D */
2470     { 0x003E,    0,    0, NULL },                               /* 0x3E */
2471     { 0x003F,    0,    0, NULL },                               /* 0x3F */
2472     { 0x0040,    0,    0, NULL },                               /* 0x40 */
2473     { 0x0041,    0,    0, NULL },                               /* 0x41 */
2474     { 0x0042,    0,    0, NULL },                               /* 0x42 */
2475     { 0x0043,    0,    0, NULL },                               /* 0x43 */
2476     { 0x0044,    0,    0, NULL },                               /* 0x44 */
2477     { 0x0045,    0,    0, NULL },                               /* 0x45 */
2478     { 0x0046,    0,    0, NULL },                               /* 0x46 */
2479     { 0x0047,    0,    0, NULL },                               /* 0x47 */
2480     { 0x0048,    0,    0, NULL },                               /* 0x48 */
2481     { 0x0049,    0,    0, NULL },                               /* 0x49 */
2482     { 0x004A,    0,    0, NULL },                               /* 0x4A */
2483     { 0x004B,    0,    0, NULL },                               /* 0x4B */
2484     { 0x004C,    0,    0, NULL },                               /* 0x4C */
2485     { 0x004D,    0,    0, NULL },                               /* 0x4D */
2486     { 0x004E,    0,    0, NULL },                               /* 0x4E */
2487     { 0x004F,    0,    0, NULL },                               /* 0x4F */
2488     { 0x0050,    0,    0, NULL },                               /* 0x50 */
2489     { 0x0051,    0,    0, NULL },                               /* 0x51 */
2490     { 0x0052,    0,    0, NULL },                               /* 0x52 */
2491     { 0x0053,    0,    0, NULL },                               /* 0x53 */
2492     { 0x0054,    0,    0, NULL },                               /* 0x54 */
2493     { 0x0055,    0,    0, NULL },                               /* 0x55 */
2494     { 0x0056,    0,    0, NULL },                               /* 0x56 */
2495     { 0x0057,    0,    0, NULL },                               /* 0x57 */
2496     { 0x0058,    0,    0, NULL },                               /* 0x58 */
2497     { 0x0059,    0,    0, NULL },                               /* 0x59 */
2498     { 0x005A,    0,    0, NULL },                               /* 0x5A */
2499     { 0x005B,    0,    0, NULL },                               /* 0x5B */
2500     { 0x005C,    0,    0, NULL },                               /* 0x5C */
2501     { 0x005D,    0,    0, NULL },                               /* 0x5D */
2502     { 0x005E,    0,    0, NULL },                               /* 0x5E */
2503     { 0x005F,    0,    0, NULL },                               /* 0x5F */
2504     { 0x0060,    0,    0, NULL },                               /* 0x60 */
2505     { 0x0061,    0,    0, NULL },                               /* 0x61 */
2506     { 0x0062,    0,    0, NULL },                               /* 0x62 */
2507     { 0x0063,    0,    0, NULL },                               /* 0x63 */
2508     { 0x0064,    0,    0, NULL },                               /* 0x64 */
2509     { 0x0065,    0,    0, NULL },                               /* 0x65 */
2510     { 0x0066,    0,    0, NULL },                               /* 0x66 */
2511     { 0x0067,    0,    0, NULL },                               /* 0x67 */
2512     { 0x0068,    0,    0, NULL },                               /* 0x68 */
2513     { 0x0069,    0,    0, NULL },                               /* 0x69 */
2514     { 0x006A,    0,    0, NULL },                               /* 0x6A */
2515     { 0x006B,    0,    0, NULL },                               /* 0x6B */
2516     { 0x006C,    0,    0, NULL },                               /* 0x6C */
2517     { 0x006D,    0,    0, NULL },                               /* 0x6D */
2518     { 0x006E,    0,    0, NULL },                               /* 0x6E */
2519     { 0x006F,    0,    0, NULL },                               /* 0x6F */
2520     { 0x0070,    0,    0, NULL },                               /* 0x70 */
2521     { 0x0071,    0,    0, NULL },                               /* 0x71 */
2522     { 0x0072,    0,    0, NULL },                               /* 0x72 */
2523     { 0x0073,    0,    0, NULL },                               /* 0x73 */
2524     { 0x0074,    0,    0, NULL },                               /* 0x74 */
2525     { 0x0075,    0,    0, NULL },                               /* 0x75 */
2526     { 0x0076,    0,    0, NULL },                               /* 0x76 */
2527     { 0x0077,    0,    0, NULL },                               /* 0x77 */
2528     { 0x0078,    0,    0, NULL },                               /* 0x78 */
2529     { 0x0079,    0,    0, NULL },                               /* 0x79 */
2530     { 0x007A,    0,    0, NULL },                               /* 0x7A */
2531     { 0x007B,    0,    0, NULL },                               /* 0x7B */
2532     { 0x007C,    0,    0, NULL },                               /* 0x7C */
2533     { 0x007D,    0,    0, NULL },                               /* 0x7D */
2534     { 0x007E,    0,    0, NULL },                               /* 0x7E */
2535     { 0x007F,    0,    0, NULL },                               /* 0x7F */
2536     {      0,    1,    0, NULL },                               /* 0x80 */
2537     { 0xF880,    0,    0, NULL },                               /* 0x81 */
2538     { 0xF881,    0,    0, NULL },                               /* 0x82 */
2539     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x83 */ /* We convert this as double byte */
2540     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x84 */ /* We convert this as double byte */
2541     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x85 */ /* We convert this as double byte */
2542     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x86 */ /* We convert this as double byte */
2543     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x87 */ /* We convert this as double byte */
2544     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x88 */ /* We convert this as double byte */
2545     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x89 */ /* We convert this as double byte */
2546     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8A */ /* We convert this as double byte */
2547     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8B */ /* We convert this as double byte */
2548     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8C */ /* We convert this as double byte */
2549     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8D */ /* We convert this as double byte */
2550     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8E */ /* We convert this as double byte */
2551     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x8F */ /* We convert this as double byte */
2552     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x90 */ /* We convert this as double byte */
2553     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x91 */ /* We convert this as double byte */
2554     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x92 */ /* We convert this as double byte */
2555     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x93 */ /* We convert this as double byte */
2556     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x94 */ /* We convert this as double byte */
2557     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x95 */ /* We convert this as double byte */
2558     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x96 */ /* We convert this as double byte */
2559     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x97 */ /* We convert this as double byte */
2560     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x98 */ /* We convert this as double byte */
2561     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x99 */ /* We convert this as double byte */
2562     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9A */ /* We convert this as double byte */
2563     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9B */ /* We convert this as double byte */
2564     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9C */ /* We convert this as double byte */
2565     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9D */ /* We convert this as double byte */
2566     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9E */ /* We convert this as double byte */
2567     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0x9F */ /* We convert this as double byte */
2568     { 0x00A0,    0,    0, NULL },                               /* 0xA0 */
2569     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GB_A1 },            /* 0xA1 */
2570     {      0, 0xA1, 0xFC, aImplDBCSToUniTab_GB_A2 },            /* 0xA2 */
2571     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GB_A3 },            /* 0xA3 */
2572     {      0, 0xA1, 0xF3, aImplDBCSToUniTab_GB_A4 },            /* 0xA4 */
2573     {      0, 0xA1, 0xF6, aImplDBCSToUniTab_GB_A5 },            /* 0xA5 */
2574     {      0, 0xA1, 0xF5, aImplDBCSToUniTab_GB_A6 },            /* 0xA6 */
2575     {      0, 0xA1, 0xF1, aImplDBCSToUniTab_GB_A7 },            /* 0xA7 */
2576     {      0, 0xA1, 0xE9, aImplDBCSToUniTab_GBK_A8+GBKOFF },    /* 0xA8 */
2577     {      0, 0xA1, 0xEF, aImplDBCSToUniTab_GBK_A9+GBKOFF },    /* 0xA9 */
2578     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAA */ /* We convert this as double byte */
2579     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAB */ /* We convert this as double byte */
2580     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAC */ /* We convert this as double byte */
2581     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAD */ /* We convert this as double byte */
2582     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAE */ /* We convert this as double byte */
2583     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xAF */ /* We convert this as double byte */
2584     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B0+GBKOFF },    /* 0xB0 */
2585     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B1+GBKOFF },    /* 0xB1 */
2586     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B2+GBKOFF },    /* 0xB2 */
2587     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B3+GBKOFF },    /* 0xB3 */
2588     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B4+GBKOFF },    /* 0xB4 */
2589     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B5+GBKOFF },    /* 0xB5 */
2590     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B6+GBKOFF },    /* 0xB6 */
2591     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B7+GBKOFF },    /* 0xB7 */
2592     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B8+GBKOFF },    /* 0xB8 */
2593     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_B9+GBKOFF },    /* 0xB9 */
2594     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BA+GBKOFF },    /* 0xBA */
2595     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BB+GBKOFF },    /* 0xBB */
2596     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BC+GBKOFF },    /* 0xBC */
2597     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BD+GBKOFF },    /* 0xBD */
2598     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BE+GBKOFF },    /* 0xBE */
2599     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_BF+GBKOFF },    /* 0xBF */
2600     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C0+GBKOFF },    /* 0xC0 */
2601     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C1+GBKOFF },    /* 0xC1 */
2602     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C2+GBKOFF },    /* 0xC2 */
2603     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C3+GBKOFF },    /* 0xC3 */
2604     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C4+GBKOFF },    /* 0xC4 */
2605     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C5+GBKOFF },    /* 0xC5 */
2606     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C6+GBKOFF },    /* 0xC6 */
2607     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C7+GBKOFF },    /* 0xC7 */
2608     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C8+GBKOFF },    /* 0xC8 */
2609     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_C9+GBKOFF },    /* 0xC9 */
2610     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CA+GBKOFF },    /* 0xCA */
2611     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CB+GBKOFF },    /* 0xCB */
2612     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CC+GBKOFF },    /* 0xCC */
2613     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CD+GBKOFF },    /* 0xCD */
2614     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CE+GBKOFF },    /* 0xCE */
2615     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_CF+GBKOFF },    /* 0xCF */
2616     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D0+GBKOFF },    /* 0xD0 */
2617     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D1+GBKOFF },    /* 0xD1 */
2618     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D2+GBKOFF },    /* 0xD2 */
2619     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D3+GBKOFF },    /* 0xD3 */
2620     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D4+GBKOFF },    /* 0xD4 */
2621     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D5+GBKOFF },    /* 0xD5 */
2622     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D6+GBKOFF },    /* 0xD6 */
2623     {      0, 0xA1, 0xF9, aImplDBCSToUniTab_GBK_D7+GBKOFF },    /* 0xD7 */
2624     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D8+GBKOFF },    /* 0xD8 */
2625     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_D9+GBKOFF },    /* 0xD9 */
2626     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DA+GBKOFF },    /* 0xDA */
2627     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DB+GBKOFF },    /* 0xDB */
2628     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DC+GBKOFF },    /* 0xDC */
2629     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DD+GBKOFF },    /* 0xDD */
2630     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DE+GBKOFF },    /* 0xDE */
2631     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_DF+GBKOFF },    /* 0xDF */
2632     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E0+GBKOFF },    /* 0xE0 */
2633     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E1+GBKOFF },    /* 0xE1 */
2634     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E2+GBKOFF },    /* 0xE2 */
2635     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E3+GBKOFF },    /* 0xE3 */
2636     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E4+GBKOFF },    /* 0xE4 */
2637     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E5+GBKOFF },    /* 0xE5 */
2638     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E6+GBKOFF },    /* 0xE6 */
2639     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E7+GBKOFF },    /* 0xE7 */
2640     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E8+GBKOFF },    /* 0xE8 */
2641     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_E9+GBKOFF },    /* 0xE9 */
2642     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_EA+GBKOFF },    /* 0xEA */
2643     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_EB+GBKOFF },    /* 0xEB */
2644     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_EC+GBKOFF },    /* 0xEC */
2645     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_ED+GBKOFF },    /* 0xED */
2646     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_EE+GBKOFF },    /* 0xEE */
2647     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_EF+GBKOFF },    /* 0xEF */
2648     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F0+GBKOFF },    /* 0xF0 */
2649     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F1+GBKOFF },    /* 0xF1 */
2650     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F2+GBKOFF },    /* 0xF2 */
2651     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F3+GBKOFF },    /* 0xF3 */
2652     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F4+GBKOFF },    /* 0xF4 */
2653     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F5+GBKOFF },    /* 0xF5 */
2654     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F6+GBKOFF },    /* 0xF6 */
2655     {      0, 0xA1, 0xFE, aImplDBCSToUniTab_GBK_F7+GBKOFF },    /* 0xF7 */
2656     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xF8 */ /* We convert this as double byte */
2657     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xF9 */ /* We convert this as double byte */
2658     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFA */ /* We convert this as double byte */
2659     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFB */ /* We convert this as double byte */
2660     {      0,    1,    0, aImplDoubleByteIdentifierTab },       /* 0xFC */ /* We convert this as double byte */
2661     { 0x00A9,    0,    0, NULL },                               /* 0xFD */
2662     { 0x2122,    0,    0, NULL },                               /* 0xFE */
2663     { 0x2026,    0,    0, NULL }                                /* 0xFF */
2666 /* ----------------------------------------------------------------------- */
2668 static ImplUniToDBCSHighTab const aAPPLECHINSIMPDBCSHighTab[256] =
2670     { 0x00, 0xFC, aImplUniToDBCSTab_APPLECHINSIMP_00 },         /* 0x00 */
2671     { 0x01, 0xDC, aImplUniToDBCSTab_GB_01 },                    /* 0x01 */
2672     { 0x51, 0xC9, aImplUniToDBCSTab_GB_02 },                    /* 0x02 */
2673     { 0x91, 0xC9, aImplUniToDBCSTab_GB_03 },                    /* 0x03 */
2674     { 0x01, 0x51, aImplUniToDBCSTab_GB_04 },                    /* 0x04 */
2675     {    1,    0, NULL },                                       /* 0x05 */
2676     {    1,    0, NULL },                                       /* 0x06 */
2677     {    1,    0, NULL },                                       /* 0x07 */
2678     {    1,    0, NULL },                                       /* 0x08 */
2679     {    1,    0, NULL },                                       /* 0x09 */
2680     {    1,    0, NULL },                                       /* 0x0A */
2681     {    1,    0, NULL },                                       /* 0x0B */
2682     {    1,    0, NULL },                                       /* 0x0C */
2683     {    1,    0, NULL },                                       /* 0x0D */
2684     {    1,    0, NULL },                                       /* 0x0E */
2685     {    1,    0, NULL },                                       /* 0x0F */
2686     {    1,    0, NULL },                                       /* 0x10 */
2687     {    1,    0, NULL },                                       /* 0x11 */
2688     {    1,    0, NULL },                                       /* 0x12 */
2689     {    1,    0, NULL },                                       /* 0x13 */
2690     {    1,    0, NULL },                                       /* 0x14 */
2691     {    1,    0, NULL },                                       /* 0x15 */
2692     {    1,    0, NULL },                                       /* 0x16 */
2693     {    1,    0, NULL },                                       /* 0x17 */
2694     {    1,    0, NULL },                                       /* 0x18 */
2695     {    1,    0, NULL },                                       /* 0x19 */
2696     {    1,    0, NULL },                                       /* 0x1A */
2697     {    1,    0, NULL },                                       /* 0x1B */
2698     {    1,    0, NULL },                                       /* 0x1C */
2699     {    1,    0, NULL },                                       /* 0x1D */
2700     { 0x3F, 0x3F, aImplUniToDBCSTab_APPLECHINSIMP_1E },         /* 0x1E */
2701     {    1,    0, NULL },                                       /* 0x1F */
2702     { 0x14, 0x3E, aImplUniToDBCSTab_GB_20 },                    /* 0x20 */
2703     { 0x03, 0x93, aImplUniToDBCSTab_APPLECHINSIMP_21 },         /* 0x21 */
2704     { 0x08, 0xEF, aImplUniToDBCSTab_GB_22 },                    /* 0x22 */
2705     { 0x12, 0x12, aImplUniToDBCSTab_GB_23 },                    /* 0x23 */
2706     { 0x60, 0x9B, aImplUniToDBCSTab_GB_24 },                    /* 0x24 */
2707     { 0x00, 0xCF, aImplUniToDBCSTab_GB_25 },                    /* 0x25 */
2708     { 0x05, 0x42, aImplUniToDBCSTab_GB_26 },                    /* 0x26 */
2709     {    1,    0, NULL },                                       /* 0x27 */
2710     {    1,    0, NULL },                                       /* 0x28 */
2711     {    1,    0, NULL },                                       /* 0x29 */
2712     {    1,    0, NULL },                                       /* 0x2A */
2713     {    1,    0, NULL },                                       /* 0x2B */
2714     {    1,    0, NULL },                                       /* 0x2C */
2715     {    1,    0, NULL },                                       /* 0x2D */
2716     {    1,    0, NULL },                                       /* 0x2E */
2717     {    1,    0, NULL },                                       /* 0x2F */
2718     { 0x00, 0xFB, aImplUniToDBCSTab_GB_30 },                    /* 0x30 */
2719     { 0x05, 0x29, aImplUniToDBCSTab_GB_31 },                    /* 0x31 */
2720     { 0x20, 0x29, aImplUniToDBCSTab_GBK_32 },                   /* 0x32 */
2721     {    1,    0, NULL },                                       /* 0x33 */
2722     {    1,    0, NULL },                                       /* 0x34 */
2723     {    1,    0, NULL },                                       /* 0x35 */
2724     {    1,    0, NULL },                                       /* 0x36 */
2725     {    1,    0, NULL },                                       /* 0x37 */
2726     {    1,    0, NULL },                                       /* 0x38 */
2727     {    1,    0, NULL },                                       /* 0x39 */
2728     {    1,    0, NULL },                                       /* 0x3A */
2729     {    1,    0, NULL },                                       /* 0x3B */
2730     {    1,    0, NULL },                                       /* 0x3C */
2731     {    1,    0, NULL },                                       /* 0x3D */
2732     {    1,    0, NULL },                                       /* 0x3E */
2733     {    1,    0, NULL },                                       /* 0x3F */
2734     {    1,    0, NULL },                                       /* 0x40 */
2735     {    1,    0, NULL },                                       /* 0x41 */
2736     {    1,    0, NULL },                                       /* 0x42 */
2737     {    1,    0, NULL },                                       /* 0x43 */
2738     {    1,    0, NULL },                                       /* 0x44 */
2739     {    1,    0, NULL },                                       /* 0x45 */
2740     {    1,    0, NULL },                                       /* 0x46 */
2741     {    1,    0, NULL },                                       /* 0x47 */
2742     {    1,    0, NULL },                                       /* 0x48 */
2743     {    1,    0, NULL },                                       /* 0x49 */
2744     {    1,    0, NULL },                                       /* 0x4A */
2745     {    1,    0, NULL },                                       /* 0x4B */
2746     {    1,    0, NULL },                                       /* 0x4C */
2747     {    1,    0, NULL },                                       /* 0x4D */
2748     { 0x00, 0xFF, aImplUniToDBCSTab_GB_4E },                    /* 0x4E */
2749     { 0x01, 0xFE, aImplUniToDBCSTab_GB_4F },                    /* 0x4F */
2750     { 0x0C, 0xFB, aImplUniToDBCSTab_GB_50 },                    /* 0x50 */
2751     { 0x06, 0xFF, aImplUniToDBCSTab_GB_51 },                    /* 0x51 */
2752     { 0x00, 0xFF, aImplUniToDBCSTab_GB_52 },                    /* 0x52 */
2753     { 0x00, 0xFD, aImplUniToDBCSTab_GB_53 },                    /* 0x53 */
2754     { 0x01, 0xFF, aImplUniToDBCSTab_GB_54 },                    /* 0x54 */
2755     { 0x01, 0xFE, aImplUniToDBCSTab_GB_55 },                    /* 0x55 */
2756     { 0x00, 0xFF, aImplUniToDBCSTab_GB_56 },                    /* 0x56 */
2757     { 0x03, 0xFD, aImplUniToDBCSTab_GB_57 },                    /* 0x57 */
2758     { 0x00, 0xF9, aImplUniToDBCSTab_GB_58 },                    /* 0x58 */
2759     { 0x02, 0xFF, aImplUniToDBCSTab_GB_59 },                    /* 0x59 */
2760     { 0x01, 0xF1, aImplUniToDBCSTab_GB_5A },                    /* 0x5A */
2761     { 0x09, 0xFF, aImplUniToDBCSTab_GB_5B },                    /* 0x5B */
2762     { 0x01, 0xFB, aImplUniToDBCSTab_GB_5C },                    /* 0x5C */
2763     { 0x02, 0xFE, aImplUniToDBCSTab_GB_5D },                    /* 0x5D */
2764     { 0x01, 0xFF, aImplUniToDBCSTab_GB_5E },                    /* 0x5E */
2765     { 0x00, 0xFF, aImplUniToDBCSTab_GB_5F },                    /* 0x5F */
2766     { 0x00, 0xFA, aImplUniToDBCSTab_GB_60 },                    /* 0x60 */
2767     { 0x00, 0xFF, aImplUniToDBCSTab_GB_61 },                    /* 0x61 */
2768     { 0x06, 0xFF, aImplUniToDBCSTab_GB_62 },                    /* 0x62 */
2769     { 0x01, 0xFF, aImplUniToDBCSTab_GB_63 },                    /* 0x63 */
2770     { 0x00, 0xE6, aImplUniToDBCSTab_GB_64 },                    /* 0x64 */
2771     { 0x00, 0xFA, aImplUniToDBCSTab_GB_65 },                    /* 0x65 */
2772     { 0x00, 0xFF, aImplUniToDBCSTab_GB_66 },                    /* 0x66 */
2773     { 0x00, 0xFF, aImplUniToDBCSTab_GB_67 },                    /* 0x67 */
2774     { 0x00, 0xFC, aImplUniToDBCSTab_GB_68 },                    /* 0x68 */
2775     { 0x01, 0xFF, aImplUniToDBCSTab_GB_69 },                    /* 0x69 */
2776     { 0x0A, 0xAC, aImplUniToDBCSTab_GB_6A },                    /* 0x6A */
2777     { 0x20, 0xFD, aImplUniToDBCSTab_GB_6B },                    /* 0x6B */
2778     { 0x05, 0xFE, aImplUniToDBCSTab_GB_6C },                    /* 0x6C */
2779     { 0x01, 0xFC, aImplUniToDBCSTab_GB_6D },                    /* 0x6D */
2780     { 0x05, 0xF9, aImplUniToDBCSTab_GB_6E },                    /* 0x6E */
2781     { 0x02, 0xEF, aImplUniToDBCSTab_GB_6F },                    /* 0x6F */
2782     { 0x11, 0xFD, aImplUniToDBCSTab_GB_70 },                    /* 0x70 */
2783     { 0x09, 0xF9, aImplUniToDBCSTab_GB_71 },                    /* 0x71 */
2784     { 0x06, 0xFC, aImplUniToDBCSTab_GB_72 },                    /* 0x72 */
2785     { 0x01, 0xF2, aImplUniToDBCSTab_GB_73 },                    /* 0x73 */
2786     { 0x03, 0xFF, aImplUniToDBCSTab_GB_74 },                    /* 0x74 */
2787     { 0x04, 0xFF, aImplUniToDBCSTab_GB_75 },                    /* 0x75 */
2788     { 0x00, 0xFE, aImplUniToDBCSTab_GB_76 },                    /* 0x76 */
2789     { 0x01, 0xFF, aImplUniToDBCSTab_GB_77 },                    /* 0x77 */
2790     { 0x00, 0xFA, aImplUniToDBCSTab_GB_78 },                    /* 0x78 */
2791     { 0x01, 0xFD, aImplUniToDBCSTab_GB_79 },                    /* 0x79 */
2792     { 0x00, 0xFF, aImplUniToDBCSTab_GB_7A },                    /* 0x7A */
2793     { 0x03, 0xFE, aImplUniToDBCSTab_GB_7B },                    /* 0x7B */
2794     { 0x07, 0xFB, aImplUniToDBCSTab_GB_7C },                    /* 0x7C */
2795     { 0x0A, 0xAE, aImplUniToDBCSTab_GB_7D },                    /* 0x7D */
2796     { 0x3B, 0xFF, aImplUniToDBCSTab_GB_7E },                    /* 0x7E */
2797     { 0x00, 0xFC, aImplUniToDBCSTab_GB_7F },                    /* 0x7F */
2798     { 0x00, 0xFD, aImplUniToDBCSTab_GB_80 },                    /* 0x80 */
2799     { 0x02, 0xFE, aImplUniToDBCSTab_GB_81 },                    /* 0x81 */
2800     { 0x00, 0xFB, aImplUniToDBCSTab_GB_82 },                    /* 0x82 */
2801     { 0x01, 0xFD, aImplUniToDBCSTab_GB_83 },                    /* 0x83 */
2802     { 0x01, 0xFF, aImplUniToDBCSTab_GB_84 },                    /* 0x84 */
2803     { 0x0C, 0xFF, aImplUniToDBCSTab_GB_85 },                    /* 0x85 */
2804     { 0x05, 0xFE, aImplUniToDBCSTab_GB_86 },                    /* 0x86 */
2805     { 0x00, 0xFE, aImplUniToDBCSTab_GB_87 },                    /* 0x87 */
2806     { 0x03, 0xFE, aImplUniToDBCSTab_GB_88 },                    /* 0x88 */
2807     { 0x02, 0xF3, aImplUniToDBCSTab_GB_89 },                    /* 0x89 */
2808     { 0x00, 0x93, aImplUniToDBCSTab_GB_8A },                    /* 0x8A */
2809     { 0x07, 0xFF, aImplUniToDBCSTab_GB_8B },                    /* 0x8B */
2810     { 0x00, 0x98, aImplUniToDBCSTab_GB_8C },                    /* 0x8C */
2811     { 0x1D, 0xFD, aImplUniToDBCSTab_GB_8D },                    /* 0x8D */
2812     { 0x05, 0xCE, aImplUniToDBCSTab_GB_8E },                    /* 0x8E */
2813     { 0x66, 0xFD, aImplUniToDBCSTab_GB_8F },                    /* 0x8F */
2814     { 0x00, 0xFE, aImplUniToDBCSTab_GB_90 },                    /* 0x90 */
2815     { 0x02, 0xDC, aImplUniToDBCSTab_GB_91 },                    /* 0x91 */
2816     { 0x74, 0xC8, aImplUniToDBCSTab_GB_92 },                    /* 0x92 */
2817     { 0x3E, 0xD6, aImplUniToDBCSTab_GB_93 },                    /* 0x93 */
2818     { 0x3E, 0xFF, aImplUniToDBCSTab_GB_94 },                    /* 0x94 */
2819     { 0x00, 0xFE, aImplUniToDBCSTab_GB_95 },                    /* 0x95 */
2820     { 0x00, 0xFE, aImplUniToDBCSTab_GB_96 },                    /* 0x96 */
2821     { 0x00, 0xF6, aImplUniToDBCSTab_GB_97 },                    /* 0x97 */
2822     { 0x75, 0xE9, aImplUniToDBCSTab_GB_98 },                    /* 0x98 */
2823     { 0x0D, 0xA8, aImplUniToDBCSTab_GB_99 },                    /* 0x99 */
2824     { 0x6C, 0xFB, aImplUniToDBCSTab_GB_9A },                    /* 0x9A */
2825     { 0x03, 0x54, aImplUniToDBCSTab_GB_9B },                    /* 0x9B */
2826     { 0x7C, 0xE2, aImplUniToDBCSTab_GB_9C },                    /* 0x9C */
2827     {    1,    0, NULL },                                       /* 0x9D */
2828     { 0x1F, 0xFE, aImplUniToDBCSTab_GB_9E },                    /* 0x9E */
2829     { 0x0B, 0xA0, aImplUniToDBCSTab_GB_9F },                    /* 0x9F */
2830     {    1,    0, NULL },                                       /* 0xA0 */
2831     {    1,    0, NULL },                                       /* 0xA1 */
2832     {    1,    0, NULL },                                       /* 0xA2 */
2833     {    1,    0, NULL },                                       /* 0xA3 */
2834     {    1,    0, NULL },                                       /* 0xA4 */
2835     {    1,    0, NULL },                                       /* 0xA5 */
2836     {    1,    0, NULL },                                       /* 0xA6 */
2837     {    1,    0, NULL },                                       /* 0xA7 */
2838     {    1,    0, NULL },                                       /* 0xA8 */
2839     {    1,    0, NULL },                                       /* 0xA9 */
2840     {    1,    0, NULL },                                       /* 0xAA */
2841     {    1,    0, NULL },                                       /* 0xAB */
2842     {    1,    0, NULL },                                       /* 0xAC */
2843     {    1,    0, NULL },                                       /* 0xAD */
2844     {    1,    0, NULL },                                       /* 0xAE */
2845     {    1,    0, NULL },                                       /* 0xAF */
2846     {    1,    0, NULL },                                       /* 0xB0 */
2847     {    1,    0, NULL },                                       /* 0xB1 */
2848     {    1,    0, NULL },                                       /* 0xB2 */
2849     {    1,    0, NULL },                                       /* 0xB3 */
2850     {    1,    0, NULL },                                       /* 0xB4 */
2851     {    1,    0, NULL },                                       /* 0xB5 */
2852     {    1,    0, NULL },                                       /* 0xB6 */
2853     {    1,    0, NULL },                                       /* 0xB7 */
2854     {    1,    0, NULL },                                       /* 0xB8 */
2855     {    1,    0, NULL },                                       /* 0xB9 */
2856     {    1,    0, NULL },                                       /* 0xBA */
2857     {    1,    0, NULL },                                       /* 0xBB */
2858     {    1,    0, NULL },                                       /* 0xBC */
2859     {    1,    0, NULL },                                       /* 0xBD */
2860     {    1,    0, NULL },                                       /* 0xBE */
2861     {    1,    0, NULL },                                       /* 0xBF */
2862     {    1,    0, NULL },                                       /* 0xC0 */
2863     {    1,    0, NULL },                                       /* 0xC1 */
2864     {    1,    0, NULL },                                       /* 0xC2 */
2865     {    1,    0, NULL },                                       /* 0xC3 */
2866     {    1,    0, NULL },                                       /* 0xC4 */
2867     {    1,    0, NULL },                                       /* 0xC5 */
2868     {    1,    0, NULL },                                       /* 0xC6 */
2869     {    1,    0, NULL },                                       /* 0xC7 */
2870     {    1,    0, NULL },                                       /* 0xC8 */
2871     {    1,    0, NULL },                                       /* 0xC9 */
2872     {    1,    0, NULL },                                       /* 0xCA */
2873     {    1,    0, NULL },                                       /* 0xCB */
2874     {    1,    0, NULL },                                       /* 0xCC */
2875     {    1,    0, NULL },                                       /* 0xCD */
2876     {    1,    0, NULL },                                       /* 0xCE */
2877     {    1,    0, NULL },                                       /* 0xCF */
2878     {    1,    0, NULL },                                       /* 0xD0 */
2879     {    1,    0, NULL },                                       /* 0xD1 */
2880     {    1,    0, NULL },                                       /* 0xD2 */
2881     {    1,    0, NULL },                                       /* 0xD3 */
2882     {    1,    0, NULL },                                       /* 0xD4 */
2883     {    1,    0, NULL },                                       /* 0xD5 */
2884     {    1,    0, NULL },                                       /* 0xD6 */
2885     {    1,    0, NULL },                                       /* 0xD7 */
2886     {    1,    0, NULL },                                       /* 0xD8 */
2887     {    1,    0, NULL },                                       /* 0xD9 */
2888     {    1,    0, NULL },                                       /* 0xDA */
2889     {    1,    0, NULL },                                       /* 0xDB */
2890     {    1,    0, NULL },                                       /* 0xDC */
2891     {    1,    0, NULL },                                       /* 0xDD */
2892     {    1,    0, NULL },                                       /* 0xDE */
2893     {    1,    0, NULL },                                       /* 0xDF */
2894     {    1,    0, NULL },                                       /* 0xE0 */
2895     {    1,    0, NULL },                                       /* 0xE1 */
2896     {    1,    0, NULL },                                       /* 0xE2 */
2897     {    1,    0, NULL },                                       /* 0xE3 */
2898     {    1,    0, NULL },                                       /* 0xE4 */
2899     {    1,    0, NULL },                                       /* 0xE5 */
2900     {    1,    0, NULL },                                       /* 0xE6 */
2901     {    1,    0, NULL },                                       /* 0xE7 */
2902     {    1,    0, NULL },                                       /* 0xE8 */
2903     {    1,    0, NULL },                                       /* 0xE9 */
2904     {    1,    0, NULL },                                       /* 0xEA */
2905     {    1,    0, NULL },                                       /* 0xEB */
2906     {    1,    0, NULL },                                       /* 0xEC */
2907     {    1,    0, NULL },                                       /* 0xED */
2908     {    1,    0, NULL },                                       /* 0xEE */
2909     {    1,    0, NULL },                                       /* 0xEF */
2910     {    1,    0, NULL },                                       /* 0xF0 */
2911     {    1,    0, NULL },                                       /* 0xF1 */
2912     {    1,    0, NULL },                                       /* 0xF2 */
2913     {    1,    0, NULL },                                       /* 0xF3 */
2914     {    1,    0, NULL },                                       /* 0xF4 */
2915     {    1,    0, NULL },                                       /* 0xF5 */
2916     {    1,    0, NULL },                                       /* 0xF6 */
2917     {    1,    0, NULL },                                       /* 0xF7 */
2918     { 0x80, 0x81, aImplUniToDBCSTab_APPLECHINSIMP_F8 },         /* 0xF8 */
2919     {    1,    0, NULL },                                       /* 0xF9 */
2920     {    1,    0, NULL },                                       /* 0xFA */
2921     {    1,    0, NULL },                                       /* 0xFB */
2922     {    1,    0, NULL },                                       /* 0xFC */
2923     {    1,    0, NULL },                                       /* 0xFD */
2924     { 0x31, 0x44, aImplUniToDBCSTab_GB_FE },                    /* 0xFE */
2925     { 0x01, 0xE5, aImplUniToDBCSTab_GB_FF }                     /* 0xFF */
2928 /* ----------------------------------------------------------------------- */
2930 static ImplDBCSConvertData const aImplAPPLECHINSIMPDBCSCvtData =
2932     aAPPLECHINSIMPUniLeadTab,
2933     aAPPLECHINSIMPDBCSHighTab,
2934     0x00, 0xFF,
2935     0xA1, 0xFE,
2936     NULL,
2937     0
2940 /* ----------------------------------------------------------------------- */
2942 static ImplTextEncodingData const aImplAPPLECHINSIMPTextEncodingData
2943     = { { &aImplAPPLECHINSIMPDBCSCvtData,
2944           ImplDBCSToUnicode,
2945           ImplUnicodeToDBCS,
2946           NULL,
2947           NULL,
2948           NULL,
2949           NULL,
2950           NULL,
2951           NULL },
2952         1,
2953         2,
2954         2,
2955         134,
2956         "euc-cn",
2957         "gb2312",
2958         RTL_TEXTENCODING_INFO_ASCII | RTL_TEXTENCODING_INFO_MULTIBYTE };
2959     /* MAC, SCRIPT_CHINESE_SIMPLIFIED, pc code page 936, mac encoding 25 */