1static const uint32_t to_ucs4[256] = {
2 [0x01] = 0x0001,
3 [0x02] = 0x0002,
4 [0x03] = 0x0003,
5 [0x04] = 0x009C,
6 [0x05] = 0x0009,
7 [0x06] = 0x0086,
8 [0x07] = 0x007F,
9 [0x08] = 0x0097,
10 [0x09] = 0x008D,
11 [0x0a] = 0x008E,
12 [0x0b] = 0x000B,
13 [0x0c] = 0x000C,
14 [0x0d] = 0x000D,
15 [0x0e] = 0x000E,
16 [0x0f] = 0x000F,
17 [0x10] = 0x0010,
18 [0x11] = 0x0011,
19 [0x12] = 0x0012,
20 [0x13] = 0x0013,
21 [0x14] = 0x009D,
22 [0x15] = 0x0085,
23 [0x16] = 0x0008,
24 [0x17] = 0x0087,
25 [0x18] = 0x0018,
26 [0x19] = 0x0019,
27 [0x1a] = 0x0092,
28 [0x1b] = 0x008F,
29 [0x1c] = 0x001C,
30 [0x1d] = 0x001D,
31 [0x1e] = 0x001E,
32 [0x1f] = 0x001F,
33 [0x20] = 0x0080,
34 [0x21] = 0x0081,
35 [0x22] = 0x0082,
36 [0x23] = 0x0083,
37 [0x24] = 0x0084,
38 [0x25] = 0x000A,
39 [0x26] = 0x0017,
40 [0x27] = 0x001B,
41 [0x28] = 0x0088,
42 [0x29] = 0x0089,
43 [0x2a] = 0x008A,
44 [0x2b] = 0x008B,
45 [0x2c] = 0x008C,
46 [0x2d] = 0x0005,
47 [0x2e] = 0x0006,
48 [0x2f] = 0x0007,
49 [0x30] = 0x0090,
50 [0x31] = 0x0091,
51 [0x32] = 0x0016,
52 [0x33] = 0x0093,
53 [0x34] = 0x0094,
54 [0x35] = 0x0095,
55 [0x36] = 0x0096,
56 [0x37] = 0x0004,
57 [0x38] = 0x0098,
58 [0x39] = 0x0099,
59 [0x3a] = 0x009A,
60 [0x3b] = 0x009B,
61 [0x3c] = 0x0014,
62 [0x3d] = 0x0015,
63 [0x3e] = 0x009E,
64 [0x3f] = 0x001A,
65 [0x40] = 0x0020,
66 [0x41] = 0x0391,
67 [0x42] = 0x0392,
68 [0x43] = 0x0393,
69 [0x44] = 0x0394,
70 [0x45] = 0x0395,
71 [0x46] = 0x0396,
72 [0x47] = 0x0397,
73 [0x48] = 0x0398,
74 [0x49] = 0x0399,
75 [0x4a] = 0x005B,
76 [0x4b] = 0x002E,
77 [0x4c] = 0x003C,
78 [0x4d] = 0x0028,
79 [0x4e] = 0x002B,
80 [0x4f] = 0x0021,
81 [0x50] = 0x0026,
82 [0x51] = 0x039A,
83 [0x52] = 0x039B,
84 [0x53] = 0x039C,
85 [0x54] = 0x039D,
86 [0x55] = 0x039E,
87 [0x56] = 0x039F,
88 [0x57] = 0x03A0,
89 [0x58] = 0x03A1,
90 [0x59] = 0x03A3,
91 [0x5a] = 0x005D,
92 [0x5b] = 0x0024,
93 [0x5c] = 0x002A,
94 [0x5d] = 0x0029,
95 [0x5e] = 0x003B,
96 [0x5f] = 0x005E,
97 [0x60] = 0x002D,
98 [0x61] = 0x002F,
99 [0x62] = 0x03A4,
100 [0x63] = 0x03A5,
101 [0x64] = 0x03A6,
102 [0x65] = 0x03A7,
103 [0x66] = 0x03A8,
104 [0x67] = 0x03A9,
105 [0x6b] = 0x002C,
106 [0x6c] = 0x0025,
107 [0x6d] = 0x005F,
108 [0x6e] = 0x003E,
109 [0x6f] = 0x003F,
110 [0x71] = 0x0386,
111 [0x72] = 0x0388,
112 [0x73] = 0x0389,
113 [0x75] = 0x038A,
114 [0x76] = 0x038C,
115 [0x77] = 0x038E,
116 [0x78] = 0x038F,
117 [0x79] = 0x0060,
118 [0x7a] = 0x003A,
119 [0x7b] = 0x00A3,
120 [0x7c] = 0x00A7,
121 [0x7d] = 0x0027,
122 [0x7e] = 0x003D,
123 [0x7f] = 0x0022,
124 [0x80] = 0x00C4,
125 [0x81] = 0x0061,
126 [0x82] = 0x0062,
127 [0x83] = 0x0063,
128 [0x84] = 0x0064,
129 [0x85] = 0x0065,
130 [0x86] = 0x0066,
131 [0x87] = 0x0067,
132 [0x88] = 0x0068,
133 [0x89] = 0x0069,
134 [0x8a] = 0x03B1,
135 [0x8b] = 0x03B2,
136 [0x8c] = 0x03B3,
137 [0x8d] = 0x03B4,
138 [0x8e] = 0x03B5,
139 [0x8f] = 0x03B6,
140 [0x90] = 0x00D6,
141 [0x91] = 0x006A,
142 [0x92] = 0x006B,
143 [0x93] = 0x006C,
144 [0x94] = 0x006D,
145 [0x95] = 0x006E,
146 [0x96] = 0x006F,
147 [0x97] = 0x0070,
148 [0x98] = 0x0071,
149 [0x99] = 0x0072,
150 [0x9a] = 0x03B7,
151 [0x9b] = 0x03B8,
152 [0x9c] = 0x03B9,
153 [0x9d] = 0x03BA,
154 [0x9e] = 0x03BB,
155 [0x9f] = 0x03BC,
156 [0xa0] = 0x00DC,
157 [0xa1] = 0x00A8,
158 [0xa2] = 0x0073,
159 [0xa3] = 0x0074,
160 [0xa4] = 0x0075,
161 [0xa5] = 0x0076,
162 [0xa6] = 0x0077,
163 [0xa7] = 0x0078,
164 [0xa8] = 0x0079,
165 [0xa9] = 0x007A,
166 [0xaa] = 0x03BD,
167 [0xab] = 0x03BE,
168 [0xac] = 0x03BF,
169 [0xad] = 0x03C0,
170 [0xae] = 0x03C1,
171 [0xaf] = 0x03C2,
172 [0xb1] = 0x03AC,
173 [0xb2] = 0x03AD,
174 [0xb3] = 0x03AE,
175 [0xb4] = 0x03CA,
176 [0xb5] = 0x03AF,
177 [0xb6] = 0x03CC,
178 [0xb7] = 0x03CD,
179 [0xb8] = 0x03CB,
180 [0xb9] = 0x03CE,
181 [0xba] = 0x03C3,
182 [0xbb] = 0x03C4,
183 [0xbc] = 0x03C5,
184 [0xbd] = 0x03C6,
185 [0xbe] = 0x03C7,
186 [0xbf] = 0x03C8,
187 [0xc0] = 0x00B8,
188 [0xc1] = 0x0041,
189 [0xc2] = 0x0042,
190 [0xc3] = 0x0043,
191 [0xc4] = 0x0044,
192 [0xc5] = 0x0045,
193 [0xc6] = 0x0046,
194 [0xc7] = 0x0047,
195 [0xc8] = 0x0048,
196 [0xc9] = 0x0049,
197 [0xcb] = 0x03C9,
198 [0xcc] = 0x00C2,
199 [0xcd] = 0x00E0,
200 [0xce] = 0x00E4,
201 [0xcf] = 0x00EA,
202 [0xd0] = 0x00B4,
203 [0xd1] = 0x004A,
204 [0xd2] = 0x004B,
205 [0xd3] = 0x004C,
206 [0xd4] = 0x004D,
207 [0xd5] = 0x004E,
208 [0xd6] = 0x004F,
209 [0xd7] = 0x0050,
210 [0xd8] = 0x0051,
211 [0xd9] = 0x0052,
212 [0xda] = 0x00B1,
213 [0xdb] = 0x00E9,
214 [0xdc] = 0x00E8,
215 [0xdd] = 0x00EB,
216 [0xde] = 0x00EE,
217 [0xdf] = 0x00EF,
218 [0xe0] = 0x00B0,
219 [0xe2] = 0x0053,
220 [0xe3] = 0x0054,
221 [0xe4] = 0x0055,
222 [0xe5] = 0x0056,
223 [0xe6] = 0x0057,
224 [0xe7] = 0x0058,
225 [0xe8] = 0x0059,
226 [0xe9] = 0x005A,
227 [0xea] = 0x00BD,
228 [0xeb] = 0x00F6,
229 [0xec] = 0x00F4,
230 [0xed] = 0x00FB,
231 [0xee] = 0x00F9,
232 [0xef] = 0x00FC,
233 [0xf0] = 0x0030,
234 [0xf1] = 0x0031,
235 [0xf2] = 0x0032,
236 [0xf3] = 0x0033,
237 [0xf4] = 0x0034,
238 [0xf5] = 0x0035,
239 [0xf6] = 0x0036,
240 [0xf7] = 0x0037,
241 [0xf8] = 0x0038,
242 [0xf9] = 0x0039,
243 [0xfa] = 0x00FF,
244 [0xfb] = 0x00E7,
245 [0xfc] = 0x00C7,
246 [0xff] = 0x009F,
247};
248static const char from_ucs4[] = {
249 [0x0001] = 0x01,
250 [0x0002] = 0x02,
251 [0x0003] = 0x03,
252 [0x0004] = 0x37,
253 [0x0005] = 0x2d,
254 [0x0006] = 0x2e,
255 [0x0007] = 0x2f,
256 [0x0008] = 0x16,
257 [0x0009] = 0x05,
258 [0x000A] = 0x25,
259 [0x000B] = 0x0b,
260 [0x000C] = 0x0c,
261 [0x000D] = 0x0d,
262 [0x000E] = 0x0e,
263 [0x000F] = 0x0f,
264 [0x0010] = 0x10,
265 [0x0011] = 0x11,
266 [0x0012] = 0x12,
267 [0x0013] = 0x13,
268 [0x0014] = 0x3c,
269 [0x0015] = 0x3d,
270 [0x0016] = 0x32,
271 [0x0017] = 0x26,
272 [0x0018] = 0x18,
273 [0x0019] = 0x19,
274 [0x001A] = 0x3f,
275 [0x001B] = 0x27,
276 [0x001C] = 0x1c,
277 [0x001D] = 0x1d,
278 [0x001E] = 0x1e,
279 [0x001F] = 0x1f,
280 [0x0020] = 0x40,
281 [0x0021] = 0x4f,
282 [0x0022] = 0x7f,
283 [0x0024] = 0x5b,
284 [0x0025] = 0x6c,
285 [0x0026] = 0x50,
286 [0x0027] = 0x7d,
287 [0x0028] = 0x4d,
288 [0x0029] = 0x5d,
289 [0x002A] = 0x5c,
290 [0x002B] = 0x4e,
291 [0x002C] = 0x6b,
292 [0x002D] = 0x60,
293 [0x002E] = 0x4b,
294 [0x002F] = 0x61,
295 [0x0030] = 0xf0,
296 [0x0031] = 0xf1,
297 [0x0032] = 0xf2,
298 [0x0033] = 0xf3,
299 [0x0034] = 0xf4,
300 [0x0035] = 0xf5,
301 [0x0036] = 0xf6,
302 [0x0037] = 0xf7,
303 [0x0038] = 0xf8,
304 [0x0039] = 0xf9,
305 [0x003A] = 0x7a,
306 [0x003B] = 0x5e,
307 [0x003C] = 0x4c,
308 [0x003D] = 0x7e,
309 [0x003E] = 0x6e,
310 [0x003F] = 0x6f,
311 [0x0041] = 0xc1,
312 [0x0042] = 0xc2,
313 [0x0043] = 0xc3,
314 [0x0044] = 0xc4,
315 [0x0045] = 0xc5,
316 [0x0046] = 0xc6,
317 [0x0047] = 0xc7,
318 [0x0048] = 0xc8,
319 [0x0049] = 0xc9,
320 [0x004A] = 0xd1,
321 [0x004B] = 0xd2,
322 [0x004C] = 0xd3,
323 [0x004D] = 0xd4,
324 [0x004E] = 0xd5,
325 [0x004F] = 0xd6,
326 [0x0050] = 0xd7,
327 [0x0051] = 0xd8,
328 [0x0052] = 0xd9,
329 [0x0053] = 0xe2,
330 [0x0054] = 0xe3,
331 [0x0055] = 0xe4,
332 [0x0056] = 0xe5,
333 [0x0057] = 0xe6,
334 [0x0058] = 0xe7,
335 [0x0059] = 0xe8,
336 [0x005A] = 0xe9,
337 [0x005B] = 0x4a,
338 [0x005D] = 0x5a,
339 [0x005E] = 0x5f,
340 [0x005F] = 0x6d,
341 [0x0060] = 0x79,
342 [0x0061] = 0x81,
343 [0x0062] = 0x82,
344 [0x0063] = 0x83,
345 [0x0064] = 0x84,
346 [0x0065] = 0x85,
347 [0x0066] = 0x86,
348 [0x0067] = 0x87,
349 [0x0068] = 0x88,
350 [0x0069] = 0x89,
351 [0x006A] = 0x91,
352 [0x006B] = 0x92,
353 [0x006C] = 0x93,
354 [0x006D] = 0x94,
355 [0x006E] = 0x95,
356 [0x006F] = 0x96,
357 [0x0070] = 0x97,
358 [0x0071] = 0x98,
359 [0x0072] = 0x99,
360 [0x0073] = 0xa2,
361 [0x0074] = 0xa3,
362 [0x0075] = 0xa4,
363 [0x0076] = 0xa5,
364 [0x0077] = 0xa6,
365 [0x0078] = 0xa7,
366 [0x0079] = 0xa8,
367 [0x007A] = 0xa9,
368 [0x007F] = 0x07,
369 [0x0080] = 0x20,
370 [0x0081] = 0x21,
371 [0x0082] = 0x22,
372 [0x0083] = 0x23,
373 [0x0084] = 0x24,
374 [0x0085] = 0x15,
375 [0x0086] = 0x06,
376 [0x0087] = 0x17,
377 [0x0088] = 0x28,
378 [0x0089] = 0x29,
379 [0x008A] = 0x2a,
380 [0x008B] = 0x2b,
381 [0x008C] = 0x2c,
382 [0x008D] = 0x09,
383 [0x008E] = 0x0a,
384 [0x008F] = 0x1b,
385 [0x0090] = 0x30,
386 [0x0091] = 0x31,
387 [0x0092] = 0x1a,
388 [0x0093] = 0x33,
389 [0x0094] = 0x34,
390 [0x0095] = 0x35,
391 [0x0096] = 0x36,
392 [0x0097] = 0x08,
393 [0x0098] = 0x38,
394 [0x0099] = 0x39,
395 [0x009A] = 0x3a,
396 [0x009B] = 0x3b,
397 [0x009C] = 0x04,
398 [0x009D] = 0x14,
399 [0x009E] = 0x3e,
400 [0x009F] = 0xff,
401 [0x00A3] = 0x7b,
402 [0x00A7] = 0x7c,
403 [0x00A8] = 0xa1,
404 [0x00B0] = 0xe0,
405 [0x00B1] = 0xda,
406 [0x00B4] = 0xd0,
407 [0x00B8] = 0xc0,
408 [0x00BD] = 0xea,
409 [0x00C2] = 0xcc,
410 [0x00C4] = 0x80,
411 [0x00C7] = 0xfc,
412 [0x00D6] = 0x90,
413 [0x00DC] = 0xa0,
414 [0x00E0] = 0xcd,
415 [0x00E4] = 0xce,
416 [0x00E7] = 0xfb,
417 [0x00E8] = 0xdc,
418 [0x00E9] = 0xdb,
419 [0x00EA] = 0xcf,
420 [0x00EB] = 0xdd,
421 [0x00EE] = 0xde,
422 [0x00EF] = 0xdf,
423 [0x00F4] = 0xec,
424 [0x00F6] = 0xeb,
425 [0x00F9] = 0xee,
426 [0x00FB] = 0xed,
427 [0x00FC] = 0xef,
428 [0x00FF] = 0xfa,
429 [0x0386] = 0x71,
430 [0x0388] = 0x72,
431 [0x0389] = 0x73,
432 [0x038A] = 0x75,
433 [0x038C] = 0x76,
434 [0x038E] = 0x77,
435 [0x038F] = 0x78,
436 [0x0391] = 0x41,
437 [0x0392] = 0x42,
438 [0x0393] = 0x43,
439 [0x0394] = 0x44,
440 [0x0395] = 0x45,
441 [0x0396] = 0x46,
442 [0x0397] = 0x47,
443 [0x0398] = 0x48,
444 [0x0399] = 0x49,
445 [0x039A] = 0x51,
446 [0x039B] = 0x52,
447 [0x039C] = 0x53,
448 [0x039D] = 0x54,
449 [0x039E] = 0x55,
450 [0x039F] = 0x56,
451 [0x03A0] = 0x57,
452 [0x03A1] = 0x58,
453 [0x03A3] = 0x59,
454 [0x03A4] = 0x62,
455 [0x03A5] = 0x63,
456 [0x03A6] = 0x64,
457 [0x03A7] = 0x65,
458 [0x03A8] = 0x66,
459 [0x03A9] = 0x67,
460 [0x03AC] = 0xb1,
461 [0x03AD] = 0xb2,
462 [0x03AE] = 0xb3,
463 [0x03AF] = 0xb5,
464 [0x03B1] = 0x8a,
465 [0x03B2] = 0x8b,
466 [0x03B3] = 0x8c,
467 [0x03B4] = 0x8d,
468 [0x03B5] = 0x8e,
469 [0x03B6] = 0x8f,
470 [0x03B7] = 0x9a,
471 [0x03B8] = 0x9b,
472 [0x03B9] = 0x9c,
473 [0x03BA] = 0x9d,
474 [0x03BB] = 0x9e,
475 [0x03BC] = 0x9f,
476 [0x03BD] = 0xaa,
477 [0x03BE] = 0xab,
478 [0x03BF] = 0xac,
479 [0x03C0] = 0xad,
480 [0x03C1] = 0xae,
481 [0x03C2] = 0xaf,
482 [0x03C3] = 0xba,
483 [0x03C4] = 0xbb,
484 [0x03C5] = 0xbc,
485 [0x03C6] = 0xbd,
486 [0x03C7] = 0xbe,
487 [0x03C8] = 0xbf,
488 [0x03C9] = 0xcb,
489 [0x03CA] = 0xb4,
490 [0x03CB] = 0xb8,
491 [0x03CC] = 0xb6,
492 [0x03CD] = 0xb7,
493 [0x03CE] = 0xb9,
494};
495