1 | /**************************************************************************/ |
2 | /* ucaps.h */ |
3 | /**************************************************************************/ |
4 | /* This file is part of: */ |
5 | /* GODOT ENGINE */ |
6 | /* https://godotengine.org */ |
7 | /**************************************************************************/ |
8 | /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ |
9 | /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ |
10 | /* */ |
11 | /* Permission is hereby granted, free of charge, to any person obtaining */ |
12 | /* a copy of this software and associated documentation files (the */ |
13 | /* "Software"), to deal in the Software without restriction, including */ |
14 | /* without limitation the rights to use, copy, modify, merge, publish, */ |
15 | /* distribute, sublicense, and/or sell copies of the Software, and to */ |
16 | /* permit persons to whom the Software is furnished to do so, subject to */ |
17 | /* the following conditions: */ |
18 | /* */ |
19 | /* The above copyright notice and this permission notice shall be */ |
20 | /* included in all copies or substantial portions of the Software. */ |
21 | /* */ |
22 | /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ |
23 | /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ |
24 | /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ |
25 | /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ |
26 | /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ |
27 | /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ |
28 | /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ |
29 | /**************************************************************************/ |
30 | |
31 | #ifndef UCAPS_H |
32 | #define UCAPS_H |
33 | |
34 | //satan invented unicode? |
35 | #define CAPS_LEN 666 |
36 | |
37 | static const int caps_table[CAPS_LEN][2] = { |
38 | { 0x0061, 0x0041 }, |
39 | { 0x0062, 0x0042 }, |
40 | { 0x0063, 0x0043 }, |
41 | { 0x0064, 0x0044 }, |
42 | { 0x0065, 0x0045 }, |
43 | { 0x0066, 0x0046 }, |
44 | { 0x0067, 0x0047 }, |
45 | { 0x0068, 0x0048 }, |
46 | { 0x0069, 0x0049 }, |
47 | { 0x006A, 0x004A }, |
48 | { 0x006B, 0x004B }, |
49 | { 0x006C, 0x004C }, |
50 | { 0x006D, 0x004D }, |
51 | { 0x006E, 0x004E }, |
52 | { 0x006F, 0x004F }, |
53 | { 0x0070, 0x0050 }, |
54 | { 0x0071, 0x0051 }, |
55 | { 0x0072, 0x0052 }, |
56 | { 0x0073, 0x0053 }, |
57 | { 0x0074, 0x0054 }, |
58 | { 0x0075, 0x0055 }, |
59 | { 0x0076, 0x0056 }, |
60 | { 0x0077, 0x0057 }, |
61 | { 0x0078, 0x0058 }, |
62 | { 0x0079, 0x0059 }, |
63 | { 0x007A, 0x005A }, |
64 | { 0x00E0, 0x00C0 }, |
65 | { 0x00E1, 0x00C1 }, |
66 | { 0x00E2, 0x00C2 }, |
67 | { 0x00E3, 0x00C3 }, |
68 | { 0x00E4, 0x00C4 }, |
69 | { 0x00E5, 0x00C5 }, |
70 | { 0x00E6, 0x00C6 }, |
71 | { 0x00E7, 0x00C7 }, |
72 | { 0x00E8, 0x00C8 }, |
73 | { 0x00E9, 0x00C9 }, |
74 | { 0x00EA, 0x00CA }, |
75 | { 0x00EB, 0x00CB }, |
76 | { 0x00EC, 0x00CC }, |
77 | { 0x00ED, 0x00CD }, |
78 | { 0x00EE, 0x00CE }, |
79 | { 0x00EF, 0x00CF }, |
80 | { 0x00F0, 0x00D0 }, |
81 | { 0x00F1, 0x00D1 }, |
82 | { 0x00F2, 0x00D2 }, |
83 | { 0x00F3, 0x00D3 }, |
84 | { 0x00F4, 0x00D4 }, |
85 | { 0x00F5, 0x00D5 }, |
86 | { 0x00F6, 0x00D6 }, |
87 | { 0x00F8, 0x00D8 }, |
88 | { 0x00F9, 0x00D9 }, |
89 | { 0x00FA, 0x00DA }, |
90 | { 0x00FB, 0x00DB }, |
91 | { 0x00FC, 0x00DC }, |
92 | { 0x00FD, 0x00DD }, |
93 | { 0x00FE, 0x00DE }, |
94 | { 0x00FF, 0x0178 }, |
95 | { 0x0101, 0x0100 }, |
96 | { 0x0103, 0x0102 }, |
97 | { 0x0105, 0x0104 }, |
98 | { 0x0107, 0x0106 }, |
99 | { 0x0109, 0x0108 }, |
100 | { 0x010B, 0x010A }, |
101 | { 0x010D, 0x010C }, |
102 | { 0x010F, 0x010E }, |
103 | { 0x0111, 0x0110 }, |
104 | { 0x0113, 0x0112 }, |
105 | { 0x0115, 0x0114 }, |
106 | { 0x0117, 0x0116 }, |
107 | { 0x0119, 0x0118 }, |
108 | { 0x011B, 0x011A }, |
109 | { 0x011D, 0x011C }, |
110 | { 0x011F, 0x011E }, |
111 | { 0x0121, 0x0120 }, |
112 | { 0x0123, 0x0122 }, |
113 | { 0x0125, 0x0124 }, |
114 | { 0x0127, 0x0126 }, |
115 | { 0x0129, 0x0128 }, |
116 | { 0x012B, 0x012A }, |
117 | { 0x012D, 0x012C }, |
118 | { 0x012F, 0x012E }, |
119 | { 0x0131, 0x0049 }, |
120 | { 0x0133, 0x0132 }, |
121 | { 0x0135, 0x0134 }, |
122 | { 0x0137, 0x0136 }, |
123 | { 0x013A, 0x0139 }, |
124 | { 0x013C, 0x013B }, |
125 | { 0x013E, 0x013D }, |
126 | { 0x0140, 0x013F }, |
127 | { 0x0142, 0x0141 }, |
128 | { 0x0144, 0x0143 }, |
129 | { 0x0146, 0x0145 }, |
130 | { 0x0148, 0x0147 }, |
131 | { 0x014B, 0x014A }, |
132 | { 0x014D, 0x014C }, |
133 | { 0x014F, 0x014E }, |
134 | { 0x0151, 0x0150 }, |
135 | { 0x0153, 0x0152 }, |
136 | { 0x0155, 0x0154 }, |
137 | { 0x0157, 0x0156 }, |
138 | { 0x0159, 0x0158 }, |
139 | { 0x015B, 0x015A }, |
140 | { 0x015D, 0x015C }, |
141 | { 0x015F, 0x015E }, |
142 | { 0x0161, 0x0160 }, |
143 | { 0x0163, 0x0162 }, |
144 | { 0x0165, 0x0164 }, |
145 | { 0x0167, 0x0166 }, |
146 | { 0x0169, 0x0168 }, |
147 | { 0x016B, 0x016A }, |
148 | { 0x016D, 0x016C }, |
149 | { 0x016F, 0x016E }, |
150 | { 0x0171, 0x0170 }, |
151 | { 0x0173, 0x0172 }, |
152 | { 0x0175, 0x0174 }, |
153 | { 0x0177, 0x0176 }, |
154 | { 0x017A, 0x0179 }, |
155 | { 0x017C, 0x017B }, |
156 | { 0x017E, 0x017D }, |
157 | { 0x0183, 0x0182 }, |
158 | { 0x0185, 0x0184 }, |
159 | { 0x0188, 0x0187 }, |
160 | { 0x018C, 0x018B }, |
161 | { 0x0192, 0x0191 }, |
162 | { 0x0199, 0x0198 }, |
163 | { 0x01A1, 0x01A0 }, |
164 | { 0x01A3, 0x01A2 }, |
165 | { 0x01A5, 0x01A4 }, |
166 | { 0x01A8, 0x01A7 }, |
167 | { 0x01AD, 0x01AC }, |
168 | { 0x01B0, 0x01AF }, |
169 | { 0x01B4, 0x01B3 }, |
170 | { 0x01B6, 0x01B5 }, |
171 | { 0x01B9, 0x01B8 }, |
172 | { 0x01BD, 0x01BC }, |
173 | { 0x01C6, 0x01C4 }, |
174 | { 0x01C9, 0x01C7 }, |
175 | { 0x01CC, 0x01CA }, |
176 | { 0x01CE, 0x01CD }, |
177 | { 0x01D0, 0x01CF }, |
178 | { 0x01D2, 0x01D1 }, |
179 | { 0x01D4, 0x01D3 }, |
180 | { 0x01D6, 0x01D5 }, |
181 | { 0x01D8, 0x01D7 }, |
182 | { 0x01DA, 0x01D9 }, |
183 | { 0x01DC, 0x01DB }, |
184 | { 0x01DF, 0x01DE }, |
185 | { 0x01E1, 0x01E0 }, |
186 | { 0x01E3, 0x01E2 }, |
187 | { 0x01E5, 0x01E4 }, |
188 | { 0x01E7, 0x01E6 }, |
189 | { 0x01E9, 0x01E8 }, |
190 | { 0x01EB, 0x01EA }, |
191 | { 0x01ED, 0x01EC }, |
192 | { 0x01EF, 0x01EE }, |
193 | { 0x01F3, 0x01F1 }, |
194 | { 0x01F5, 0x01F4 }, |
195 | { 0x01FB, 0x01FA }, |
196 | { 0x01FD, 0x01FC }, |
197 | { 0x01FF, 0x01FE }, |
198 | { 0x0201, 0x0200 }, |
199 | { 0x0203, 0x0202 }, |
200 | { 0x0205, 0x0204 }, |
201 | { 0x0207, 0x0206 }, |
202 | { 0x0209, 0x0208 }, |
203 | { 0x020B, 0x020A }, |
204 | { 0x020D, 0x020C }, |
205 | { 0x020F, 0x020E }, |
206 | { 0x0211, 0x0210 }, |
207 | { 0x0213, 0x0212 }, |
208 | { 0x0215, 0x0214 }, |
209 | { 0x0217, 0x0216 }, |
210 | { 0x0253, 0x0181 }, |
211 | { 0x0254, 0x0186 }, |
212 | { 0x0257, 0x018A }, |
213 | { 0x0258, 0x018E }, |
214 | { 0x0259, 0x018F }, |
215 | { 0x025B, 0x0190 }, |
216 | { 0x0260, 0x0193 }, |
217 | { 0x0263, 0x0194 }, |
218 | { 0x0268, 0x0197 }, |
219 | { 0x0269, 0x0196 }, |
220 | { 0x026F, 0x019C }, |
221 | { 0x0272, 0x019D }, |
222 | { 0x0275, 0x019F }, |
223 | { 0x0283, 0x01A9 }, |
224 | { 0x0288, 0x01AE }, |
225 | { 0x028A, 0x01B1 }, |
226 | { 0x028B, 0x01B2 }, |
227 | { 0x0292, 0x01B7 }, |
228 | { 0x03AC, 0x0386 }, |
229 | { 0x03AD, 0x0388 }, |
230 | { 0x03AE, 0x0389 }, |
231 | { 0x03AF, 0x038A }, |
232 | { 0x03B1, 0x0391 }, |
233 | { 0x03B2, 0x0392 }, |
234 | { 0x03B3, 0x0393 }, |
235 | { 0x03B4, 0x0394 }, |
236 | { 0x03B5, 0x0395 }, |
237 | { 0x03B6, 0x0396 }, |
238 | { 0x03B7, 0x0397 }, |
239 | { 0x03B8, 0x0398 }, |
240 | { 0x03B9, 0x0399 }, |
241 | { 0x03BA, 0x039A }, |
242 | { 0x03BB, 0x039B }, |
243 | { 0x03BC, 0x039C }, |
244 | { 0x03BD, 0x039D }, |
245 | { 0x03BE, 0x039E }, |
246 | { 0x03BF, 0x039F }, |
247 | { 0x03C0, 0x03A0 }, |
248 | { 0x03C1, 0x03A1 }, |
249 | { 0x03C3, 0x03A3 }, |
250 | { 0x03C4, 0x03A4 }, |
251 | { 0x03C5, 0x03A5 }, |
252 | { 0x03C6, 0x03A6 }, |
253 | { 0x03C7, 0x03A7 }, |
254 | { 0x03C8, 0x03A8 }, |
255 | { 0x03C9, 0x03A9 }, |
256 | { 0x03CA, 0x03AA }, |
257 | { 0x03CB, 0x03AB }, |
258 | { 0x03CC, 0x038C }, |
259 | { 0x03CD, 0x038E }, |
260 | { 0x03CE, 0x038F }, |
261 | { 0x03E3, 0x03E2 }, |
262 | { 0x03E5, 0x03E4 }, |
263 | { 0x03E7, 0x03E6 }, |
264 | { 0x03E9, 0x03E8 }, |
265 | { 0x03EB, 0x03EA }, |
266 | { 0x03ED, 0x03EC }, |
267 | { 0x03EF, 0x03EE }, |
268 | { 0x0430, 0x0410 }, |
269 | { 0x0431, 0x0411 }, |
270 | { 0x0432, 0x0412 }, |
271 | { 0x0433, 0x0413 }, |
272 | { 0x0434, 0x0414 }, |
273 | { 0x0435, 0x0415 }, |
274 | { 0x0436, 0x0416 }, |
275 | { 0x0437, 0x0417 }, |
276 | { 0x0438, 0x0418 }, |
277 | { 0x0439, 0x0419 }, |
278 | { 0x043A, 0x041A }, |
279 | { 0x043B, 0x041B }, |
280 | { 0x043C, 0x041C }, |
281 | { 0x043D, 0x041D }, |
282 | { 0x043E, 0x041E }, |
283 | { 0x043F, 0x041F }, |
284 | { 0x0440, 0x0420 }, |
285 | { 0x0441, 0x0421 }, |
286 | { 0x0442, 0x0422 }, |
287 | { 0x0443, 0x0423 }, |
288 | { 0x0444, 0x0424 }, |
289 | { 0x0445, 0x0425 }, |
290 | { 0x0446, 0x0426 }, |
291 | { 0x0447, 0x0427 }, |
292 | { 0x0448, 0x0428 }, |
293 | { 0x0449, 0x0429 }, |
294 | { 0x044A, 0x042A }, |
295 | { 0x044B, 0x042B }, |
296 | { 0x044C, 0x042C }, |
297 | { 0x044D, 0x042D }, |
298 | { 0x044E, 0x042E }, |
299 | { 0x044F, 0x042F }, |
300 | { 0x0451, 0x0401 }, |
301 | { 0x0452, 0x0402 }, |
302 | { 0x0453, 0x0403 }, |
303 | { 0x0454, 0x0404 }, |
304 | { 0x0455, 0x0405 }, |
305 | { 0x0456, 0x0406 }, |
306 | { 0x0457, 0x0407 }, |
307 | { 0x0458, 0x0408 }, |
308 | { 0x0459, 0x0409 }, |
309 | { 0x045A, 0x040A }, |
310 | { 0x045B, 0x040B }, |
311 | { 0x045C, 0x040C }, |
312 | { 0x045E, 0x040E }, |
313 | { 0x045F, 0x040F }, |
314 | { 0x0461, 0x0460 }, |
315 | { 0x0463, 0x0462 }, |
316 | { 0x0465, 0x0464 }, |
317 | { 0x0467, 0x0466 }, |
318 | { 0x0469, 0x0468 }, |
319 | { 0x046B, 0x046A }, |
320 | { 0x046D, 0x046C }, |
321 | { 0x046F, 0x046E }, |
322 | { 0x0471, 0x0470 }, |
323 | { 0x0473, 0x0472 }, |
324 | { 0x0475, 0x0474 }, |
325 | { 0x0477, 0x0476 }, |
326 | { 0x0479, 0x0478 }, |
327 | { 0x047B, 0x047A }, |
328 | { 0x047D, 0x047C }, |
329 | { 0x047F, 0x047E }, |
330 | { 0x0481, 0x0480 }, |
331 | { 0x0491, 0x0490 }, |
332 | { 0x0493, 0x0492 }, |
333 | { 0x0495, 0x0494 }, |
334 | { 0x0497, 0x0496 }, |
335 | { 0x0499, 0x0498 }, |
336 | { 0x049B, 0x049A }, |
337 | { 0x049D, 0x049C }, |
338 | { 0x049F, 0x049E }, |
339 | { 0x04A1, 0x04A0 }, |
340 | { 0x04A3, 0x04A2 }, |
341 | { 0x04A5, 0x04A4 }, |
342 | { 0x04A7, 0x04A6 }, |
343 | { 0x04A9, 0x04A8 }, |
344 | { 0x04AB, 0x04AA }, |
345 | { 0x04AD, 0x04AC }, |
346 | { 0x04AF, 0x04AE }, |
347 | { 0x04B1, 0x04B0 }, |
348 | { 0x04B3, 0x04B2 }, |
349 | { 0x04B5, 0x04B4 }, |
350 | { 0x04B7, 0x04B6 }, |
351 | { 0x04B9, 0x04B8 }, |
352 | { 0x04BB, 0x04BA }, |
353 | { 0x04BD, 0x04BC }, |
354 | { 0x04BF, 0x04BE }, |
355 | { 0x04C2, 0x04C1 }, |
356 | { 0x04C4, 0x04C3 }, |
357 | { 0x04C8, 0x04C7 }, |
358 | { 0x04CC, 0x04CB }, |
359 | { 0x04D1, 0x04D0 }, |
360 | { 0x04D3, 0x04D2 }, |
361 | { 0x04D5, 0x04D4 }, |
362 | { 0x04D7, 0x04D6 }, |
363 | { 0x04D9, 0x04D8 }, |
364 | { 0x04DB, 0x04DA }, |
365 | { 0x04DD, 0x04DC }, |
366 | { 0x04DF, 0x04DE }, |
367 | { 0x04E1, 0x04E0 }, |
368 | { 0x04E3, 0x04E2 }, |
369 | { 0x04E5, 0x04E4 }, |
370 | { 0x04E7, 0x04E6 }, |
371 | { 0x04E9, 0x04E8 }, |
372 | { 0x04EB, 0x04EA }, |
373 | { 0x04EF, 0x04EE }, |
374 | { 0x04F1, 0x04F0 }, |
375 | { 0x04F3, 0x04F2 }, |
376 | { 0x04F5, 0x04F4 }, |
377 | { 0x04F9, 0x04F8 }, |
378 | { 0x0561, 0x0531 }, |
379 | { 0x0562, 0x0532 }, |
380 | { 0x0563, 0x0533 }, |
381 | { 0x0564, 0x0534 }, |
382 | { 0x0565, 0x0535 }, |
383 | { 0x0566, 0x0536 }, |
384 | { 0x0567, 0x0537 }, |
385 | { 0x0568, 0x0538 }, |
386 | { 0x0569, 0x0539 }, |
387 | { 0x056A, 0x053A }, |
388 | { 0x056B, 0x053B }, |
389 | { 0x056C, 0x053C }, |
390 | { 0x056D, 0x053D }, |
391 | { 0x056E, 0x053E }, |
392 | { 0x056F, 0x053F }, |
393 | { 0x0570, 0x0540 }, |
394 | { 0x0571, 0x0541 }, |
395 | { 0x0572, 0x0542 }, |
396 | { 0x0573, 0x0543 }, |
397 | { 0x0574, 0x0544 }, |
398 | { 0x0575, 0x0545 }, |
399 | { 0x0576, 0x0546 }, |
400 | { 0x0577, 0x0547 }, |
401 | { 0x0578, 0x0548 }, |
402 | { 0x0579, 0x0549 }, |
403 | { 0x057A, 0x054A }, |
404 | { 0x057B, 0x054B }, |
405 | { 0x057C, 0x054C }, |
406 | { 0x057D, 0x054D }, |
407 | { 0x057E, 0x054E }, |
408 | { 0x057F, 0x054F }, |
409 | { 0x0580, 0x0550 }, |
410 | { 0x0581, 0x0551 }, |
411 | { 0x0582, 0x0552 }, |
412 | { 0x0583, 0x0553 }, |
413 | { 0x0584, 0x0554 }, |
414 | { 0x0585, 0x0555 }, |
415 | { 0x0586, 0x0556 }, |
416 | { 0x10D0, 0x10A0 }, |
417 | { 0x10D1, 0x10A1 }, |
418 | { 0x10D2, 0x10A2 }, |
419 | { 0x10D3, 0x10A3 }, |
420 | { 0x10D4, 0x10A4 }, |
421 | { 0x10D5, 0x10A5 }, |
422 | { 0x10D6, 0x10A6 }, |
423 | { 0x10D7, 0x10A7 }, |
424 | { 0x10D8, 0x10A8 }, |
425 | { 0x10D9, 0x10A9 }, |
426 | { 0x10DA, 0x10AA }, |
427 | { 0x10DB, 0x10AB }, |
428 | { 0x10DC, 0x10AC }, |
429 | { 0x10DD, 0x10AD }, |
430 | { 0x10DE, 0x10AE }, |
431 | { 0x10DF, 0x10AF }, |
432 | { 0x10E0, 0x10B0 }, |
433 | { 0x10E1, 0x10B1 }, |
434 | { 0x10E2, 0x10B2 }, |
435 | { 0x10E3, 0x10B3 }, |
436 | { 0x10E4, 0x10B4 }, |
437 | { 0x10E5, 0x10B5 }, |
438 | { 0x10E6, 0x10B6 }, |
439 | { 0x10E7, 0x10B7 }, |
440 | { 0x10E8, 0x10B8 }, |
441 | { 0x10E9, 0x10B9 }, |
442 | { 0x10EA, 0x10BA }, |
443 | { 0x10EB, 0x10BB }, |
444 | { 0x10EC, 0x10BC }, |
445 | { 0x10ED, 0x10BD }, |
446 | { 0x10EE, 0x10BE }, |
447 | { 0x10EF, 0x10BF }, |
448 | { 0x10F0, 0x10C0 }, |
449 | { 0x10F1, 0x10C1 }, |
450 | { 0x10F2, 0x10C2 }, |
451 | { 0x10F3, 0x10C3 }, |
452 | { 0x10F4, 0x10C4 }, |
453 | { 0x10F5, 0x10C5 }, |
454 | { 0x1E01, 0x1E00 }, |
455 | { 0x1E03, 0x1E02 }, |
456 | { 0x1E05, 0x1E04 }, |
457 | { 0x1E07, 0x1E06 }, |
458 | { 0x1E09, 0x1E08 }, |
459 | { 0x1E0B, 0x1E0A }, |
460 | { 0x1E0D, 0x1E0C }, |
461 | { 0x1E0F, 0x1E0E }, |
462 | { 0x1E11, 0x1E10 }, |
463 | { 0x1E13, 0x1E12 }, |
464 | { 0x1E15, 0x1E14 }, |
465 | { 0x1E17, 0x1E16 }, |
466 | { 0x1E19, 0x1E18 }, |
467 | { 0x1E1B, 0x1E1A }, |
468 | { 0x1E1D, 0x1E1C }, |
469 | { 0x1E1F, 0x1E1E }, |
470 | { 0x1E21, 0x1E20 }, |
471 | { 0x1E23, 0x1E22 }, |
472 | { 0x1E25, 0x1E24 }, |
473 | { 0x1E27, 0x1E26 }, |
474 | { 0x1E29, 0x1E28 }, |
475 | { 0x1E2B, 0x1E2A }, |
476 | { 0x1E2D, 0x1E2C }, |
477 | { 0x1E2F, 0x1E2E }, |
478 | { 0x1E31, 0x1E30 }, |
479 | { 0x1E33, 0x1E32 }, |
480 | { 0x1E35, 0x1E34 }, |
481 | { 0x1E37, 0x1E36 }, |
482 | { 0x1E39, 0x1E38 }, |
483 | { 0x1E3B, 0x1E3A }, |
484 | { 0x1E3D, 0x1E3C }, |
485 | { 0x1E3F, 0x1E3E }, |
486 | { 0x1E41, 0x1E40 }, |
487 | { 0x1E43, 0x1E42 }, |
488 | { 0x1E45, 0x1E44 }, |
489 | { 0x1E47, 0x1E46 }, |
490 | { 0x1E49, 0x1E48 }, |
491 | { 0x1E4B, 0x1E4A }, |
492 | { 0x1E4D, 0x1E4C }, |
493 | { 0x1E4F, 0x1E4E }, |
494 | { 0x1E51, 0x1E50 }, |
495 | { 0x1E53, 0x1E52 }, |
496 | { 0x1E55, 0x1E54 }, |
497 | { 0x1E57, 0x1E56 }, |
498 | { 0x1E59, 0x1E58 }, |
499 | { 0x1E5B, 0x1E5A }, |
500 | { 0x1E5D, 0x1E5C }, |
501 | { 0x1E5F, 0x1E5E }, |
502 | { 0x1E61, 0x1E60 }, |
503 | { 0x1E63, 0x1E62 }, |
504 | { 0x1E65, 0x1E64 }, |
505 | { 0x1E67, 0x1E66 }, |
506 | { 0x1E69, 0x1E68 }, |
507 | { 0x1E6B, 0x1E6A }, |
508 | { 0x1E6D, 0x1E6C }, |
509 | { 0x1E6F, 0x1E6E }, |
510 | { 0x1E71, 0x1E70 }, |
511 | { 0x1E73, 0x1E72 }, |
512 | { 0x1E75, 0x1E74 }, |
513 | { 0x1E77, 0x1E76 }, |
514 | { 0x1E79, 0x1E78 }, |
515 | { 0x1E7B, 0x1E7A }, |
516 | { 0x1E7D, 0x1E7C }, |
517 | { 0x1E7F, 0x1E7E }, |
518 | { 0x1E81, 0x1E80 }, |
519 | { 0x1E83, 0x1E82 }, |
520 | { 0x1E85, 0x1E84 }, |
521 | { 0x1E87, 0x1E86 }, |
522 | { 0x1E89, 0x1E88 }, |
523 | { 0x1E8B, 0x1E8A }, |
524 | { 0x1E8D, 0x1E8C }, |
525 | { 0x1E8F, 0x1E8E }, |
526 | { 0x1E91, 0x1E90 }, |
527 | { 0x1E93, 0x1E92 }, |
528 | { 0x1E95, 0x1E94 }, |
529 | { 0x1EA1, 0x1EA0 }, |
530 | { 0x1EA3, 0x1EA2 }, |
531 | { 0x1EA5, 0x1EA4 }, |
532 | { 0x1EA7, 0x1EA6 }, |
533 | { 0x1EA9, 0x1EA8 }, |
534 | { 0x1EAB, 0x1EAA }, |
535 | { 0x1EAD, 0x1EAC }, |
536 | { 0x1EAF, 0x1EAE }, |
537 | { 0x1EB1, 0x1EB0 }, |
538 | { 0x1EB3, 0x1EB2 }, |
539 | { 0x1EB5, 0x1EB4 }, |
540 | { 0x1EB7, 0x1EB6 }, |
541 | { 0x1EB9, 0x1EB8 }, |
542 | { 0x1EBB, 0x1EBA }, |
543 | { 0x1EBD, 0x1EBC }, |
544 | { 0x1EBF, 0x1EBE }, |
545 | { 0x1EC1, 0x1EC0 }, |
546 | { 0x1EC3, 0x1EC2 }, |
547 | { 0x1EC5, 0x1EC4 }, |
548 | { 0x1EC7, 0x1EC6 }, |
549 | { 0x1EC9, 0x1EC8 }, |
550 | { 0x1ECB, 0x1ECA }, |
551 | { 0x1ECD, 0x1ECC }, |
552 | { 0x1ECF, 0x1ECE }, |
553 | { 0x1ED1, 0x1ED0 }, |
554 | { 0x1ED3, 0x1ED2 }, |
555 | { 0x1ED5, 0x1ED4 }, |
556 | { 0x1ED7, 0x1ED6 }, |
557 | { 0x1ED9, 0x1ED8 }, |
558 | { 0x1EDB, 0x1EDA }, |
559 | { 0x1EDD, 0x1EDC }, |
560 | { 0x1EDF, 0x1EDE }, |
561 | { 0x1EE1, 0x1EE0 }, |
562 | { 0x1EE3, 0x1EE2 }, |
563 | { 0x1EE5, 0x1EE4 }, |
564 | { 0x1EE7, 0x1EE6 }, |
565 | { 0x1EE9, 0x1EE8 }, |
566 | { 0x1EEB, 0x1EEA }, |
567 | { 0x1EED, 0x1EEC }, |
568 | { 0x1EEF, 0x1EEE }, |
569 | { 0x1EF1, 0x1EF0 }, |
570 | { 0x1EF3, 0x1EF2 }, |
571 | { 0x1EF5, 0x1EF4 }, |
572 | { 0x1EF7, 0x1EF6 }, |
573 | { 0x1EF9, 0x1EF8 }, |
574 | { 0x1F00, 0x1F08 }, |
575 | { 0x1F01, 0x1F09 }, |
576 | { 0x1F02, 0x1F0A }, |
577 | { 0x1F03, 0x1F0B }, |
578 | { 0x1F04, 0x1F0C }, |
579 | { 0x1F05, 0x1F0D }, |
580 | { 0x1F06, 0x1F0E }, |
581 | { 0x1F07, 0x1F0F }, |
582 | { 0x1F10, 0x1F18 }, |
583 | { 0x1F11, 0x1F19 }, |
584 | { 0x1F12, 0x1F1A }, |
585 | { 0x1F13, 0x1F1B }, |
586 | { 0x1F14, 0x1F1C }, |
587 | { 0x1F15, 0x1F1D }, |
588 | { 0x1F20, 0x1F28 }, |
589 | { 0x1F21, 0x1F29 }, |
590 | { 0x1F22, 0x1F2A }, |
591 | { 0x1F23, 0x1F2B }, |
592 | { 0x1F24, 0x1F2C }, |
593 | { 0x1F25, 0x1F2D }, |
594 | { 0x1F26, 0x1F2E }, |
595 | { 0x1F27, 0x1F2F }, |
596 | { 0x1F30, 0x1F38 }, |
597 | { 0x1F31, 0x1F39 }, |
598 | { 0x1F32, 0x1F3A }, |
599 | { 0x1F33, 0x1F3B }, |
600 | { 0x1F34, 0x1F3C }, |
601 | { 0x1F35, 0x1F3D }, |
602 | { 0x1F36, 0x1F3E }, |
603 | { 0x1F37, 0x1F3F }, |
604 | { 0x1F40, 0x1F48 }, |
605 | { 0x1F41, 0x1F49 }, |
606 | { 0x1F42, 0x1F4A }, |
607 | { 0x1F43, 0x1F4B }, |
608 | { 0x1F44, 0x1F4C }, |
609 | { 0x1F45, 0x1F4D }, |
610 | { 0x1F51, 0x1F59 }, |
611 | { 0x1F53, 0x1F5B }, |
612 | { 0x1F55, 0x1F5D }, |
613 | { 0x1F57, 0x1F5F }, |
614 | { 0x1F60, 0x1F68 }, |
615 | { 0x1F61, 0x1F69 }, |
616 | { 0x1F62, 0x1F6A }, |
617 | { 0x1F63, 0x1F6B }, |
618 | { 0x1F64, 0x1F6C }, |
619 | { 0x1F65, 0x1F6D }, |
620 | { 0x1F66, 0x1F6E }, |
621 | { 0x1F67, 0x1F6F }, |
622 | { 0x1F80, 0x1F88 }, |
623 | { 0x1F81, 0x1F89 }, |
624 | { 0x1F82, 0x1F8A }, |
625 | { 0x1F83, 0x1F8B }, |
626 | { 0x1F84, 0x1F8C }, |
627 | { 0x1F85, 0x1F8D }, |
628 | { 0x1F86, 0x1F8E }, |
629 | { 0x1F87, 0x1F8F }, |
630 | { 0x1F90, 0x1F98 }, |
631 | { 0x1F91, 0x1F99 }, |
632 | { 0x1F92, 0x1F9A }, |
633 | { 0x1F93, 0x1F9B }, |
634 | { 0x1F94, 0x1F9C }, |
635 | { 0x1F95, 0x1F9D }, |
636 | { 0x1F96, 0x1F9E }, |
637 | { 0x1F97, 0x1F9F }, |
638 | { 0x1FA0, 0x1FA8 }, |
639 | { 0x1FA1, 0x1FA9 }, |
640 | { 0x1FA2, 0x1FAA }, |
641 | { 0x1FA3, 0x1FAB }, |
642 | { 0x1FA4, 0x1FAC }, |
643 | { 0x1FA5, 0x1FAD }, |
644 | { 0x1FA6, 0x1FAE }, |
645 | { 0x1FA7, 0x1FAF }, |
646 | { 0x1FB0, 0x1FB8 }, |
647 | { 0x1FB1, 0x1FB9 }, |
648 | { 0x1FD0, 0x1FD8 }, |
649 | { 0x1FD1, 0x1FD9 }, |
650 | { 0x1FE0, 0x1FE8 }, |
651 | { 0x1FE1, 0x1FE9 }, |
652 | { 0x24D0, 0x24B6 }, |
653 | { 0x24D1, 0x24B7 }, |
654 | { 0x24D2, 0x24B8 }, |
655 | { 0x24D3, 0x24B9 }, |
656 | { 0x24D4, 0x24BA }, |
657 | { 0x24D5, 0x24BB }, |
658 | { 0x24D6, 0x24BC }, |
659 | { 0x24D7, 0x24BD }, |
660 | { 0x24D8, 0x24BE }, |
661 | { 0x24D9, 0x24BF }, |
662 | { 0x24DA, 0x24C0 }, |
663 | { 0x24DB, 0x24C1 }, |
664 | { 0x24DC, 0x24C2 }, |
665 | { 0x24DD, 0x24C3 }, |
666 | { 0x24DE, 0x24C4 }, |
667 | { 0x24DF, 0x24C5 }, |
668 | { 0x24E0, 0x24C6 }, |
669 | { 0x24E1, 0x24C7 }, |
670 | { 0x24E2, 0x24C8 }, |
671 | { 0x24E3, 0x24C9 }, |
672 | { 0x24E4, 0x24CA }, |
673 | { 0x24E5, 0x24CB }, |
674 | { 0x24E6, 0x24CC }, |
675 | { 0x24E7, 0x24CD }, |
676 | { 0x24E8, 0x24CE }, |
677 | { 0x24E9, 0x24CF }, |
678 | { 0xFF41, 0xFF21 }, |
679 | { 0xFF42, 0xFF22 }, |
680 | { 0xFF43, 0xFF23 }, |
681 | { 0xFF44, 0xFF24 }, |
682 | { 0xFF45, 0xFF25 }, |
683 | { 0xFF46, 0xFF26 }, |
684 | { 0xFF47, 0xFF27 }, |
685 | { 0xFF48, 0xFF28 }, |
686 | { 0xFF49, 0xFF29 }, |
687 | { 0xFF4A, 0xFF2A }, |
688 | { 0xFF4B, 0xFF2B }, |
689 | { 0xFF4C, 0xFF2C }, |
690 | { 0xFF4D, 0xFF2D }, |
691 | { 0xFF4E, 0xFF2E }, |
692 | { 0xFF4F, 0xFF2F }, |
693 | { 0xFF50, 0xFF30 }, |
694 | { 0xFF51, 0xFF31 }, |
695 | { 0xFF52, 0xFF32 }, |
696 | { 0xFF53, 0xFF33 }, |
697 | { 0xFF54, 0xFF34 }, |
698 | { 0xFF55, 0xFF35 }, |
699 | { 0xFF56, 0xFF36 }, |
700 | { 0xFF57, 0xFF37 }, |
701 | { 0xFF58, 0xFF38 }, |
702 | { 0xFF59, 0xFF39 }, |
703 | { 0xFF5A, 0xFF3A }, |
704 | }; |
705 | |
706 | static const int reverse_caps_table[CAPS_LEN - 1][2] = { |
707 | { 0x0041, 0x0061 }, |
708 | { 0x0042, 0x0062 }, |
709 | { 0x0043, 0x0063 }, |
710 | { 0x0044, 0x0064 }, |
711 | { 0x0045, 0x0065 }, |
712 | { 0x0046, 0x0066 }, |
713 | { 0x0047, 0x0067 }, |
714 | { 0x0048, 0x0068 }, |
715 | { 0x0049, 0x0069 }, |
716 | // { 0x0049, 0x0131 }, // dotless I |
717 | { 0x004A, 0x006A }, |
718 | { 0x004B, 0x006B }, |
719 | { 0x004C, 0x006C }, |
720 | { 0x004D, 0x006D }, |
721 | { 0x004E, 0x006E }, |
722 | { 0x004F, 0x006F }, |
723 | { 0x0050, 0x0070 }, |
724 | { 0x0051, 0x0071 }, |
725 | { 0x0052, 0x0072 }, |
726 | { 0x0053, 0x0073 }, |
727 | { 0x0054, 0x0074 }, |
728 | { 0x0055, 0x0075 }, |
729 | { 0x0056, 0x0076 }, |
730 | { 0x0057, 0x0077 }, |
731 | { 0x0058, 0x0078 }, |
732 | { 0x0059, 0x0079 }, |
733 | { 0x005A, 0x007A }, |
734 | { 0x00C0, 0x00E0 }, |
735 | { 0x00C1, 0x00E1 }, |
736 | { 0x00C2, 0x00E2 }, |
737 | { 0x00C3, 0x00E3 }, |
738 | { 0x00C4, 0x00E4 }, |
739 | { 0x00C5, 0x00E5 }, |
740 | { 0x00C6, 0x00E6 }, |
741 | { 0x00C7, 0x00E7 }, |
742 | { 0x00C8, 0x00E8 }, |
743 | { 0x00C9, 0x00E9 }, |
744 | { 0x00CA, 0x00EA }, |
745 | { 0x00CB, 0x00EB }, |
746 | { 0x00CC, 0x00EC }, |
747 | { 0x00CD, 0x00ED }, |
748 | { 0x00CE, 0x00EE }, |
749 | { 0x00CF, 0x00EF }, |
750 | { 0x00D0, 0x00F0 }, |
751 | { 0x00D1, 0x00F1 }, |
752 | { 0x00D2, 0x00F2 }, |
753 | { 0x00D3, 0x00F3 }, |
754 | { 0x00D4, 0x00F4 }, |
755 | { 0x00D5, 0x00F5 }, |
756 | { 0x00D6, 0x00F6 }, |
757 | { 0x00D8, 0x00F8 }, |
758 | { 0x00D9, 0x00F9 }, |
759 | { 0x00DA, 0x00FA }, |
760 | { 0x00DB, 0x00FB }, |
761 | { 0x00DC, 0x00FC }, |
762 | { 0x00DD, 0x00FD }, |
763 | { 0x00DE, 0x00FE }, |
764 | { 0x0100, 0x0101 }, |
765 | { 0x0102, 0x0103 }, |
766 | { 0x0104, 0x0105 }, |
767 | { 0x0106, 0x0107 }, |
768 | { 0x0108, 0x0109 }, |
769 | { 0x010A, 0x010B }, |
770 | { 0x010C, 0x010D }, |
771 | { 0x010E, 0x010F }, |
772 | { 0x0110, 0x0111 }, |
773 | { 0x0112, 0x0113 }, |
774 | { 0x0114, 0x0115 }, |
775 | { 0x0116, 0x0117 }, |
776 | { 0x0118, 0x0119 }, |
777 | { 0x011A, 0x011B }, |
778 | { 0x011C, 0x011D }, |
779 | { 0x011E, 0x011F }, |
780 | { 0x0120, 0x0121 }, |
781 | { 0x0122, 0x0123 }, |
782 | { 0x0124, 0x0125 }, |
783 | { 0x0126, 0x0127 }, |
784 | { 0x0128, 0x0129 }, |
785 | { 0x012A, 0x012B }, |
786 | { 0x012C, 0x012D }, |
787 | { 0x012E, 0x012F }, |
788 | { 0x0132, 0x0133 }, |
789 | { 0x0134, 0x0135 }, |
790 | { 0x0136, 0x0137 }, |
791 | { 0x0139, 0x013A }, |
792 | { 0x013B, 0x013C }, |
793 | { 0x013D, 0x013E }, |
794 | { 0x013F, 0x0140 }, |
795 | { 0x0141, 0x0142 }, |
796 | { 0x0143, 0x0144 }, |
797 | { 0x0145, 0x0146 }, |
798 | { 0x0147, 0x0148 }, |
799 | { 0x014A, 0x014B }, |
800 | { 0x014C, 0x014D }, |
801 | { 0x014E, 0x014F }, |
802 | { 0x0150, 0x0151 }, |
803 | { 0x0152, 0x0153 }, |
804 | { 0x0154, 0x0155 }, |
805 | { 0x0156, 0x0157 }, |
806 | { 0x0158, 0x0159 }, |
807 | { 0x015A, 0x015B }, |
808 | { 0x015C, 0x015D }, |
809 | { 0x015E, 0x015F }, |
810 | { 0x0160, 0x0161 }, |
811 | { 0x0162, 0x0163 }, |
812 | { 0x0164, 0x0165 }, |
813 | { 0x0166, 0x0167 }, |
814 | { 0x0168, 0x0169 }, |
815 | { 0x016A, 0x016B }, |
816 | { 0x016C, 0x016D }, |
817 | { 0x016E, 0x016F }, |
818 | { 0x0170, 0x0171 }, |
819 | { 0x0172, 0x0173 }, |
820 | { 0x0174, 0x0175 }, |
821 | { 0x0176, 0x0177 }, |
822 | { 0x0178, 0x00FF }, |
823 | { 0x0179, 0x017A }, |
824 | { 0x017B, 0x017C }, |
825 | { 0x017D, 0x017E }, |
826 | { 0x0181, 0x0253 }, |
827 | { 0x0182, 0x0183 }, |
828 | { 0x0184, 0x0185 }, |
829 | { 0x0186, 0x0254 }, |
830 | { 0x0187, 0x0188 }, |
831 | { 0x018A, 0x0257 }, |
832 | { 0x018B, 0x018C }, |
833 | { 0x018E, 0x0258 }, |
834 | { 0x018F, 0x0259 }, |
835 | { 0x0190, 0x025B }, |
836 | { 0x0191, 0x0192 }, |
837 | { 0x0193, 0x0260 }, |
838 | { 0x0194, 0x0263 }, |
839 | { 0x0196, 0x0269 }, |
840 | { 0x0197, 0x0268 }, |
841 | { 0x0198, 0x0199 }, |
842 | { 0x019C, 0x026F }, |
843 | { 0x019D, 0x0272 }, |
844 | { 0x019F, 0x0275 }, |
845 | { 0x01A0, 0x01A1 }, |
846 | { 0x01A2, 0x01A3 }, |
847 | { 0x01A4, 0x01A5 }, |
848 | { 0x01A7, 0x01A8 }, |
849 | { 0x01A9, 0x0283 }, |
850 | { 0x01AC, 0x01AD }, |
851 | { 0x01AE, 0x0288 }, |
852 | { 0x01AF, 0x01B0 }, |
853 | { 0x01B1, 0x028A }, |
854 | { 0x01B2, 0x028B }, |
855 | { 0x01B3, 0x01B4 }, |
856 | { 0x01B5, 0x01B6 }, |
857 | { 0x01B7, 0x0292 }, |
858 | { 0x01B8, 0x01B9 }, |
859 | { 0x01BC, 0x01BD }, |
860 | { 0x01C4, 0x01C6 }, |
861 | { 0x01C7, 0x01C9 }, |
862 | { 0x01CA, 0x01CC }, |
863 | { 0x01CD, 0x01CE }, |
864 | { 0x01CF, 0x01D0 }, |
865 | { 0x01D1, 0x01D2 }, |
866 | { 0x01D3, 0x01D4 }, |
867 | { 0x01D5, 0x01D6 }, |
868 | { 0x01D7, 0x01D8 }, |
869 | { 0x01D9, 0x01DA }, |
870 | { 0x01DB, 0x01DC }, |
871 | { 0x01DE, 0x01DF }, |
872 | { 0x01E0, 0x01E1 }, |
873 | { 0x01E2, 0x01E3 }, |
874 | { 0x01E4, 0x01E5 }, |
875 | { 0x01E6, 0x01E7 }, |
876 | { 0x01E8, 0x01E9 }, |
877 | { 0x01EA, 0x01EB }, |
878 | { 0x01EC, 0x01ED }, |
879 | { 0x01EE, 0x01EF }, |
880 | { 0x01F1, 0x01F3 }, |
881 | { 0x01F4, 0x01F5 }, |
882 | { 0x01FA, 0x01FB }, |
883 | { 0x01FC, 0x01FD }, |
884 | { 0x01FE, 0x01FF }, |
885 | { 0x0200, 0x0201 }, |
886 | { 0x0202, 0x0203 }, |
887 | { 0x0204, 0x0205 }, |
888 | { 0x0206, 0x0207 }, |
889 | { 0x0208, 0x0209 }, |
890 | { 0x020A, 0x020B }, |
891 | { 0x020C, 0x020D }, |
892 | { 0x020E, 0x020F }, |
893 | { 0x0210, 0x0211 }, |
894 | { 0x0212, 0x0213 }, |
895 | { 0x0214, 0x0215 }, |
896 | { 0x0216, 0x0217 }, |
897 | { 0x0386, 0x03AC }, |
898 | { 0x0388, 0x03AD }, |
899 | { 0x0389, 0x03AE }, |
900 | { 0x038A, 0x03AF }, |
901 | { 0x038C, 0x03CC }, |
902 | { 0x038E, 0x03CD }, |
903 | { 0x038F, 0x03CE }, |
904 | { 0x0391, 0x03B1 }, |
905 | { 0x0392, 0x03B2 }, |
906 | { 0x0393, 0x03B3 }, |
907 | { 0x0394, 0x03B4 }, |
908 | { 0x0395, 0x03B5 }, |
909 | { 0x0396, 0x03B6 }, |
910 | { 0x0397, 0x03B7 }, |
911 | { 0x0398, 0x03B8 }, |
912 | { 0x0399, 0x03B9 }, |
913 | { 0x039A, 0x03BA }, |
914 | { 0x039B, 0x03BB }, |
915 | { 0x039C, 0x03BC }, |
916 | { 0x039D, 0x03BD }, |
917 | { 0x039E, 0x03BE }, |
918 | { 0x039F, 0x03BF }, |
919 | { 0x03A0, 0x03C0 }, |
920 | { 0x03A1, 0x03C1 }, |
921 | { 0x03A3, 0x03C3 }, |
922 | { 0x03A4, 0x03C4 }, |
923 | { 0x03A5, 0x03C5 }, |
924 | { 0x03A6, 0x03C6 }, |
925 | { 0x03A7, 0x03C7 }, |
926 | { 0x03A8, 0x03C8 }, |
927 | { 0x03A9, 0x03C9 }, |
928 | { 0x03AA, 0x03CA }, |
929 | { 0x03AB, 0x03CB }, |
930 | { 0x03E2, 0x03E3 }, |
931 | { 0x03E4, 0x03E5 }, |
932 | { 0x03E6, 0x03E7 }, |
933 | { 0x03E8, 0x03E9 }, |
934 | { 0x03EA, 0x03EB }, |
935 | { 0x03EC, 0x03ED }, |
936 | { 0x03EE, 0x03EF }, |
937 | { 0x0401, 0x0451 }, |
938 | { 0x0402, 0x0452 }, |
939 | { 0x0403, 0x0453 }, |
940 | { 0x0404, 0x0454 }, |
941 | { 0x0405, 0x0455 }, |
942 | { 0x0406, 0x0456 }, |
943 | { 0x0407, 0x0457 }, |
944 | { 0x0408, 0x0458 }, |
945 | { 0x0409, 0x0459 }, |
946 | { 0x040A, 0x045A }, |
947 | { 0x040B, 0x045B }, |
948 | { 0x040C, 0x045C }, |
949 | { 0x040E, 0x045E }, |
950 | { 0x040F, 0x045F }, |
951 | { 0x0410, 0x0430 }, |
952 | { 0x0411, 0x0431 }, |
953 | { 0x0412, 0x0432 }, |
954 | { 0x0413, 0x0433 }, |
955 | { 0x0414, 0x0434 }, |
956 | { 0x0415, 0x0435 }, |
957 | { 0x0416, 0x0436 }, |
958 | { 0x0417, 0x0437 }, |
959 | { 0x0418, 0x0438 }, |
960 | { 0x0419, 0x0439 }, |
961 | { 0x041A, 0x043A }, |
962 | { 0x041B, 0x043B }, |
963 | { 0x041C, 0x043C }, |
964 | { 0x041D, 0x043D }, |
965 | { 0x041E, 0x043E }, |
966 | { 0x041F, 0x043F }, |
967 | { 0x0420, 0x0440 }, |
968 | { 0x0421, 0x0441 }, |
969 | { 0x0422, 0x0442 }, |
970 | { 0x0423, 0x0443 }, |
971 | { 0x0424, 0x0444 }, |
972 | { 0x0425, 0x0445 }, |
973 | { 0x0426, 0x0446 }, |
974 | { 0x0427, 0x0447 }, |
975 | { 0x0428, 0x0448 }, |
976 | { 0x0429, 0x0449 }, |
977 | { 0x042A, 0x044A }, |
978 | { 0x042B, 0x044B }, |
979 | { 0x042C, 0x044C }, |
980 | { 0x042D, 0x044D }, |
981 | { 0x042E, 0x044E }, |
982 | { 0x042F, 0x044F }, |
983 | { 0x0460, 0x0461 }, |
984 | { 0x0462, 0x0463 }, |
985 | { 0x0464, 0x0465 }, |
986 | { 0x0466, 0x0467 }, |
987 | { 0x0468, 0x0469 }, |
988 | { 0x046A, 0x046B }, |
989 | { 0x046C, 0x046D }, |
990 | { 0x046E, 0x046F }, |
991 | { 0x0470, 0x0471 }, |
992 | { 0x0472, 0x0473 }, |
993 | { 0x0474, 0x0475 }, |
994 | { 0x0476, 0x0477 }, |
995 | { 0x0478, 0x0479 }, |
996 | { 0x047A, 0x047B }, |
997 | { 0x047C, 0x047D }, |
998 | { 0x047E, 0x047F }, |
999 | { 0x0480, 0x0481 }, |
1000 | { 0x0490, 0x0491 }, |
1001 | { 0x0492, 0x0493 }, |
1002 | { 0x0494, 0x0495 }, |
1003 | { 0x0496, 0x0497 }, |
1004 | { 0x0498, 0x0499 }, |
1005 | { 0x049A, 0x049B }, |
1006 | { 0x049C, 0x049D }, |
1007 | { 0x049E, 0x049F }, |
1008 | { 0x04A0, 0x04A1 }, |
1009 | { 0x04A2, 0x04A3 }, |
1010 | { 0x04A4, 0x04A5 }, |
1011 | { 0x04A6, 0x04A7 }, |
1012 | { 0x04A8, 0x04A9 }, |
1013 | { 0x04AA, 0x04AB }, |
1014 | { 0x04AC, 0x04AD }, |
1015 | { 0x04AE, 0x04AF }, |
1016 | { 0x04B0, 0x04B1 }, |
1017 | { 0x04B2, 0x04B3 }, |
1018 | { 0x04B4, 0x04B5 }, |
1019 | { 0x04B6, 0x04B7 }, |
1020 | { 0x04B8, 0x04B9 }, |
1021 | { 0x04BA, 0x04BB }, |
1022 | { 0x04BC, 0x04BD }, |
1023 | { 0x04BE, 0x04BF }, |
1024 | { 0x04C1, 0x04C2 }, |
1025 | { 0x04C3, 0x04C4 }, |
1026 | { 0x04C7, 0x04C8 }, |
1027 | { 0x04CB, 0x04CC }, |
1028 | { 0x04D0, 0x04D1 }, |
1029 | { 0x04D2, 0x04D3 }, |
1030 | { 0x04D4, 0x04D5 }, |
1031 | { 0x04D6, 0x04D7 }, |
1032 | { 0x04D8, 0x04D9 }, |
1033 | { 0x04DA, 0x04DB }, |
1034 | { 0x04DC, 0x04DD }, |
1035 | { 0x04DE, 0x04DF }, |
1036 | { 0x04E0, 0x04E1 }, |
1037 | { 0x04E2, 0x04E3 }, |
1038 | { 0x04E4, 0x04E5 }, |
1039 | { 0x04E6, 0x04E7 }, |
1040 | { 0x04E8, 0x04E9 }, |
1041 | { 0x04EA, 0x04EB }, |
1042 | { 0x04EE, 0x04EF }, |
1043 | { 0x04F0, 0x04F1 }, |
1044 | { 0x04F2, 0x04F3 }, |
1045 | { 0x04F4, 0x04F5 }, |
1046 | { 0x04F8, 0x04F9 }, |
1047 | { 0x0531, 0x0561 }, |
1048 | { 0x0532, 0x0562 }, |
1049 | { 0x0533, 0x0563 }, |
1050 | { 0x0534, 0x0564 }, |
1051 | { 0x0535, 0x0565 }, |
1052 | { 0x0536, 0x0566 }, |
1053 | { 0x0537, 0x0567 }, |
1054 | { 0x0538, 0x0568 }, |
1055 | { 0x0539, 0x0569 }, |
1056 | { 0x053A, 0x056A }, |
1057 | { 0x053B, 0x056B }, |
1058 | { 0x053C, 0x056C }, |
1059 | { 0x053D, 0x056D }, |
1060 | { 0x053E, 0x056E }, |
1061 | { 0x053F, 0x056F }, |
1062 | { 0x0540, 0x0570 }, |
1063 | { 0x0541, 0x0571 }, |
1064 | { 0x0542, 0x0572 }, |
1065 | { 0x0543, 0x0573 }, |
1066 | { 0x0544, 0x0574 }, |
1067 | { 0x0545, 0x0575 }, |
1068 | { 0x0546, 0x0576 }, |
1069 | { 0x0547, 0x0577 }, |
1070 | { 0x0548, 0x0578 }, |
1071 | { 0x0549, 0x0579 }, |
1072 | { 0x054A, 0x057A }, |
1073 | { 0x054B, 0x057B }, |
1074 | { 0x054C, 0x057C }, |
1075 | { 0x054D, 0x057D }, |
1076 | { 0x054E, 0x057E }, |
1077 | { 0x054F, 0x057F }, |
1078 | { 0x0550, 0x0580 }, |
1079 | { 0x0551, 0x0581 }, |
1080 | { 0x0552, 0x0582 }, |
1081 | { 0x0553, 0x0583 }, |
1082 | { 0x0554, 0x0584 }, |
1083 | { 0x0555, 0x0585 }, |
1084 | { 0x0556, 0x0586 }, |
1085 | { 0x10A0, 0x10D0 }, |
1086 | { 0x10A1, 0x10D1 }, |
1087 | { 0x10A2, 0x10D2 }, |
1088 | { 0x10A3, 0x10D3 }, |
1089 | { 0x10A4, 0x10D4 }, |
1090 | { 0x10A5, 0x10D5 }, |
1091 | { 0x10A6, 0x10D6 }, |
1092 | { 0x10A7, 0x10D7 }, |
1093 | { 0x10A8, 0x10D8 }, |
1094 | { 0x10A9, 0x10D9 }, |
1095 | { 0x10AA, 0x10DA }, |
1096 | { 0x10AB, 0x10DB }, |
1097 | { 0x10AC, 0x10DC }, |
1098 | { 0x10AD, 0x10DD }, |
1099 | { 0x10AE, 0x10DE }, |
1100 | { 0x10AF, 0x10DF }, |
1101 | { 0x10B0, 0x10E0 }, |
1102 | { 0x10B1, 0x10E1 }, |
1103 | { 0x10B2, 0x10E2 }, |
1104 | { 0x10B3, 0x10E3 }, |
1105 | { 0x10B4, 0x10E4 }, |
1106 | { 0x10B5, 0x10E5 }, |
1107 | { 0x10B6, 0x10E6 }, |
1108 | { 0x10B7, 0x10E7 }, |
1109 | { 0x10B8, 0x10E8 }, |
1110 | { 0x10B9, 0x10E9 }, |
1111 | { 0x10BA, 0x10EA }, |
1112 | { 0x10BB, 0x10EB }, |
1113 | { 0x10BC, 0x10EC }, |
1114 | { 0x10BD, 0x10ED }, |
1115 | { 0x10BE, 0x10EE }, |
1116 | { 0x10BF, 0x10EF }, |
1117 | { 0x10C0, 0x10F0 }, |
1118 | { 0x10C1, 0x10F1 }, |
1119 | { 0x10C2, 0x10F2 }, |
1120 | { 0x10C3, 0x10F3 }, |
1121 | { 0x10C4, 0x10F4 }, |
1122 | { 0x10C5, 0x10F5 }, |
1123 | { 0x1E00, 0x1E01 }, |
1124 | { 0x1E02, 0x1E03 }, |
1125 | { 0x1E04, 0x1E05 }, |
1126 | { 0x1E06, 0x1E07 }, |
1127 | { 0x1E08, 0x1E09 }, |
1128 | { 0x1E0A, 0x1E0B }, |
1129 | { 0x1E0C, 0x1E0D }, |
1130 | { 0x1E0E, 0x1E0F }, |
1131 | { 0x1E10, 0x1E11 }, |
1132 | { 0x1E12, 0x1E13 }, |
1133 | { 0x1E14, 0x1E15 }, |
1134 | { 0x1E16, 0x1E17 }, |
1135 | { 0x1E18, 0x1E19 }, |
1136 | { 0x1E1A, 0x1E1B }, |
1137 | { 0x1E1C, 0x1E1D }, |
1138 | { 0x1E1E, 0x1E1F }, |
1139 | { 0x1E20, 0x1E21 }, |
1140 | { 0x1E22, 0x1E23 }, |
1141 | { 0x1E24, 0x1E25 }, |
1142 | { 0x1E26, 0x1E27 }, |
1143 | { 0x1E28, 0x1E29 }, |
1144 | { 0x1E2A, 0x1E2B }, |
1145 | { 0x1E2C, 0x1E2D }, |
1146 | { 0x1E2E, 0x1E2F }, |
1147 | { 0x1E30, 0x1E31 }, |
1148 | { 0x1E32, 0x1E33 }, |
1149 | { 0x1E34, 0x1E35 }, |
1150 | { 0x1E36, 0x1E37 }, |
1151 | { 0x1E38, 0x1E39 }, |
1152 | { 0x1E3A, 0x1E3B }, |
1153 | { 0x1E3C, 0x1E3D }, |
1154 | { 0x1E3E, 0x1E3F }, |
1155 | { 0x1E40, 0x1E41 }, |
1156 | { 0x1E42, 0x1E43 }, |
1157 | { 0x1E44, 0x1E45 }, |
1158 | { 0x1E46, 0x1E47 }, |
1159 | { 0x1E48, 0x1E49 }, |
1160 | { 0x1E4A, 0x1E4B }, |
1161 | { 0x1E4C, 0x1E4D }, |
1162 | { 0x1E4E, 0x1E4F }, |
1163 | { 0x1E50, 0x1E51 }, |
1164 | { 0x1E52, 0x1E53 }, |
1165 | { 0x1E54, 0x1E55 }, |
1166 | { 0x1E56, 0x1E57 }, |
1167 | { 0x1E58, 0x1E59 }, |
1168 | { 0x1E5A, 0x1E5B }, |
1169 | { 0x1E5C, 0x1E5D }, |
1170 | { 0x1E5E, 0x1E5F }, |
1171 | { 0x1E60, 0x1E61 }, |
1172 | { 0x1E62, 0x1E63 }, |
1173 | { 0x1E64, 0x1E65 }, |
1174 | { 0x1E66, 0x1E67 }, |
1175 | { 0x1E68, 0x1E69 }, |
1176 | { 0x1E6A, 0x1E6B }, |
1177 | { 0x1E6C, 0x1E6D }, |
1178 | { 0x1E6E, 0x1E6F }, |
1179 | { 0x1E70, 0x1E71 }, |
1180 | { 0x1E72, 0x1E73 }, |
1181 | { 0x1E74, 0x1E75 }, |
1182 | { 0x1E76, 0x1E77 }, |
1183 | { 0x1E78, 0x1E79 }, |
1184 | { 0x1E7A, 0x1E7B }, |
1185 | { 0x1E7C, 0x1E7D }, |
1186 | { 0x1E7E, 0x1E7F }, |
1187 | { 0x1E80, 0x1E81 }, |
1188 | { 0x1E82, 0x1E83 }, |
1189 | { 0x1E84, 0x1E85 }, |
1190 | { 0x1E86, 0x1E87 }, |
1191 | { 0x1E88, 0x1E89 }, |
1192 | { 0x1E8A, 0x1E8B }, |
1193 | { 0x1E8C, 0x1E8D }, |
1194 | { 0x1E8E, 0x1E8F }, |
1195 | { 0x1E90, 0x1E91 }, |
1196 | { 0x1E92, 0x1E93 }, |
1197 | { 0x1E94, 0x1E95 }, |
1198 | { 0x1EA0, 0x1EA1 }, |
1199 | { 0x1EA2, 0x1EA3 }, |
1200 | { 0x1EA4, 0x1EA5 }, |
1201 | { 0x1EA6, 0x1EA7 }, |
1202 | { 0x1EA8, 0x1EA9 }, |
1203 | { 0x1EAA, 0x1EAB }, |
1204 | { 0x1EAC, 0x1EAD }, |
1205 | { 0x1EAE, 0x1EAF }, |
1206 | { 0x1EB0, 0x1EB1 }, |
1207 | { 0x1EB2, 0x1EB3 }, |
1208 | { 0x1EB4, 0x1EB5 }, |
1209 | { 0x1EB6, 0x1EB7 }, |
1210 | { 0x1EB8, 0x1EB9 }, |
1211 | { 0x1EBA, 0x1EBB }, |
1212 | { 0x1EBC, 0x1EBD }, |
1213 | { 0x1EBE, 0x1EBF }, |
1214 | { 0x1EC0, 0x1EC1 }, |
1215 | { 0x1EC2, 0x1EC3 }, |
1216 | { 0x1EC4, 0x1EC5 }, |
1217 | { 0x1EC6, 0x1EC7 }, |
1218 | { 0x1EC8, 0x1EC9 }, |
1219 | { 0x1ECA, 0x1ECB }, |
1220 | { 0x1ECC, 0x1ECD }, |
1221 | { 0x1ECE, 0x1ECF }, |
1222 | { 0x1ED0, 0x1ED1 }, |
1223 | { 0x1ED2, 0x1ED3 }, |
1224 | { 0x1ED4, 0x1ED5 }, |
1225 | { 0x1ED6, 0x1ED7 }, |
1226 | { 0x1ED8, 0x1ED9 }, |
1227 | { 0x1EDA, 0x1EDB }, |
1228 | { 0x1EDC, 0x1EDD }, |
1229 | { 0x1EDE, 0x1EDF }, |
1230 | { 0x1EE0, 0x1EE1 }, |
1231 | { 0x1EE2, 0x1EE3 }, |
1232 | { 0x1EE4, 0x1EE5 }, |
1233 | { 0x1EE6, 0x1EE7 }, |
1234 | { 0x1EE8, 0x1EE9 }, |
1235 | { 0x1EEA, 0x1EEB }, |
1236 | { 0x1EEC, 0x1EED }, |
1237 | { 0x1EEE, 0x1EEF }, |
1238 | { 0x1EF0, 0x1EF1 }, |
1239 | { 0x1EF2, 0x1EF3 }, |
1240 | { 0x1EF4, 0x1EF5 }, |
1241 | { 0x1EF6, 0x1EF7 }, |
1242 | { 0x1EF8, 0x1EF9 }, |
1243 | { 0x1F08, 0x1F00 }, |
1244 | { 0x1F09, 0x1F01 }, |
1245 | { 0x1F0A, 0x1F02 }, |
1246 | { 0x1F0B, 0x1F03 }, |
1247 | { 0x1F0C, 0x1F04 }, |
1248 | { 0x1F0D, 0x1F05 }, |
1249 | { 0x1F0E, 0x1F06 }, |
1250 | { 0x1F0F, 0x1F07 }, |
1251 | { 0x1F18, 0x1F10 }, |
1252 | { 0x1F19, 0x1F11 }, |
1253 | { 0x1F1A, 0x1F12 }, |
1254 | { 0x1F1B, 0x1F13 }, |
1255 | { 0x1F1C, 0x1F14 }, |
1256 | { 0x1F1D, 0x1F15 }, |
1257 | { 0x1F28, 0x1F20 }, |
1258 | { 0x1F29, 0x1F21 }, |
1259 | { 0x1F2A, 0x1F22 }, |
1260 | { 0x1F2B, 0x1F23 }, |
1261 | { 0x1F2C, 0x1F24 }, |
1262 | { 0x1F2D, 0x1F25 }, |
1263 | { 0x1F2E, 0x1F26 }, |
1264 | { 0x1F2F, 0x1F27 }, |
1265 | { 0x1F38, 0x1F30 }, |
1266 | { 0x1F39, 0x1F31 }, |
1267 | { 0x1F3A, 0x1F32 }, |
1268 | { 0x1F3B, 0x1F33 }, |
1269 | { 0x1F3C, 0x1F34 }, |
1270 | { 0x1F3D, 0x1F35 }, |
1271 | { 0x1F3E, 0x1F36 }, |
1272 | { 0x1F3F, 0x1F37 }, |
1273 | { 0x1F48, 0x1F40 }, |
1274 | { 0x1F49, 0x1F41 }, |
1275 | { 0x1F4A, 0x1F42 }, |
1276 | { 0x1F4B, 0x1F43 }, |
1277 | { 0x1F4C, 0x1F44 }, |
1278 | { 0x1F4D, 0x1F45 }, |
1279 | { 0x1F59, 0x1F51 }, |
1280 | { 0x1F5B, 0x1F53 }, |
1281 | { 0x1F5D, 0x1F55 }, |
1282 | { 0x1F5F, 0x1F57 }, |
1283 | { 0x1F68, 0x1F60 }, |
1284 | { 0x1F69, 0x1F61 }, |
1285 | { 0x1F6A, 0x1F62 }, |
1286 | { 0x1F6B, 0x1F63 }, |
1287 | { 0x1F6C, 0x1F64 }, |
1288 | { 0x1F6D, 0x1F65 }, |
1289 | { 0x1F6E, 0x1F66 }, |
1290 | { 0x1F6F, 0x1F67 }, |
1291 | { 0x1F88, 0x1F80 }, |
1292 | { 0x1F89, 0x1F81 }, |
1293 | { 0x1F8A, 0x1F82 }, |
1294 | { 0x1F8B, 0x1F83 }, |
1295 | { 0x1F8C, 0x1F84 }, |
1296 | { 0x1F8D, 0x1F85 }, |
1297 | { 0x1F8E, 0x1F86 }, |
1298 | { 0x1F8F, 0x1F87 }, |
1299 | { 0x1F98, 0x1F90 }, |
1300 | { 0x1F99, 0x1F91 }, |
1301 | { 0x1F9A, 0x1F92 }, |
1302 | { 0x1F9B, 0x1F93 }, |
1303 | { 0x1F9C, 0x1F94 }, |
1304 | { 0x1F9D, 0x1F95 }, |
1305 | { 0x1F9E, 0x1F96 }, |
1306 | { 0x1F9F, 0x1F97 }, |
1307 | { 0x1FA8, 0x1FA0 }, |
1308 | { 0x1FA9, 0x1FA1 }, |
1309 | { 0x1FAA, 0x1FA2 }, |
1310 | { 0x1FAB, 0x1FA3 }, |
1311 | { 0x1FAC, 0x1FA4 }, |
1312 | { 0x1FAD, 0x1FA5 }, |
1313 | { 0x1FAE, 0x1FA6 }, |
1314 | { 0x1FAF, 0x1FA7 }, |
1315 | { 0x1FB8, 0x1FB0 }, |
1316 | { 0x1FB9, 0x1FB1 }, |
1317 | { 0x1FD8, 0x1FD0 }, |
1318 | { 0x1FD9, 0x1FD1 }, |
1319 | { 0x1FE8, 0x1FE0 }, |
1320 | { 0x1FE9, 0x1FE1 }, |
1321 | { 0x24B6, 0x24D0 }, |
1322 | { 0x24B7, 0x24D1 }, |
1323 | { 0x24B8, 0x24D2 }, |
1324 | { 0x24B9, 0x24D3 }, |
1325 | { 0x24BA, 0x24D4 }, |
1326 | { 0x24BB, 0x24D5 }, |
1327 | { 0x24BC, 0x24D6 }, |
1328 | { 0x24BD, 0x24D7 }, |
1329 | { 0x24BE, 0x24D8 }, |
1330 | { 0x24BF, 0x24D9 }, |
1331 | { 0x24C0, 0x24DA }, |
1332 | { 0x24C1, 0x24DB }, |
1333 | { 0x24C2, 0x24DC }, |
1334 | { 0x24C3, 0x24DD }, |
1335 | { 0x24C4, 0x24DE }, |
1336 | { 0x24C5, 0x24DF }, |
1337 | { 0x24C6, 0x24E0 }, |
1338 | { 0x24C7, 0x24E1 }, |
1339 | { 0x24C8, 0x24E2 }, |
1340 | { 0x24C9, 0x24E3 }, |
1341 | { 0x24CA, 0x24E4 }, |
1342 | { 0x24CB, 0x24E5 }, |
1343 | { 0x24CC, 0x24E6 }, |
1344 | { 0x24CD, 0x24E7 }, |
1345 | { 0x24CE, 0x24E8 }, |
1346 | { 0x24CF, 0x24E9 }, |
1347 | { 0xFF21, 0xFF41 }, |
1348 | { 0xFF22, 0xFF42 }, |
1349 | { 0xFF23, 0xFF43 }, |
1350 | { 0xFF24, 0xFF44 }, |
1351 | { 0xFF25, 0xFF45 }, |
1352 | { 0xFF26, 0xFF46 }, |
1353 | { 0xFF27, 0xFF47 }, |
1354 | { 0xFF28, 0xFF48 }, |
1355 | { 0xFF29, 0xFF49 }, |
1356 | { 0xFF2A, 0xFF4A }, |
1357 | { 0xFF2B, 0xFF4B }, |
1358 | { 0xFF2C, 0xFF4C }, |
1359 | { 0xFF2D, 0xFF4D }, |
1360 | { 0xFF2E, 0xFF4E }, |
1361 | { 0xFF2F, 0xFF4F }, |
1362 | { 0xFF30, 0xFF50 }, |
1363 | { 0xFF31, 0xFF51 }, |
1364 | { 0xFF32, 0xFF52 }, |
1365 | { 0xFF33, 0xFF53 }, |
1366 | { 0xFF34, 0xFF54 }, |
1367 | { 0xFF35, 0xFF55 }, |
1368 | { 0xFF36, 0xFF56 }, |
1369 | { 0xFF37, 0xFF57 }, |
1370 | { 0xFF38, 0xFF58 }, |
1371 | { 0xFF39, 0xFF59 }, |
1372 | { 0xFF3A, 0xFF5A }, |
1373 | }; |
1374 | |
1375 | static int _find_upper(int ch) { |
1376 | int low = 0; |
1377 | int high = CAPS_LEN - 1; |
1378 | int middle; |
1379 | |
1380 | while (low <= high) { |
1381 | middle = (low + high) / 2; |
1382 | |
1383 | if (ch < caps_table[middle][0]) { |
1384 | high = middle - 1; //search low end of array |
1385 | } else if (caps_table[middle][0] < ch) { |
1386 | low = middle + 1; //search high end of array |
1387 | } else { |
1388 | return caps_table[middle][1]; |
1389 | } |
1390 | } |
1391 | |
1392 | return ch; |
1393 | } |
1394 | |
1395 | static int _find_lower(int ch) { |
1396 | int low = 0; |
1397 | int high = CAPS_LEN - 2; |
1398 | int middle; |
1399 | |
1400 | while (low <= high) { |
1401 | middle = (low + high) / 2; |
1402 | |
1403 | if (ch < reverse_caps_table[middle][0]) { |
1404 | high = middle - 1; //search low end of array |
1405 | } else if (reverse_caps_table[middle][0] < ch) { |
1406 | low = middle + 1; //search high end of array |
1407 | } else { |
1408 | return reverse_caps_table[middle][1]; |
1409 | } |
1410 | } |
1411 | |
1412 | return ch; |
1413 | } |
1414 | |
1415 | #endif // UCAPS_H |
1416 | |