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 [0x42] = 0x00E2,
67 [0x48] = 0x00E7,
68 [0x4a] = 0x00E0,
69 [0x4b] = 0x002E,
70 [0x4c] = 0x003C,
71 [0x4d] = 0x0028,
72 [0x4e] = 0x002B,
73 [0x4f] = 0x0021,
74 [0x50] = 0x0026,
75 [0x52] = 0x00EA,
76 [0x53] = 0x00EB,
77 [0x56] = 0x00EE,
78 [0x57] = 0x00EF,
79 [0x5a] = 0x00B4,
80 [0x5b] = 0x0024,
81 [0x5c] = 0x002A,
82 [0x5d] = 0x0029,
83 [0x5e] = 0x003B,
84 [0x5f] = 0x005E,
85 [0x60] = 0x002D,
86 [0x61] = 0x002F,
87 [0x62] = 0x00C2,
88 [0x64] = 0x00C0,
89 [0x68] = 0x00C7,
90 [0x6a] = 0x00F9,
91 [0x6b] = 0x002C,
92 [0x6c] = 0x0025,
93 [0x6d] = 0x005F,
94 [0x6e] = 0x003E,
95 [0x6f] = 0x003F,
96 [0x71] = 0x00C9,
97 [0x72] = 0x00CA,
98 [0x73] = 0x00CB,
99 [0x75] = 0x00CE,
100 [0x76] = 0x00CF,
101 [0x79] = 0x0060,
102 [0x7a] = 0x003A,
103 [0x7b] = 0x0023,
104 [0x7c] = 0x0040,
105 [0x7d] = 0x0027,
106 [0x7e] = 0x003D,
107 [0x7f] = 0x0022,
108 [0x81] = 0x0061,
109 [0x82] = 0x0062,
110 [0x83] = 0x0063,
111 [0x84] = 0x0064,
112 [0x85] = 0x0065,
113 [0x86] = 0x0066,
114 [0x87] = 0x0067,
115 [0x88] = 0x0068,
116 [0x89] = 0x0069,
117 [0x91] = 0x006A,
118 [0x92] = 0x006B,
119 [0x93] = 0x006C,
120 [0x94] = 0x006D,
121 [0x95] = 0x006E,
122 [0x96] = 0x006F,
123 [0x97] = 0x0070,
124 [0x98] = 0x0071,
125 [0x99] = 0x0072,
126 [0xa1] = 0x00A8,
127 [0xa2] = 0x0073,
128 [0xa3] = 0x0074,
129 [0xa4] = 0x0075,
130 [0xa5] = 0x0076,
131 [0xa6] = 0x0077,
132 [0xa7] = 0x0078,
133 [0xa8] = 0x0079,
134 [0xa9] = 0x007A,
135 [0xc0] = 0x00E9,
136 [0xc1] = 0x0041,
137 [0xc2] = 0x0042,
138 [0xc3] = 0x0043,
139 [0xc4] = 0x0044,
140 [0xc5] = 0x0045,
141 [0xc6] = 0x0046,
142 [0xc7] = 0x0047,
143 [0xc8] = 0x0048,
144 [0xc9] = 0x0049,
145 [0xcb] = 0x00F4,
146 [0xd0] = 0x00E8,
147 [0xd1] = 0x004A,
148 [0xd2] = 0x004B,
149 [0xd3] = 0x004C,
150 [0xd4] = 0x004D,
151 [0xd5] = 0x004E,
152 [0xd6] = 0x004F,
153 [0xd7] = 0x0050,
154 [0xd8] = 0x0051,
155 [0xd9] = 0x0052,
156 [0xdb] = 0x00FB,
157 [0xdc] = 0x00FC,
158 [0xe0] = 0x00B8,
159 [0xe2] = 0x0053,
160 [0xe3] = 0x0054,
161 [0xe4] = 0x0055,
162 [0xe5] = 0x0056,
163 [0xe6] = 0x0057,
164 [0xe7] = 0x0058,
165 [0xe8] = 0x0059,
166 [0xe9] = 0x005A,
167 [0xeb] = 0x00D4,
168 [0xf0] = 0x0030,
169 [0xf1] = 0x0031,
170 [0xf2] = 0x0032,
171 [0xf3] = 0x0033,
172 [0xf4] = 0x0034,
173 [0xf5] = 0x0035,
174 [0xf6] = 0x0036,
175 [0xf7] = 0x0037,
176 [0xf8] = 0x0038,
177 [0xf9] = 0x0039,
178 [0xfb] = 0x00DB,
179 [0xfc] = 0x00DC,
180 [0xfd] = 0x00D9,
181 [0xff] = 0x009F,
182};
183static const char from_ucs4[] = {
184 [0x0001] = 0x01,
185 [0x0002] = 0x02,
186 [0x0003] = 0x03,
187 [0x0004] = 0x37,
188 [0x0005] = 0x2d,
189 [0x0006] = 0x2e,
190 [0x0007] = 0x2f,
191 [0x0008] = 0x16,
192 [0x0009] = 0x05,
193 [0x000A] = 0x25,
194 [0x000B] = 0x0b,
195 [0x000C] = 0x0c,
196 [0x000D] = 0x0d,
197 [0x000E] = 0x0e,
198 [0x000F] = 0x0f,
199 [0x0010] = 0x10,
200 [0x0011] = 0x11,
201 [0x0012] = 0x12,
202 [0x0013] = 0x13,
203 [0x0014] = 0x3c,
204 [0x0015] = 0x3d,
205 [0x0016] = 0x32,
206 [0x0017] = 0x26,
207 [0x0018] = 0x18,
208 [0x0019] = 0x19,
209 [0x001A] = 0x3f,
210 [0x001B] = 0x27,
211 [0x001C] = 0x1c,
212 [0x001D] = 0x1d,
213 [0x001E] = 0x1e,
214 [0x001F] = 0x1f,
215 [0x0020] = 0x40,
216 [0x0021] = 0x4f,
217 [0x0022] = 0x7f,
218 [0x0023] = 0x7b,
219 [0x0024] = 0x5b,
220 [0x0025] = 0x6c,
221 [0x0026] = 0x50,
222 [0x0027] = 0x7d,
223 [0x0028] = 0x4d,
224 [0x0029] = 0x5d,
225 [0x002A] = 0x5c,
226 [0x002B] = 0x4e,
227 [0x002C] = 0x6b,
228 [0x002D] = 0x60,
229 [0x002E] = 0x4b,
230 [0x002F] = 0x61,
231 [0x0030] = 0xf0,
232 [0x0031] = 0xf1,
233 [0x0032] = 0xf2,
234 [0x0033] = 0xf3,
235 [0x0034] = 0xf4,
236 [0x0035] = 0xf5,
237 [0x0036] = 0xf6,
238 [0x0037] = 0xf7,
239 [0x0038] = 0xf8,
240 [0x0039] = 0xf9,
241 [0x003A] = 0x7a,
242 [0x003B] = 0x5e,
243 [0x003C] = 0x4c,
244 [0x003D] = 0x7e,
245 [0x003E] = 0x6e,
246 [0x003F] = 0x6f,
247 [0x0040] = 0x7c,
248 [0x0041] = 0xc1,
249 [0x0042] = 0xc2,
250 [0x0043] = 0xc3,
251 [0x0044] = 0xc4,
252 [0x0045] = 0xc5,
253 [0x0046] = 0xc6,
254 [0x0047] = 0xc7,
255 [0x0048] = 0xc8,
256 [0x0049] = 0xc9,
257 [0x004A] = 0xd1,
258 [0x004B] = 0xd2,
259 [0x004C] = 0xd3,
260 [0x004D] = 0xd4,
261 [0x004E] = 0xd5,
262 [0x004F] = 0xd6,
263 [0x0050] = 0xd7,
264 [0x0051] = 0xd8,
265 [0x0052] = 0xd9,
266 [0x0053] = 0xe2,
267 [0x0054] = 0xe3,
268 [0x0055] = 0xe4,
269 [0x0056] = 0xe5,
270 [0x0057] = 0xe6,
271 [0x0058] = 0xe7,
272 [0x0059] = 0xe8,
273 [0x005A] = 0xe9,
274 [0x005E] = 0x5f,
275 [0x005F] = 0x6d,
276 [0x0060] = 0x79,
277 [0x0061] = 0x81,
278 [0x0062] = 0x82,
279 [0x0063] = 0x83,
280 [0x0064] = 0x84,
281 [0x0065] = 0x85,
282 [0x0066] = 0x86,
283 [0x0067] = 0x87,
284 [0x0068] = 0x88,
285 [0x0069] = 0x89,
286 [0x006A] = 0x91,
287 [0x006B] = 0x92,
288 [0x006C] = 0x93,
289 [0x006D] = 0x94,
290 [0x006E] = 0x95,
291 [0x006F] = 0x96,
292 [0x0070] = 0x97,
293 [0x0071] = 0x98,
294 [0x0072] = 0x99,
295 [0x0073] = 0xa2,
296 [0x0074] = 0xa3,
297 [0x0075] = 0xa4,
298 [0x0076] = 0xa5,
299 [0x0077] = 0xa6,
300 [0x0078] = 0xa7,
301 [0x0079] = 0xa8,
302 [0x007A] = 0xa9,
303 [0x007F] = 0x07,
304 [0x0080] = 0x20,
305 [0x0081] = 0x21,
306 [0x0082] = 0x22,
307 [0x0083] = 0x23,
308 [0x0084] = 0x24,
309 [0x0085] = 0x15,
310 [0x0086] = 0x06,
311 [0x0087] = 0x17,
312 [0x0088] = 0x28,
313 [0x0089] = 0x29,
314 [0x008A] = 0x2a,
315 [0x008B] = 0x2b,
316 [0x008C] = 0x2c,
317 [0x008D] = 0x09,
318 [0x008E] = 0x0a,
319 [0x008F] = 0x1b,
320 [0x0090] = 0x30,
321 [0x0091] = 0x31,
322 [0x0092] = 0x1a,
323 [0x0093] = 0x33,
324 [0x0094] = 0x34,
325 [0x0095] = 0x35,
326 [0x0096] = 0x36,
327 [0x0097] = 0x08,
328 [0x0098] = 0x38,
329 [0x0099] = 0x39,
330 [0x009A] = 0x3a,
331 [0x009B] = 0x3b,
332 [0x009C] = 0x04,
333 [0x009D] = 0x14,
334 [0x009E] = 0x3e,
335 [0x009F] = 0xff,
336 [0x00A8] = 0xa1,
337 [0x00B4] = 0x5a,
338 [0x00B8] = 0xe0,
339 [0x00C0] = 0x64,
340 [0x00C2] = 0x62,
341 [0x00C7] = 0x68,
342 [0x00C9] = 0x71,
343 [0x00CA] = 0x72,
344 [0x00CB] = 0x73,
345 [0x00CE] = 0x75,
346 [0x00CF] = 0x76,
347 [0x00D4] = 0xeb,
348 [0x00D9] = 0xfd,
349 [0x00DB] = 0xfb,
350 [0x00DC] = 0xfc,
351 [0x00E0] = 0x4a,
352 [0x00E2] = 0x42,
353 [0x00E7] = 0x48,
354 [0x00E8] = 0xd0,
355 [0x00E9] = 0xc0,
356 [0x00EA] = 0x52,
357 [0x00EB] = 0x53,
358 [0x00EE] = 0x56,
359 [0x00EF] = 0x57,
360 [0x00F4] = 0xcb,
361 [0x00F9] = 0x6a,
362 [0x00FB] = 0xdb,
363 [0x00FC] = 0xdc,
364};
365