50 #include <my_global.h>
56 #ifdef HAVE_CHARSET_tis620
58 #define BUFFER_MULTIPLY 4
66 static int t_ctype[][TOT_LEVELS] = {
67 { IGNORE, IGNORE, IGNORE, IGNORE, X },
68 { IGNORE, IGNORE, IGNORE, IGNORE, X },
69 { IGNORE, IGNORE, IGNORE, IGNORE, X },
70 { IGNORE, IGNORE, IGNORE, IGNORE, X },
71 { IGNORE, IGNORE, IGNORE, IGNORE, X },
72 { IGNORE, IGNORE, IGNORE, IGNORE, X },
73 { IGNORE, IGNORE, IGNORE, IGNORE, X },
74 { IGNORE, IGNORE, IGNORE, IGNORE, X },
75 { IGNORE, IGNORE, IGNORE, IGNORE, X },
76 { IGNORE, IGNORE, IGNORE, IGNORE, X },
77 { IGNORE, IGNORE, IGNORE, IGNORE, X },
78 { IGNORE, IGNORE, IGNORE, IGNORE, X },
79 { IGNORE, IGNORE, IGNORE, IGNORE, X },
80 { IGNORE, IGNORE, IGNORE, IGNORE, X },
81 { IGNORE, IGNORE, IGNORE, IGNORE, X },
82 { IGNORE, IGNORE, IGNORE, IGNORE, X },
83 { IGNORE, IGNORE, IGNORE, IGNORE, X },
84 { IGNORE, IGNORE, IGNORE, IGNORE, X },
85 { IGNORE, IGNORE, IGNORE, IGNORE, X },
86 { IGNORE, IGNORE, IGNORE, IGNORE, X },
87 { IGNORE, IGNORE, IGNORE, IGNORE, X },
88 { IGNORE, IGNORE, IGNORE, IGNORE, X },
89 { IGNORE, IGNORE, IGNORE, IGNORE, X },
90 { IGNORE, IGNORE, IGNORE, IGNORE, X },
91 { IGNORE, IGNORE, IGNORE, IGNORE, X },
92 { IGNORE, IGNORE, IGNORE, IGNORE, X },
93 { IGNORE, IGNORE, IGNORE, IGNORE, X },
94 { IGNORE, IGNORE, IGNORE, IGNORE, X },
95 { IGNORE, IGNORE, IGNORE, IGNORE, X },
96 { IGNORE, IGNORE, IGNORE, IGNORE, X },
97 { IGNORE, IGNORE, IGNORE, IGNORE, X },
98 { IGNORE, IGNORE, IGNORE, IGNORE, X },
99 { IGNORE, IGNORE, L3_SPACE, IGNORE, M},
100 { IGNORE, IGNORE, L3_EXCLAMATION, IGNORE, M },
101 { IGNORE, IGNORE, L3_QUOTATION, IGNORE, M },
102 { IGNORE, IGNORE, L3_NUMBER, IGNORE, M },
103 { IGNORE, IGNORE, L3_DOLLAR, IGNORE, M },
104 { IGNORE, IGNORE, L3_PERCENT, IGNORE, M },
105 { IGNORE, IGNORE, L3_AMPERSAND, IGNORE, M },
106 { IGNORE, IGNORE, L3_APOSTROPHE, IGNORE, M },
107 { IGNORE, IGNORE, L3_L_PARANTHESIS, IGNORE, M },
108 { IGNORE, IGNORE, L3_R_PARENTHESIS, IGNORE, M },
109 { IGNORE, IGNORE, L3_ASTERISK, IGNORE, M },
110 { IGNORE, IGNORE, L3_PLUS, IGNORE, M },
111 { IGNORE, IGNORE, L3_COMMA, IGNORE, M },
112 { IGNORE, IGNORE, L3_HYPHEN, IGNORE, M },
113 { IGNORE, IGNORE, L3_FULL_STOP, IGNORE, M },
114 { IGNORE, IGNORE, L3_SOLIDUS, IGNORE, M },
115 { L1_08, L2_BLANK, L3_BLANK, L4_BLANK, M },
116 { L1_18, L2_BLANK, L3_BLANK, L4_BLANK, M },
117 { L1_28, L2_BLANK, L3_BLANK, L4_BLANK, M },
118 { L1_38, L2_BLANK, L3_BLANK, L4_BLANK, M },
119 { L1_48, L2_BLANK, L3_BLANK, L4_BLANK, M },
120 { L1_58, L2_BLANK, L3_BLANK, L4_BLANK, M },
121 { L1_68, L2_BLANK, L3_BLANK, L4_BLANK, M },
122 { L1_78, L2_BLANK, L3_BLANK, L4_BLANK, M },
123 { L1_88, L2_BLANK, L3_BLANK, L4_BLANK, M },
124 { L1_98, L2_BLANK, L3_BLANK, L4_BLANK, M },
125 { IGNORE, IGNORE, L3_COLON, IGNORE, M },
126 { IGNORE, IGNORE, L3_SEMICOLON, IGNORE, M },
127 { IGNORE, IGNORE, L3_LESS_THAN, IGNORE, M },
128 { IGNORE, IGNORE, L3_EQUAL, IGNORE, M },
129 { IGNORE, IGNORE, L3_GREATER_THAN, IGNORE, M },
130 { IGNORE, IGNORE, L3_QUESTION, IGNORE, M },
131 { IGNORE, IGNORE, L3_AT, IGNORE, M },
132 { L1_A8, L2_BLANK, L3_BLANK, L4_CAP, M },
133 { L1_B8, L2_BLANK, L3_BLANK, L4_CAP, M },
134 { L1_C8, L2_BLANK, L3_BLANK, L4_CAP, M },
135 { L1_D8, L2_BLANK, L3_BLANK, L4_CAP, M },
136 { L1_E8, L2_BLANK, L3_BLANK, L4_CAP, M },
137 { L1_F8, L2_BLANK, L3_BLANK, L4_CAP, M },
138 { L1_G8, L2_BLANK, L3_BLANK, L4_CAP, M },
139 { L1_H8, L2_BLANK, L3_BLANK, L4_CAP, M },
140 { L1_I8, L2_BLANK, L3_BLANK, L4_CAP, M },
141 { L1_J8, L2_BLANK, L3_BLANK, L4_CAP, M },
142 { L1_K8, L2_BLANK, L3_BLANK, L4_CAP, M },
143 { L1_L8, L2_BLANK, L3_BLANK, L4_CAP, M },
144 { L1_M8, L2_BLANK, L3_BLANK, L4_CAP, M },
145 { L1_N8, L2_BLANK, L3_BLANK, L4_CAP, M },
146 { L1_O8, L2_BLANK, L3_BLANK, L4_CAP, M },
147 { L1_P8, L2_BLANK, L3_BLANK, L4_CAP, M },
148 { L1_Q8, L2_BLANK, L3_BLANK, L4_CAP, M },
149 { L1_R8, L2_BLANK, L3_BLANK, L4_CAP, M },
150 { L1_S8, L2_BLANK, L3_BLANK, L4_CAP, M },
151 { L1_T8, L2_BLANK, L3_BLANK, L4_CAP, M },
152 { L1_U8, L2_BLANK, L3_BLANK, L4_CAP, M },
153 { L1_V8, L2_BLANK, L3_BLANK, L4_CAP, M },
154 { L1_W8, L2_BLANK, L3_BLANK, L4_CAP, M },
155 { L1_X8, L2_BLANK, L3_BLANK, L4_CAP, M },
156 { L1_Y8, L2_BLANK, L3_BLANK, L4_CAP, M },
157 { L1_Z8, L2_BLANK, L3_BLANK, L4_CAP, M },
158 { IGNORE, IGNORE, L3_L_BRACKET, IGNORE, M },
159 { IGNORE, IGNORE, L3_BK_SOLIDUS, IGNORE, M },
160 { IGNORE, IGNORE, L3_R_BRACKET, IGNORE, M },
161 { IGNORE, IGNORE, L3_CIRCUMFLEX, IGNORE, M },
162 { IGNORE, IGNORE, L3_LOW_LINE, IGNORE, M },
163 { IGNORE, IGNORE, L3_GRAVE, IGNORE, M },
164 { L1_A8, L2_BLANK, L3_BLANK, L4_MIN, M },
165 { L1_B8, L2_BLANK, L3_BLANK, L4_MIN, M },
166 { L1_C8, L2_BLANK, L3_BLANK, L4_MIN, M },
167 { L1_D8, L2_BLANK, L3_BLANK, L4_MIN, M },
168 { L1_E8, L2_BLANK, L3_BLANK, L4_MIN, M },
169 { L1_F8, L2_BLANK, L3_BLANK, L4_MIN, M },
170 { L1_G8, L2_BLANK, L3_BLANK, L4_MIN, M },
171 { L1_H8, L2_BLANK, L3_BLANK, L4_MIN, M },
172 { L1_I8, L2_BLANK, L3_BLANK, L4_MIN, M },
173 { L1_J8, L2_BLANK, L3_BLANK, L4_MIN, M },
174 { L1_K8, L2_BLANK, L3_BLANK, L4_MIN, M },
175 { L1_L8, L2_BLANK, L3_BLANK, L4_MIN, M },
176 { L1_M8, L2_BLANK, L3_BLANK, L4_MIN, M },
177 { L1_N8, L2_BLANK, L3_BLANK, L4_MIN, M },
178 { L1_O8, L2_BLANK, L3_BLANK, L4_MIN, M },
179 { L1_P8, L2_BLANK, L3_BLANK, L4_MIN, M },
180 { L1_Q8, L2_BLANK, L3_BLANK, L4_MIN, M },
181 { L1_R8, L2_BLANK, L3_BLANK, L4_MIN, M },
182 { L1_S8, L2_BLANK, L3_BLANK, L4_MIN, M },
183 { L1_T8, L2_BLANK, L3_BLANK, L4_MIN, M },
184 { L1_U8, L2_BLANK, L3_BLANK, L4_MIN, M },
185 { L1_V8, L2_BLANK, L3_BLANK, L4_MIN, M },
186 { L1_W8, L2_BLANK, L3_BLANK, L4_MIN, M },
187 { L1_X8, L2_BLANK, L3_BLANK, L4_MIN, M },
188 { L1_Y8, L2_BLANK, L3_BLANK, L4_MIN, M },
189 { L1_Z8, L2_BLANK, L3_BLANK, L4_MIN, M },
190 { IGNORE, IGNORE, L3_L_BRACE, IGNORE, M },
191 { IGNORE, IGNORE, L3_V_LINE, IGNORE, M },
192 { IGNORE, IGNORE, L3_R_BRACE, IGNORE, M },
193 { IGNORE, IGNORE, L3_TILDE, IGNORE, M },
194 { IGNORE, IGNORE, IGNORE, IGNORE, X },
195 { IGNORE, IGNORE, IGNORE, IGNORE, X },
196 { IGNORE, IGNORE, IGNORE, IGNORE, X },
197 { IGNORE, IGNORE, IGNORE, IGNORE, X },
198 { IGNORE, IGNORE, IGNORE, IGNORE, X },
199 { IGNORE, IGNORE, IGNORE, IGNORE, X },
200 { IGNORE, IGNORE, IGNORE, IGNORE, X },
201 { IGNORE, IGNORE, IGNORE, IGNORE, X },
202 { IGNORE, IGNORE, IGNORE, IGNORE, X },
203 { IGNORE, IGNORE, IGNORE, IGNORE, X },
204 { IGNORE, IGNORE, IGNORE, IGNORE, X },
205 { IGNORE, IGNORE, IGNORE, IGNORE, X },
206 { IGNORE, IGNORE, IGNORE, IGNORE, X },
207 { IGNORE, IGNORE, IGNORE, IGNORE, X },
208 { IGNORE, IGNORE, IGNORE, IGNORE, X },
209 { IGNORE, IGNORE, IGNORE, IGNORE, X },
210 { IGNORE, IGNORE, IGNORE, IGNORE, X },
211 { IGNORE, IGNORE, IGNORE, IGNORE, X },
212 { IGNORE, IGNORE, IGNORE, IGNORE, X },
213 { IGNORE, IGNORE, IGNORE, IGNORE, X },
214 { IGNORE, IGNORE, IGNORE, IGNORE, X },
215 { IGNORE, IGNORE, IGNORE, IGNORE, X },
216 { IGNORE, IGNORE, IGNORE, IGNORE, X },
217 { IGNORE, IGNORE, IGNORE, IGNORE, X },
218 { IGNORE, IGNORE, IGNORE, IGNORE, X },
219 { IGNORE, IGNORE, IGNORE, IGNORE, X },
220 { IGNORE, IGNORE, IGNORE, IGNORE, X },
221 { IGNORE, IGNORE, IGNORE, IGNORE, X },
222 { IGNORE, IGNORE, IGNORE, IGNORE, X },
223 { IGNORE, IGNORE, IGNORE, IGNORE, X },
224 { IGNORE, IGNORE, IGNORE, IGNORE, X },
225 { IGNORE, IGNORE, IGNORE, IGNORE, X },
226 { IGNORE, IGNORE, IGNORE, IGNORE, X },
227 { IGNORE, IGNORE, L3_NB_SACE, IGNORE, X },
228 { L1_KO_KAI, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
229 { L1_KHO_KHAI, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
230 { L1_KHO_KHUAT, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
231 { L1_KHO_KHWAI, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
232 { L1_KHO_KHON, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
233 { L1_KHO_RAKHANG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
234 { L1_NGO_NGU, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
235 { L1_CHO_CHAN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
236 { L1_CHO_CHING, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
237 { L1_CHO_CHANG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
238 { L1_SO_SO, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
239 { L1_CHO_CHOE, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
240 { L1_YO_YING, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
241 { L1_DO_CHADA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
242 { L1_TO_PATAK, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
243 { L1_THO_THAN, L2_BLANK,L3_BLANK, L4_BLANK, M | _consnt},
244 { L1_THO_NANGMONTHO, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
245 { L1_THO_PHUTHAO, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
246 { L1_NO_NEN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
247 { L1_DO_DEK, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
248 { L1_TO_TAO, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
249 { L1_THO_THUNG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
250 { L1_THO_THAHAN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
251 { L1_THO_THONG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
252 { L1_NO_NU, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
253 { L1_BO_BAIMAI, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
254 { L1_PO_PLA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
255 { L1_PHO_PHUNG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
256 { L1_FO_FA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
257 { L1_PHO_PHAN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
258 { L1_FO_FAN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
259 { L1_PHO_SAMPHAO, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
260 { L1_MO_MA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
261 { L1_YO_YAK, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
262 { L1_RO_RUA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
263 { L1_RU, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
264 { L1_LO_LING, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
265 { L1_LU, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
266 { L1_WO_WAEN, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
267 { L1_SO_SALA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
268 { L1_SO_RUSI, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
269 { L1_SO_SUA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
270 { L1_HO_HIP, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
271 { L1_LO_CHULA, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
272 { L1_O_ANG, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
273 { L1_HO_NOKHUK, L2_BLANK, L3_BLANK, L4_BLANK, M | _consnt},
274 { IGNORE, IGNORE, L3_PAIYAN_NOI, IGNORE, M},
275 { L1_SARA_A, L2_BLANK, L3_BLANK, L4_BLANK, M | _fllwvowel},
276 { L1_MAI_HAN_AKAT, L2_BLANK, L3_BLANK, L4_BLANK,
U | _uprvowel},
277 { L1_SARA_AA, L2_BLANK, L3_BLANK, L4_BLANK, M | _fllwvowel},
278 { L1_SARA_AM, L2_BLANK, L3_BLANK, L4_BLANK, M | _fllwvowel},
279 { L1_SARA_I, L2_BLANK, L3_BLANK, L4_BLANK,
U | _uprvowel},
280 { L1_SARA_II, L2_BLANK, L3_BLANK, L4_BLANK,
U | _uprvowel},
281 { L1_SARA_UE, L2_BLANK, L3_BLANK, L4_BLANK,
U | _uprvowel},
282 { L1_SARA_UEE, L2_BLANK, L3_BLANK, L4_BLANK,
U | _uprvowel},
283 { L1_SARA_U, L2_BLANK, L3_BLANK, L4_BLANK, L | _lwrvowel},
284 { L1_SARA_UU, L2_BLANK, L3_BLANK, L4_BLANK, L | _lwrvowel},
285 { IGNORE, L2_PINTHU, L3_BLANK, L4_BLANK, L },
286 { IGNORE, IGNORE, IGNORE, IGNORE, X },
287 { IGNORE, IGNORE, IGNORE, IGNORE, X },
288 { IGNORE, IGNORE, IGNORE, IGNORE, X },
289 { IGNORE, IGNORE, IGNORE, IGNORE, X },
290 { IGNORE, IGNORE, L3_BAHT, IGNORE, M},
291 { L1_SARA_E, L2_BLANK, L3_BLANK, L4_BLANK, M | _ldvowel },
292 { L1_SARA_AE, L2_BLANK, L3_BLANK, L4_BLANK, M | _ldvowel },
293 { L1_SARA_O, L2_BLANK, L3_BLANK, L4_BLANK, M | _ldvowel },
294 { L1_SARA_AI_MAIMUAN, L2_BLANK, L3_BLANK, L4_BLANK, M | _ldvowel },
295 { L1_SARA_AI_MAIMALAI, L2_BLANK, L3_BLANK, L4_BLANK, M | _ldvowel },
296 { L1_SARA_AA, L2_BLANK, L3_BLANK, L4_EXT, M | _fllwvowel },
297 { IGNORE, IGNORE, L3_MAI_YAMOK, IGNORE, M | _stone },
298 { IGNORE, L2_TYKHU, L3_BLANK, L4_BLANK,
U | _diacrt1 | _stone },
299 { IGNORE, L2_TONE1, L3_BLANK, L4_BLANK, UU | _tone | _combine | _stone },
300 { IGNORE, L2_TONE2, L3_BLANK, L4_BLANK, UU | _tone | _combine | _stone },
301 { IGNORE, L2_TONE3, L3_BLANK, L4_BLANK, UU | _tone | _combine | _stone },
302 { IGNORE, L2_TONE4, L3_BLANK, L4_BLANK, UU | _tone | _combine | _stone },
303 { IGNORE, L2_GARAN, L3_BLANK, L4_BLANK, UU | _diacrt2 | _combine | _stone },
304 { L1_NKHIT, L2_BLANK, L3_BLANK, L4_BLANK,
U | _diacrt1 },
305 { IGNORE, L2_YAMAK, L3_BLANK, L4_BLANK,
U | _diacrt1 },
306 { IGNORE, IGNORE, L3_FONGMAN, IGNORE, M },
307 { L1_08, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig },
308 { L1_18, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig },
309 { L1_28, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig },
310 { L1_38, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig },
311 { L1_48, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig },
312 { L1_58, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig },
313 { L1_68, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig },
314 { L1_78, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig },
315 { L1_88, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig },
316 { L1_98, L2_THAII, L3_BLANK, L4_BLANK, M | _tdig },
317 { IGNORE, IGNORE, L3_ANGKHANKHU, IGNORE, X },
318 { IGNORE, IGNORE, L3_KHOMUT, IGNORE, X },
319 { IGNORE, IGNORE, IGNORE, IGNORE, X },
320 { IGNORE, IGNORE, IGNORE, IGNORE, X },
321 { IGNORE, IGNORE, IGNORE, IGNORE, X },
323 { 255 , IGNORE, IGNORE, IGNORE, X },
326 static uchar ctype_tis620[257] =
329 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
330 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
331 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
332 132,132,132,132,132,132,132,132,132,132,16,16,16,16,16,16,
333 16,129,129,129,129,129,129,1,1,1,1,1,1,1,1,1,
334 1,1,1,1,1,1,1,1,1,1,1,16,16,16,16,16,
335 16,130,130,130,130,130,130,2,2,2,2,2,2,2,2,2,
336 2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32,
337 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
338 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
339 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
340 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
341 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
342 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
343 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
344 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
347 static uchar to_lower_tis620[]=
349 '\000',
'\001',
'\002',
'\003',
'\004',
'\005',
'\006',
'\007',
350 '\010',
'\011',
'\012',
'\013',
'\014',
'\015',
'\016',
'\017',
351 '\020',
'\021',
'\022',
'\023',
'\024',
'\025',
'\026',
'\027',
352 '\030',
'\031',
'\032',
'\033',
'\034',
'\035',
'\036',
'\037',
353 ' ',
'!',
'"',
'#',
'$',
'%',
'&',
'\'',
354 '(',
')',
'*',
'+',
',',
'-',
'.',
'/',
355 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
356 '8',
'9',
':',
';',
'<',
'=',
'>',
'?',
357 '@',
'a',
'b',
'c',
'd',
'e',
'f',
'g',
358 'h',
'i',
'j',
'k',
'l',
'm',
'n',
'o',
359 'p',
'q',
'r',
's',
't',
'u',
'v',
'w',
360 'x',
'y',
'z',
'[',
'\\',
']',
'^',
'_',
361 '`',
'a',
'b',
'c',
'd',
'e',
'f',
'g',
362 'h',
'i',
'j',
'k',
'l',
'm',
'n',
'o',
363 'p',
'q',
'r',
's',
't',
'u',
'v',
'w',
364 'x',
'y',
'z',
'{',
'|',
'}',
'~',
'\177',
365 (uchar)
'\200',(uchar)
'\201',(uchar)
'\202',(uchar)
'\203',(uchar)
'\204',(uchar)
'\205',(uchar)
'\206',(uchar)
'\207',
366 (uchar)
'\210',(uchar)
'\211',(uchar)
'\212',(uchar)
'\213',(uchar)
'\214',(uchar)
'\215',(uchar)
'\216',(uchar)
'\217',
367 (uchar)
'\220',(uchar)
'\221',(uchar)
'\222',(uchar)
'\223',(uchar)
'\224',(uchar)
'\225',(uchar)
'\226',(uchar)
'\227',
368 (uchar)
'\230',(uchar)
'\231',(uchar)
'\232',(uchar)
'\233',(uchar)
'\234',(uchar)
'\235',(uchar)
'\236',(uchar)
'\237',
369 (uchar)
'\240',(uchar)
'\241',(uchar)
'\242',(uchar)
'\243',(uchar)
'\244',(uchar)
'\245',(uchar)
'\246',(uchar)
'\247',
370 (uchar)
'\250',(uchar)
'\251',(uchar)
'\252',(uchar)
'\253',(uchar)
'\254',(uchar)
'\255',(uchar)
'\256',(uchar)
'\257',
371 (uchar)
'\260',(uchar)
'\261',(uchar)
'\262',(uchar)
'\263',(uchar)
'\264',(uchar)
'\265',(uchar)
'\266',(uchar)
'\267',
372 (uchar)
'\270',(uchar)
'\271',(uchar)
'\272',(uchar)
'\273',(uchar)
'\274',(uchar)
'\275',(uchar)
'\276',(uchar)
'\277',
373 (uchar)
'\300',(uchar)
'\301',(uchar)
'\302',(uchar)
'\303',(uchar)
'\304',(uchar)
'\305',(uchar)
'\306',(uchar)
'\307',
374 (uchar)
'\310',(uchar)
'\311',(uchar)
'\312',(uchar)
'\313',(uchar)
'\314',(uchar)
'\315',(uchar)
'\316',(uchar)
'\317',
375 (uchar)
'\320',(uchar)
'\321',(uchar)
'\322',(uchar)
'\323',(uchar)
'\324',(uchar)
'\325',(uchar)
'\326',(uchar)
'\327',
376 (uchar)
'\330',(uchar)
'\331',(uchar)
'\332',(uchar)
'\333',(uchar)
'\334',(uchar)
'\335',(uchar)
'\336',(uchar)
'\337',
377 (uchar)
'\340',(uchar)
'\341',(uchar)
'\342',(uchar)
'\343',(uchar)
'\344',(uchar)
'\345',(uchar)
'\346',(uchar)
'\347',
378 (uchar)
'\350',(uchar)
'\351',(uchar)
'\352',(uchar)
'\353',(uchar)
'\354',(uchar)
'\355',(uchar)
'\356',(uchar)
'\357',
379 (uchar)
'\360',(uchar)
'\361',(uchar)
'\362',(uchar)
'\363',(uchar)
'\364',(uchar)
'\365',(uchar)
'\366',(uchar)
'\367',
380 (uchar)
'\370',(uchar)
'\371',(uchar)
'\372',(uchar)
'\373',(uchar)
'\374',(uchar)
'\375',(uchar)
'\376',(uchar)
'\377',
383 static uchar to_upper_tis620[]=
385 '\000',
'\001',
'\002',
'\003',
'\004',
'\005',
'\006',
'\007',
386 '\010',
'\011',
'\012',
'\013',
'\014',
'\015',
'\016',
'\017',
387 '\020',
'\021',
'\022',
'\023',
'\024',
'\025',
'\026',
'\027',
388 '\030',
'\031',
'\032',
'\033',
'\034',
'\035',
'\036',
'\037',
389 ' ',
'!',
'"',
'#',
'$',
'%',
'&',
'\'',
390 '(',
')',
'*',
'+',
',',
'-',
'.',
'/',
391 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
392 '8',
'9',
':',
';',
'<',
'=',
'>',
'?',
393 '@',
'A',
'B',
'C',
'D',
'E',
'F',
'G',
394 'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
395 'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
396 'X',
'Y',
'Z',
'[',
'\\',
']',
'^',
'_',
397 '`',
'A',
'B',
'C',
'D',
'E',
'F',
'G',
398 'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
399 'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
400 'X',
'Y',
'Z',
'{',
'|',
'}',
'~',
'\177',
401 (uchar)
'\200',(uchar)
'\201',(uchar)
'\202',(uchar)
'\203',(uchar)
'\204',(uchar)
'\205',(uchar)
'\206',(uchar)
'\207',
402 (uchar)
'\210',(uchar)
'\211',(uchar)
'\212',(uchar)
'\213',(uchar)
'\214',(uchar)
'\215',(uchar)
'\216',(uchar)
'\217',
403 (uchar)
'\220',(uchar)
'\221',(uchar)
'\222',(uchar)
'\223',(uchar)
'\224',(uchar)
'\225',(uchar)
'\226',(uchar)
'\227',
404 (uchar)
'\230',(uchar)
'\231',(uchar)
'\232',(uchar)
'\233',(uchar)
'\234',(uchar)
'\235',(uchar)
'\236',(uchar)
'\237',
405 (uchar)
'\240',(uchar)
'\241',(uchar)
'\242',(uchar)
'\243',(uchar)
'\244',(uchar)
'\245',(uchar)
'\246',(uchar)
'\247',
406 (uchar)
'\250',(uchar)
'\251',(uchar)
'\252',(uchar)
'\253',(uchar)
'\254',(uchar)
'\255',(uchar)
'\256',(uchar)
'\257',
407 (uchar)
'\260',(uchar)
'\261',(uchar)
'\262',(uchar)
'\263',(uchar)
'\264',(uchar)
'\265',(uchar)
'\266',(uchar)
'\267',
408 (uchar)
'\270',(uchar)
'\271',(uchar)
'\272',(uchar)
'\273',(uchar)
'\274',(uchar)
'\275',(uchar)
'\276',(uchar)
'\277',
409 (uchar)
'\300',(uchar)
'\301',(uchar)
'\302',(uchar)
'\303',(uchar)
'\304',(uchar)
'\305',(uchar)
'\306',(uchar)
'\307',
410 (uchar)
'\310',(uchar)
'\311',(uchar)
'\312',(uchar)
'\313',(uchar)
'\314',(uchar)
'\315',(uchar)
'\316',(uchar)
'\317',
411 (uchar)
'\320',(uchar)
'\321',(uchar)
'\322',(uchar)
'\323',(uchar)
'\324',(uchar)
'\325',(uchar)
'\326',(uchar)
'\327',
412 (uchar)
'\330',(uchar)
'\331',(uchar)
'\332',(uchar)
'\333',(uchar)
'\334',(uchar)
'\335',(uchar)
'\336',(uchar)
'\337',
413 (uchar)
'\340',(uchar)
'\341',(uchar)
'\342',(uchar)
'\343',(uchar)
'\344',(uchar)
'\345',(uchar)
'\346',(uchar)
'\347',
414 (uchar)
'\350',(uchar)
'\351',(uchar)
'\352',(uchar)
'\353',(uchar)
'\354',(uchar)
'\355',(uchar)
'\356',(uchar)
'\357',
415 (uchar)
'\360',(uchar)
'\361',(uchar)
'\362',(uchar)
'\363',(uchar)
'\364',(uchar)
'\365',(uchar)
'\366',(uchar)
'\367',
416 (uchar)
'\370',(uchar)
'\371',(uchar)
'\372',(uchar)
'\373',(uchar)
'\374',(uchar)
'\375',(uchar)
'\376',(uchar)
'\377',
419 static uchar sort_order_tis620[]=
421 '\000',
'\001',
'\002',
'\003',
'\004',
'\005',
'\006',
'\007',
422 '\010',
'\011',
'\012',
'\013',
'\014',
'\015',
'\016',
'\017',
423 '\020',
'\021',
'\022',
'\023',
'\024',
'\025',
'\026',
'\027',
424 '\030',
'\031',
'\032',
'\033',
'\034',
'\035',
'\036',
'\037',
425 ' ',
'!',
'"',
'#',
'$',
'%',
'&',
'\'',
426 '(',
')',
'*',
'+',
',',
'-',
'.',
'/',
427 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
428 '8',
'9',
':',
';',
'<',
'=',
'>',
'?',
429 '@',
'A',
'B',
'C',
'D',
'E',
'F',
'G',
430 'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
431 'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
432 'X',
'Y',
'Z',
'\\',
']',
'[',
'^',
'_',
433 'E',
'A',
'B',
'C',
'D',
'E',
'F',
'G',
434 'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
435 'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
436 'X',
'Y',
'Z',
'{',
'|',
'}',
'Y',
'\177',
437 (uchar)
'\200',(uchar)
'\201',(uchar)
'\202',(uchar)
'\203',(uchar)
'\204',(uchar)
'\205',(uchar)
'\206',(uchar)
'\207',
438 (uchar)
'\210',(uchar)
'\211',(uchar)
'\212',(uchar)
'\213',(uchar)
'\214',(uchar)
'\215',(uchar)
'\216',(uchar)
'\217',
439 (uchar)
'\220',(uchar)
'\221',(uchar)
'\222',(uchar)
'\223',(uchar)
'\224',(uchar)
'\225',(uchar)
'\226',(uchar)
'\227',
440 (uchar)
'\230',(uchar)
'\231',(uchar)
'\232',(uchar)
'\233',(uchar)
'\234',(uchar)
'\235',(uchar)
'\236',(uchar)
'\237',
441 (uchar)
'\240',(uchar)
'\241',(uchar)
'\242',(uchar)
'\243',(uchar)
'\244',(uchar)
'\245',(uchar)
'\246',(uchar)
'\247',
442 (uchar)
'\250',(uchar)
'\251',(uchar)
'\252',(uchar)
'\253',(uchar)
'\254',(uchar)
'\255',(uchar)
'\256',(uchar)
'\257',
443 (uchar)
'\260',(uchar)
'\261',(uchar)
'\262',(uchar)
'\263',(uchar)
'\264',(uchar)
'\265',(uchar)
'\266',(uchar)
'\267',
444 (uchar)
'\270',(uchar)
'\271',(uchar)
'\272',(uchar)
'\273',(uchar)
'\274',(uchar)
'\275',(uchar)
'\276',(uchar)
'\277',
445 (uchar)
'\300',(uchar)
'\301',(uchar)
'\302',(uchar)
'\303',(uchar)
'\304',(uchar)
'\305',(uchar)
'\306',(uchar)
'\307',
446 (uchar)
'\310',(uchar)
'\311',(uchar)
'\312',(uchar)
'\313',(uchar)
'\314',(uchar)
'\315',(uchar)
'\316',(uchar)
'\317',
447 (uchar)
'\320',(uchar)
'\321',(uchar)
'\322',(uchar)
'\323',(uchar)
'\324',(uchar)
'\325',(uchar)
'\326',(uchar)
'\327',
448 (uchar)
'\330',(uchar)
'\331',(uchar)
'\332',(uchar)
'\333',(uchar)
'\334',(uchar)
'\335',(uchar)
'\336',(uchar)
'\337',
449 (uchar)
'\340',(uchar)
'\341',(uchar)
'\342',(uchar)
'\343',(uchar)
'\344',(uchar)
'\345',(uchar)
'\346',(uchar)
'\347',
450 (uchar)
'\350',(uchar)
'\351',(uchar)
'\352',(uchar)
'\353',(uchar)
'\354',(uchar)
'\355',(uchar)
'\356',(uchar)
'\357',
451 (uchar)
'\360',(uchar)
'\361',(uchar)
'\362',(uchar)
'\363',(uchar)
'\364',(uchar)
'\365',(uchar)
'\366',(uchar)
'\367',
452 (uchar)
'\370',(uchar)
'\371',(uchar)
'\372',(uchar)
'\373',(uchar)
'\374',(uchar)
'\375',(uchar)
'\376',(uchar)
'\377',
465 static size_t thai2sortable(uchar *tstr,
size_t len)
473 for (p= tstr; tlen > 0; p++, tlen--)
479 int *t_ctype0= t_ctype[c];
483 if (isldvowel(c) && tlen != 1 && isconsnt(p[1]))
494 if (t_ctype0[1] >= L2_GARAN)
500 memmove((
char*) p, (
char*) (p+1), tlen-1);
501 tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1;
509 *p= to_lower_tis620[c];
529 int my_strnncoll_tis620(
const CHARSET_INFO *cs __attribute__((unused)),
530 const uchar *s1,
size_t len1,
531 const uchar *s2,
size_t len2,
532 my_bool s2_is_prefix)
538 if (s2_is_prefix && len1 > len2)
542 if ((len1 + len2 +2) > (
int)
sizeof(buf))
543 tc1= (uchar*) my_str_malloc(len1+len2+2);
545 memcpy((
char*) tc1, (
char*) s1, len1);
547 memcpy((
char *)tc2, (
char *)s2, len2);
549 thai2sortable(tc1, len1);
550 thai2sortable(tc2, len2);
551 i= strcmp((
char*)tc1, (
char*)tc2);
559 int my_strnncollsp_tis620(
const CHARSET_INFO * cs __attribute__((unused)),
560 const uchar *a0,
size_t a_length,
561 const uchar *b0,
size_t b_length,
562 my_bool diff_if_only_endspace_difference)
564 uchar buf[80], *end, *a, *b, *alloced= NULL;
568 #ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE
569 diff_if_only_endspace_difference= 0;
573 if ((a_length + b_length +2) > (
int)
sizeof(buf))
574 alloced= a= (uchar*) my_str_malloc(a_length+b_length+2);
577 memcpy((
char*) a, (
char*) a0, a_length);
579 memcpy((
char *)b, (
char *)b0, b_length);
581 a_length= thai2sortable(a, a_length);
582 b_length= thai2sortable(b, b_length);
584 end= a + (length= MY_MIN(a_length, b_length));
589 res= ((int) a[-1] - (
int) b[-1]);
593 if (a_length != b_length)
596 if (diff_if_only_endspace_difference)
602 if (a_length < b_length)
610 for (end= a + a_length-length; a < end ; a++)
614 res= (*a <
' ') ? -swap : swap;
623 my_str_free(alloced);
637 uchar *dst,
size_t dstlen, uint nweights,
638 const uchar *src,
size_t srclen, uint
flags)
640 size_t len, dstlen0= dstlen;
641 len= (uint) (strmake((
char*) dst, (
char*) src, MY_MIN(dstlen, srclen)) -
643 len= thai2sortable(dst, len);
644 set_if_smaller(dstlen, nweights);
645 set_if_smaller(len, dstlen);
646 len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen,
647 dstlen - len, flags, 0);
648 if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0)
650 uint fill_length= dstlen0 - len;
651 cs->cset->fill(cs, (
char*) dst + len, fill_length, cs->pad_char);
658 static unsigned short cs_to_uni[256]={
659 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
660 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
661 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
662 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
663 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
664 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
665 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
666 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
667 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
668 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
669 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
670 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
671 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
672 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
673 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
674 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
675 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
676 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
677 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
678 0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
679 0xFFFD,0x0E01,0x0E02,0x0E03,0x0E04,0x0E05,0x0E06,0x0E07,
680 0x0E08,0x0E09,0x0E0A,0x0E0B,0x0E0C,0x0E0D,0x0E0E,0x0E0F,
681 0x0E10,0x0E11,0x0E12,0x0E13,0x0E14,0x0E15,0x0E16,0x0E17,
682 0x0E18,0x0E19,0x0E1A,0x0E1B,0x0E1C,0x0E1D,0x0E1E,0x0E1F,
683 0x0E20,0x0E21,0x0E22,0x0E23,0x0E24,0x0E25,0x0E26,0x0E27,
684 0x0E28,0x0E29,0x0E2A,0x0E2B,0x0E2C,0x0E2D,0x0E2E,0x0E2F,
685 0x0E30,0x0E31,0x0E32,0x0E33,0x0E34,0x0E35,0x0E36,0x0E37,
686 0x0E38,0x0E39,0x0E3A,0xFFFD,0xFFFD,0xFFFD,0xFFFD,0x0E3F,
687 0x0E40,0x0E41,0x0E42,0x0E43,0x0E44,0x0E45,0x0E46,0x0E47,
688 0x0E48,0x0E49,0x0E4A,0x0E4B,0x0E4C,0x0E4D,0x0E4E,0x0E4F,
689 0x0E50,0x0E51,0x0E52,0x0E53,0x0E54,0x0E55,0x0E56,0x0E57,
690 0x0E58,0x0E59,0x0E5A,0x0E5B,0xFFFD,0xFFFD,0xFFFD,0xFFFD
692 static uchar pl00[256]={
693 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
694 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
695 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
696 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
697 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
698 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
699 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
700 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
701 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
702 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
703 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
704 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
705 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
706 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
707 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
708 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
709 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
710 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
711 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
712 0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
713 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
714 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
715 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
716 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
717 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
718 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
719 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
720 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
721 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
722 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
723 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
724 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
726 static uchar pl0E[256]={
727 0x0000,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
728 0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
729 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
730 0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
731 0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
732 0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
733 0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,
734 0x00D8,0x00D9,0x00DA,0x0000,0x0000,0x0000,0x0000,0x00DF,
735 0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
736 0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
737 0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
738 0x00F8,0x00F9,0x00FA,0x00FB,0x0000,0x0000,0x0000,0x0000,
739 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
740 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
741 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
742 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
743 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
744 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
745 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
746 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
747 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
748 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
749 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
750 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
751 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
752 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
753 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
754 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
755 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
756 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
757 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
758 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
760 static uchar plFF[256]={
761 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
762 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
763 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
764 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
765 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
766 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
767 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
768 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
769 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
770 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
771 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
772 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
773 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
774 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
775 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
776 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
777 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
778 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
779 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
780 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
781 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
782 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
783 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
784 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
785 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
786 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
787 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
788 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
789 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
790 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
791 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
792 0x0000,0x0000,0x0000,0x0000,0x0000,0x00FF,0x0000,0x0000
794 static uchar *uni_to_cs[256]={
795 pl00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
796 NULL,NULL,NULL,NULL,NULL,NULL,pl0E,NULL,
797 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
798 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
799 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
800 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
801 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
802 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
803 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
804 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
805 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
806 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
807 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
808 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
809 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
810 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
811 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
812 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
813 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
814 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
815 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
816 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
817 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
818 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
819 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
820 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
821 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
822 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
823 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
824 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
825 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
826 NULL,NULL,NULL,NULL,NULL,NULL,NULL,plFF
831 int my_mb_wc_tis620(
const CHARSET_INFO *cs __attribute__((unused)),
834 const uchar *end __attribute__((unused)))
837 return MY_CS_TOOSMALL;
840 return (!wc[0] && str[0]) ? -1 : 1;
844 int my_wc_mb_tis620(
const CHARSET_INFO *cs __attribute__((unused)),
847 uchar *end __attribute__((unused)))
852 return MY_CS_TOOSMALL;
854 pl= uni_to_cs[(wc>>8) & 0xFF];
855 str[0]= pl ? pl[wc & 0xFF] :
'\0';
856 return (!str[0] && wc) ? MY_CS_ILUNI : 1;
864 my_strnncollsp_tis620,
866 my_strnxfrmlen_simple,
867 my_like_range_simple,
882 my_well_formed_len_8bit,
893 my_long10_to_str_8bit,
894 my_longlong10_to_str_8bit,
902 my_strntoull10rnd_8bit,
911 MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM,
938 &my_collation_ci_handler
944 MY_CS_COMPILED|MY_CS_BINSORT,
971 &my_collation_8bit_bin_handler