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 | [0x2c] = 0x221A, |
35 | [0x2e] = 0x2192, |
36 | [0x2f] = 0x222B, |
37 | [0x30] = 0x03B1, |
38 | [0x31] = 0x03B2, |
39 | [0x32] = 0x03B3, |
40 | [0x33] = 0x03B4, |
41 | [0x34] = 0x03A3, |
42 | [0x35] = 0x03BC, |
43 | [0x36] = 0x03BD, |
44 | [0x37] = 0x03C9, |
45 | [0x38] = 0x03C0, |
46 | [0x39] = 0x039E, |
47 | [0x3a] = 0x0394, |
48 | [0x3b] = 0x039B, |
49 | [0x3c] = 0x03A9, |
50 | [0x3d] = 0x042A, |
51 | [0x3e] = 0x207B, |
52 | [0x3f] = 0x207A, |
53 | [0x40] = 0x044E, |
54 | [0x41] = 0x0430, |
55 | [0x42] = 0x0431, |
56 | [0x43] = 0x0446, |
57 | [0x44] = 0x0434, |
58 | [0x45] = 0x0435, |
59 | [0x46] = 0x0444, |
60 | [0x47] = 0x0433, |
61 | [0x48] = 0x0445, |
62 | [0x49] = 0x0438, |
63 | [0x4a] = 0x0439, |
64 | [0x4b] = 0x043A, |
65 | [0x4c] = 0x043B, |
66 | [0x4d] = 0x043C, |
67 | [0x4e] = 0x043D, |
68 | [0x4f] = 0x043E, |
69 | [0x50] = 0x043F, |
70 | [0x51] = 0x044F, |
71 | [0x52] = 0x0440, |
72 | [0x53] = 0x0441, |
73 | [0x54] = 0x0442, |
74 | [0x55] = 0x0443, |
75 | [0x56] = 0x0436, |
76 | [0x57] = 0x0432, |
77 | [0x58] = 0x044C, |
78 | [0x59] = 0x044B, |
79 | [0x5a] = 0x0437, |
80 | [0x5b] = 0x0448, |
81 | [0x5c] = 0x044D, |
82 | [0x5d] = 0x0449, |
83 | [0x5e] = 0x0447, |
84 | [0x5f] = 0x044A, |
85 | [0x60] = 0x042E, |
86 | [0x61] = 0x0410, |
87 | [0x62] = 0x0411, |
88 | [0x63] = 0x0426, |
89 | [0x64] = 0x0414, |
90 | [0x65] = 0x0415, |
91 | [0x66] = 0x0424, |
92 | [0x67] = 0x0413, |
93 | [0x68] = 0x0425, |
94 | [0x69] = 0x0418, |
95 | [0x6a] = 0x0419, |
96 | [0x6b] = 0x041A, |
97 | [0x6c] = 0x041B, |
98 | [0x6d] = 0x041C, |
99 | [0x6e] = 0x041D, |
100 | [0x6f] = 0x041E, |
101 | [0x70] = 0x041F, |
102 | [0x71] = 0x042F, |
103 | [0x72] = 0x0420, |
104 | [0x73] = 0x0421, |
105 | [0x74] = 0x0422, |
106 | [0x75] = 0x0423, |
107 | [0x76] = 0x0416, |
108 | [0x77] = 0x0412, |
109 | [0x78] = 0x042C, |
110 | [0x79] = 0x042B, |
111 | [0x7a] = 0x0417, |
112 | [0x7b] = 0x0428, |
113 | [0x7c] = 0x042D, |
114 | [0x7d] = 0x0429, |
115 | [0x7e] = 0x0427, |
116 | [0x7f] = 0x007F, |
117 | }; |
118 | static const struct gap from_idx[] = { |
119 | { .start = 0x0000, .end = 0x0020, .idx = 0 }, |
120 | { .start = 0x007f, .end = 0x007f, .idx = -94 }, |
121 | { .start = 0x0394, .end = 0x0394, .idx = -882 }, |
122 | { .start = 0x039b, .end = 0x03a9, .idx = -888 }, |
123 | { .start = 0x03b1, .end = 0x03b4, .idx = -895 }, |
124 | { .start = 0x03bc, .end = 0x03c0, .idx = -902 }, |
125 | { .start = 0x03c9, .end = 0x03c9, .idx = -910 }, |
126 | { .start = 0x0410, .end = 0x044f, .idx = -980 }, |
127 | { .start = 0x207a, .end = 0x207b, .idx = -8190 }, |
128 | { .start = 0x2192, .end = 0x2192, .idx = -8468 }, |
129 | { .start = 0x221a, .end = 0x221a, .idx = -8603 }, |
130 | { .start = 0x222b, .end = 0x222b, .idx = -8619 }, |
131 | { .start = 0xffff, .end = 0xffff, .idx = 0 } |
132 | }; |
133 | static const char from_ucs4[] = { |
134 | |
135 | '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', |
136 | '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', |
137 | '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', |
138 | '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', |
139 | '\x20', '\x7f', '\x3a', '\x3b', '\x00', '\x00', '\x39', '\x00', |
140 | '\x00', '\x00', '\x00', '\x34', '\x00', '\x00', '\x00', '\x00', |
141 | '\x00', '\x3c', '\x30', '\x31', '\x32', '\x33', '\x35', '\x36', |
142 | '\x00', '\x00', '\x38', '\x37', '\x61', '\x62', '\x77', '\x67', |
143 | '\x64', '\x65', '\x76', '\x7a', '\x69', '\x6a', '\x6b', '\x6c', |
144 | '\x6d', '\x6e', '\x6f', '\x70', '\x72', '\x73', '\x74', '\x75', |
145 | '\x66', '\x68', '\x63', '\x7e', '\x7b', '\x7d', '\x3d', '\x79', |
146 | '\x78', '\x7c', '\x60', '\x71', '\x41', '\x42', '\x57', '\x47', |
147 | '\x44', '\x45', '\x56', '\x5a', '\x49', '\x4a', '\x4b', '\x4c', |
148 | '\x4d', '\x4e', '\x4f', '\x50', '\x52', '\x53', '\x54', '\x55', |
149 | '\x46', '\x48', '\x43', '\x5e', '\x5b', '\x5d', '\x5f', '\x59', |
150 | '\x58', '\x5c', '\x40', '\x51', '\x3f', '\x3e', '\x2e', '\x2c', |
151 | '\x2f', |
152 | }; |
153 | |