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