1 | static const uint32_t to_ucs4[256] = { |
2 | [0x01] = 0x0001, |
3 | [0x02] = 0x0002, |
4 | [0x03] = 0x0003, |
5 | [0x04] = 0x0004, |
6 | [0x05] = 0x0005, |
7 | [0x06] = 0x0006, |
8 | [0x07] = 0x0007, |
9 | [0x08] = 0x0008, |
10 | [0x09] = 0x0009, |
11 | [0x0a] = 0x000A, |
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] = 0x0014, |
22 | [0x15] = 0x0015, |
23 | [0x16] = 0x0016, |
24 | [0x17] = 0x0017, |
25 | [0x18] = 0x0018, |
26 | [0x19] = 0x0019, |
27 | [0x1a] = 0x001A, |
28 | [0x1b] = 0x001B, |
29 | [0x1c] = 0x001C, |
30 | [0x1d] = 0x001D, |
31 | [0x1e] = 0x001E, |
32 | [0x1f] = 0x001F, |
33 | [0x20] = 0x0020, |
34 | [0x40] = 0x0491, |
35 | [0x41] = 0x0452, |
36 | [0x42] = 0x0453, |
37 | [0x43] = 0x0454, |
38 | [0x44] = 0x0451, |
39 | [0x45] = 0x0455, |
40 | [0x46] = 0x0456, |
41 | [0x47] = 0x0457, |
42 | [0x48] = 0x0458, |
43 | [0x49] = 0x0459, |
44 | [0x4a] = 0x045A, |
45 | [0x4b] = 0x045B, |
46 | [0x4c] = 0x045C, |
47 | [0x4d] = 0x045E, |
48 | [0x4e] = 0x045F, |
49 | [0x50] = 0x0463, |
50 | [0x51] = 0x0473, |
51 | [0x52] = 0x0475, |
52 | [0x53] = 0x046B, |
53 | [0x5b] = 0x005B, |
54 | [0x5d] = 0x005D, |
55 | [0x5f] = 0x005F, |
56 | [0x60] = 0x0490, |
57 | [0x61] = 0x0402, |
58 | [0x62] = 0x0403, |
59 | [0x63] = 0x0404, |
60 | [0x64] = 0x0401, |
61 | [0x65] = 0x0405, |
62 | [0x66] = 0x0406, |
63 | [0x67] = 0x0407, |
64 | [0x68] = 0x0408, |
65 | [0x69] = 0x0409, |
66 | [0x6a] = 0x040A, |
67 | [0x6b] = 0x040B, |
68 | [0x6c] = 0x040C, |
69 | [0x6d] = 0x040E, |
70 | [0x6e] = 0x040F, |
71 | [0x6f] = 0x042A, |
72 | [0x70] = 0x0462, |
73 | [0x71] = 0x0472, |
74 | [0x72] = 0x0474, |
75 | [0x73] = 0x046A, |
76 | [0x7f] = 0x007F, |
77 | }; |
78 | static const struct gap from_idx[] = { |
79 | { .start = 0x0000, .end = 0x0020, .idx = 0 }, |
80 | { .start = 0x005b, .end = 0x005f, .idx = -58 }, |
81 | { .start = 0x007f, .end = 0x007f, .idx = -89 }, |
82 | { .start = 0x0401, .end = 0x040f, .idx = -986 }, |
83 | { .start = 0x042a, .end = 0x042a, .idx = -1012 }, |
84 | { .start = 0x0451, .end = 0x0463, .idx = -1050 }, |
85 | { .start = 0x046a, .end = 0x046b, .idx = -1056 }, |
86 | { .start = 0x0472, .end = 0x0475, .idx = -1062 }, |
87 | { .start = 0x0490, .end = 0x0491, .idx = -1088 }, |
88 | { .start = 0xffff, .end = 0xffff, .idx = 0 } |
89 | }; |
90 | static const char from_ucs4[] = { |
91 | |
92 | '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', |
93 | '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', |
94 | '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', |
95 | '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', |
96 | '\x20', '\x5b', '\x00', '\x5d', '\x00', '\x5f', '\x7f', '\x64', |
97 | '\x61', '\x62', '\x63', '\x65', '\x66', '\x67', '\x68', '\x69', |
98 | '\x6a', '\x6b', '\x6c', '\x00', '\x6d', '\x6e', '\x6f', '\x44', |
99 | '\x41', '\x42', '\x43', '\x45', '\x46', '\x47', '\x48', '\x49', |
100 | '\x4a', '\x4b', '\x4c', '\x00', '\x4d', '\x4e', '\x00', '\x00', |
101 | '\x70', '\x50', '\x73', '\x53', '\x71', '\x51', '\x72', '\x52', |
102 | '\x60', '\x40', |
103 | }; |
104 | |