1 //
2 // AUTOMATICALLLY GENERATED by gentables
3 //
4 #ifdef ENCODING_EU
5 
6 static const uint8_t iso8859_11_f_3584[] = {
7   0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0,
8   0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0,
9   0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0,
10   0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xe0,
11   0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0,
12   0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb
13 };
14 static const uint16_t iso8859_11_t_0[] = {
15   0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, 0x0e08, 0x0e09, 0x0e0a, 0x0e0b,
16   0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, 0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17,
17   0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, 0x0e20, 0x0e21, 0x0e22, 0x0e23,
18   0x0e24, 0x0e25, 0x0e26, 0x0e27, 0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f,
19   0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, 0x0e38, 0x0e39, 0x0e3a, 0x0000,
20   0x0000, 0x0000, 0x0000, 0x0e3f, 0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47,
21   0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f, 0x0e50, 0x0e51, 0x0e52, 0x0e53,
22   0x0e54, 0x0e55, 0x0e56, 0x0e57, 0x0e58, 0x0e59, 0x0e5a, 0x0e5b
23 };
24 
cs_iso8859_11_from_unicode(unicode_t unicode)25 static uint32_t cs_iso8859_11_from_unicode (unicode_t unicode) {
26     if (unicode <= 0x009f) return unicode;
27     if (unicode == 0x00a0) return 0x00a0;
28     if (0x0e01 <= unicode && unicode <= 0x0e5b)
29       return iso8859_11_f_3584[unicode - 0x0e01] == 0 ? NOCHAR : iso8859_11_f_3584[unicode - 0x0e01];
30     return NOCHAR;
31 }
32 #if ENCODING_TO_UNICODE
cs_iso8859_11_to_unicode(uint32_t enc)33 static unicode_t cs_iso8859_11_to_unicode (uint32_t enc) {
34     if (enc <= 0x009f) return enc;
35     if (0x00a0 <= enc && enc <= 0x00fb)
36       return iso8859_11_t_0[enc - 0x00a0] == 0 ? NOCHAR : iso8859_11_t_0[enc - 0x00a0];
37     return NOCHAR;
38 }
39 #endif
40 
41 #else
42 
43 #define cs_iso8859_11_from_unicode cs_unknown_from_unicode
44 #define cs_iso8859_11_to_unicode   cs_unknown_to_unicode
45 
46 #endif
47