1 | static const uint32_t iso88597_to_ucs4[96] = { |
2 | [0xa0 - 0xA0] = 0x00A0, |
3 | [0xa1 - 0xA0] = 0x2018, |
4 | [0xa2 - 0xA0] = 0x2019, |
5 | [0xa3 - 0xA0] = 0x00A3, |
6 | [0xa4 - 0xA0] = 0x20AC, |
7 | [0xa5 - 0xA0] = 0x20AF, |
8 | [0xa6 - 0xA0] = 0x00A6, |
9 | [0xa7 - 0xA0] = 0x00A7, |
10 | [0xa8 - 0xA0] = 0x00A8, |
11 | [0xa9 - 0xA0] = 0x00A9, |
12 | [0xaa - 0xA0] = 0x037A, |
13 | [0xab - 0xA0] = 0x00AB, |
14 | [0xac - 0xA0] = 0x00AC, |
15 | [0xad - 0xA0] = 0x00AD, |
16 | [0xaf - 0xA0] = 0x2015, |
17 | [0xb0 - 0xA0] = 0x00B0, |
18 | [0xb1 - 0xA0] = 0x00B1, |
19 | [0xb2 - 0xA0] = 0x00B2, |
20 | [0xb3 - 0xA0] = 0x00B3, |
21 | [0xb4 - 0xA0] = 0x0384, |
22 | [0xb5 - 0xA0] = 0x0385, |
23 | [0xb6 - 0xA0] = 0x0386, |
24 | [0xb7 - 0xA0] = 0x00B7, |
25 | [0xb8 - 0xA0] = 0x0388, |
26 | [0xb9 - 0xA0] = 0x0389, |
27 | [0xba - 0xA0] = 0x038A, |
28 | [0xbb - 0xA0] = 0x00BB, |
29 | [0xbc - 0xA0] = 0x038C, |
30 | [0xbd - 0xA0] = 0x00BD, |
31 | [0xbe - 0xA0] = 0x038E, |
32 | [0xbf - 0xA0] = 0x038F, |
33 | [0xc0 - 0xA0] = 0x0390, |
34 | [0xc1 - 0xA0] = 0x0391, |
35 | [0xc2 - 0xA0] = 0x0392, |
36 | [0xc3 - 0xA0] = 0x0393, |
37 | [0xc4 - 0xA0] = 0x0394, |
38 | [0xc5 - 0xA0] = 0x0395, |
39 | [0xc6 - 0xA0] = 0x0396, |
40 | [0xc7 - 0xA0] = 0x0397, |
41 | [0xc8 - 0xA0] = 0x0398, |
42 | [0xc9 - 0xA0] = 0x0399, |
43 | [0xca - 0xA0] = 0x039A, |
44 | [0xcb - 0xA0] = 0x039B, |
45 | [0xcc - 0xA0] = 0x039C, |
46 | [0xcd - 0xA0] = 0x039D, |
47 | [0xce - 0xA0] = 0x039E, |
48 | [0xcf - 0xA0] = 0x039F, |
49 | [0xd0 - 0xA0] = 0x03A0, |
50 | [0xd1 - 0xA0] = 0x03A1, |
51 | [0xd3 - 0xA0] = 0x03A3, |
52 | [0xd4 - 0xA0] = 0x03A4, |
53 | [0xd5 - 0xA0] = 0x03A5, |
54 | [0xd6 - 0xA0] = 0x03A6, |
55 | [0xd7 - 0xA0] = 0x03A7, |
56 | [0xd8 - 0xA0] = 0x03A8, |
57 | [0xd9 - 0xA0] = 0x03A9, |
58 | [0xda - 0xA0] = 0x03AA, |
59 | [0xdb - 0xA0] = 0x03AB, |
60 | [0xdc - 0xA0] = 0x03AC, |
61 | [0xdd - 0xA0] = 0x03AD, |
62 | [0xde - 0xA0] = 0x03AE, |
63 | [0xdf - 0xA0] = 0x03AF, |
64 | [0xe0 - 0xA0] = 0x03B0, |
65 | [0xe1 - 0xA0] = 0x03B1, |
66 | [0xe2 - 0xA0] = 0x03B2, |
67 | [0xe3 - 0xA0] = 0x03B3, |
68 | [0xe4 - 0xA0] = 0x03B4, |
69 | [0xe5 - 0xA0] = 0x03B5, |
70 | [0xe6 - 0xA0] = 0x03B6, |
71 | [0xe7 - 0xA0] = 0x03B7, |
72 | [0xe8 - 0xA0] = 0x03B8, |
73 | [0xe9 - 0xA0] = 0x03B9, |
74 | [0xea - 0xA0] = 0x03BA, |
75 | [0xeb - 0xA0] = 0x03BB, |
76 | [0xec - 0xA0] = 0x03BC, |
77 | [0xed - 0xA0] = 0x03BD, |
78 | [0xee - 0xA0] = 0x03BE, |
79 | [0xef - 0xA0] = 0x03BF, |
80 | [0xf0 - 0xA0] = 0x03C0, |
81 | [0xf1 - 0xA0] = 0x03C1, |
82 | [0xf2 - 0xA0] = 0x03C2, |
83 | [0xf3 - 0xA0] = 0x03C3, |
84 | [0xf4 - 0xA0] = 0x03C4, |
85 | [0xf5 - 0xA0] = 0x03C5, |
86 | [0xf6 - 0xA0] = 0x03C6, |
87 | [0xf7 - 0xA0] = 0x03C7, |
88 | [0xf8 - 0xA0] = 0x03C8, |
89 | [0xf9 - 0xA0] = 0x03C9, |
90 | [0xfa - 0xA0] = 0x03CA, |
91 | [0xfb - 0xA0] = 0x03CB, |
92 | [0xfc - 0xA0] = 0x03CC, |
93 | [0xfd - 0xA0] = 0x03CD, |
94 | [0xfe - 0xA0] = 0x03CE, |
95 | }; |
96 | static const struct gap from_idx[] = { |
97 | { .start = 0x00a0, .end = 0x00bd, .idx = 0 }, |
98 | { .start = 0x037a, .end = 0x037a, .idx = -700 }, |
99 | { .start = 0x0384, .end = 0x03ce, .idx = -709 }, |
100 | { .start = 0x2015, .end = 0x2019, .idx = -7947 }, |
101 | { .start = 0x20ac, .end = 0x20af, .idx = -8093 }, |
102 | { .start = 0xffff, .end = 0xffff, .idx = 0 } |
103 | }; |
104 | static const char iso88597_from_ucs4[] = { |
105 | |
106 | '\xa0', '\x00', '\x00', '\xa3', '\x00', '\x00', '\xa6', '\xa7', |
107 | '\xa8', '\xa9', '\x00', '\xab', '\xac', '\xad', '\x00', '\x00', |
108 | '\xb0', '\xb1', '\xb2', '\xb3', '\x00', '\x00', '\x00', '\xb7', |
109 | '\x00', '\x00', '\x00', '\xbb', '\x00', '\xbd', '\xaa', '\xb4', |
110 | '\xb5', '\xb6', '\x00', '\xb8', '\xb9', '\xba', '\x00', '\xbc', |
111 | '\x00', '\xbe', '\xbf', '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', |
112 | '\xc5', '\xc6', '\xc7', '\xc8', '\xc9', '\xca', '\xcb', '\xcc', |
113 | '\xcd', '\xce', '\xcf', '\xd0', '\xd1', '\x00', '\xd3', '\xd4', |
114 | '\xd5', '\xd6', '\xd7', '\xd8', '\xd9', '\xda', '\xdb', '\xdc', |
115 | '\xdd', '\xde', '\xdf', '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', |
116 | '\xe5', '\xe6', '\xe7', '\xe8', '\xe9', '\xea', '\xeb', '\xec', |
117 | '\xed', '\xee', '\xef', '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', |
118 | '\xf5', '\xf6', '\xf7', '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', |
119 | '\xfd', '\xfe', '\xaf', '\x00', '\x00', '\xa1', '\xa2', '\xa4', |
120 | '\x00', '\x00', '\xa5', |
121 | }; |
122 | |