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 | [0x3a] = 0x03B1, |
35 | [0x3b] = 0x03B2, |
36 | [0x3c] = 0x03B3, |
37 | [0x3d] = 0x03B4, |
38 | [0x3e] = 0x039E, |
39 | [0x5e] = 0x2192, |
40 | [0x5f] = 0x222B, |
41 | [0x60] = 0x2070, |
42 | [0x61] = 0x00B9, |
43 | [0x62] = 0x00B2, |
44 | [0x63] = 0x00B3, |
45 | [0x64] = 0x2074, |
46 | [0x65] = 0x2075, |
47 | [0x66] = 0x2076, |
48 | [0x67] = 0x2077, |
49 | [0x68] = 0x2078, |
50 | [0x69] = 0x2079, |
51 | [0x6a] = 0x207A, |
52 | [0x6b] = 0x207B, |
53 | [0x6c] = 0x30EB, |
54 | [0x6d] = 0x0394, |
55 | [0x6e] = 0x039B, |
56 | [0x6f] = 0x03A9, |
57 | [0x70] = 0x2080, |
58 | [0x71] = 0x2081, |
59 | [0x72] = 0x2082, |
60 | [0x73] = 0x2083, |
61 | [0x74] = 0x2084, |
62 | [0x75] = 0x2085, |
63 | [0x76] = 0x2086, |
64 | [0x77] = 0x2087, |
65 | [0x78] = 0x2088, |
66 | [0x79] = 0x2089, |
67 | [0x7a] = 0x03A3, |
68 | [0x7b] = 0x03BC, |
69 | [0x7c] = 0x03BD, |
70 | [0x7d] = 0x03C9, |
71 | [0x7e] = 0x03C0, |
72 | [0x7f] = 0x007F, |
73 | }; |
74 | static const struct gap from_idx[] = { |
75 | { .start = 0x0000, .end = 0x0020, .idx = 0 }, |
76 | { .start = 0x007f, .end = 0x007f, .idx = -94 }, |
77 | { .start = 0x00b2, .end = 0x00b9, .idx = -144 }, |
78 | { .start = 0x0394, .end = 0x0394, .idx = -874 }, |
79 | { .start = 0x039b, .end = 0x03a9, .idx = -880 }, |
80 | { .start = 0x03b1, .end = 0x03b4, .idx = -887 }, |
81 | { .start = 0x03bc, .end = 0x03c0, .idx = -894 }, |
82 | { .start = 0x03c9, .end = 0x03c9, .idx = -902 }, |
83 | { .start = 0x2070, .end = 0x2089, .idx = -8236 }, |
84 | { .start = 0x2192, .end = 0x2192, .idx = -8500 }, |
85 | { .start = 0x222b, .end = 0x222b, .idx = -8652 }, |
86 | { .start = 0x30eb, .end = 0x30eb, .idx = -12427 }, |
87 | { .start = 0xffff, .end = 0xffff, .idx = 0 } |
88 | }; |
89 | static const char from_ucs4[] = { |
90 | |
91 | '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', |
92 | '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', |
93 | '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', |
94 | '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', |
95 | '\x20', '\x7f', '\x62', '\x63', '\x00', '\x00', '\x00', '\x00', |
96 | '\x00', '\x61', '\x6d', '\x6e', '\x00', '\x00', '\x3e', '\x00', |
97 | '\x00', '\x00', '\x00', '\x7a', '\x00', '\x00', '\x00', '\x00', |
98 | '\x00', '\x6f', '\x3a', '\x3b', '\x3c', '\x3d', '\x7b', '\x7c', |
99 | '\x00', '\x00', '\x7e', '\x7d', '\x60', '\x00', '\x00', '\x00', |
100 | '\x64', '\x65', '\x66', '\x67', '\x68', '\x69', '\x6a', '\x6b', |
101 | '\x00', '\x00', '\x00', '\x00', '\x70', '\x71', '\x72', '\x73', |
102 | '\x74', '\x75', '\x76', '\x77', '\x78', '\x79', '\x5e', '\x5f', |
103 | '\x6c', |
104 | }; |
105 | |