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 | [0x30] = 0x0030, |
35 | [0x31] = 0x0031, |
36 | [0x32] = 0x0032, |
37 | [0x33] = 0x0033, |
38 | [0x34] = 0x0034, |
39 | [0x35] = 0x0035, |
40 | [0x36] = 0x0036, |
41 | [0x37] = 0x0037, |
42 | [0x38] = 0x0038, |
43 | [0x39] = 0x0039, |
44 | [0x3a] = 0x2446, |
45 | [0x3b] = 0x2447, |
46 | [0x3c] = 0x2448, |
47 | [0x3d] = 0x2449, |
48 | [0x7f] = 0x007F, |
49 | }; |
50 | static const struct gap from_idx[] = { |
51 | { .start = 0x0000, .end = 0x0020, .idx = 0 }, |
52 | { .start = 0x0030, .end = 0x0039, .idx = -15 }, |
53 | { .start = 0x007f, .end = 0x007f, .idx = -84 }, |
54 | { .start = 0x2446, .end = 0x2449, .idx = -9242 }, |
55 | { .start = 0xffff, .end = 0xffff, .idx = 0 } |
56 | }; |
57 | static const char from_ucs4[] = { |
58 | |
59 | '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', |
60 | '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', |
61 | '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', |
62 | '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', |
63 | '\x20', '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', |
64 | '\x37', '\x38', '\x39', '\x7f', '\x3a', '\x3b', '\x3c', '\x3d', |
65 | }; |
66 | |