| 1 |
pcg |
1.1 |
// |
| 2 |
|
|
// AUTOMATICALLLY GENERATED by gentables |
| 3 |
|
|
// |
| 4 |
|
|
#ifdef ENCODING_EU |
| 5 |
|
|
|
| 6 |
|
|
static const uint8_t iso8859_2_f_0[] = { |
| 7 |
|
|
0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0xa7, 0xa8, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, |
| 8 |
|
|
0xb0, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 9 |
|
|
0x00, 0xc1, 0xc2, 0x00, 0xc4, 0x00, 0x00, 0xc7, 0x00, 0xc9, 0x00, 0xcb, 0x00, 0xcd, 0xce, 0x00, |
| 10 |
|
|
0x00, 0x00, 0x00, 0xd3, 0xd4, 0x00, 0xd6, 0xd7, 0x00, 0x00, 0xda, 0x00, 0xdc, 0xdd, 0x00, 0xdf, |
| 11 |
|
|
0x00, 0xe1, 0xe2, 0x00, 0xe4, 0x00, 0x00, 0xe7, 0x00, 0xe9, 0x00, 0xeb, 0x00, 0xed, 0xee, 0x00, |
| 12 |
|
|
0x00, 0x00, 0x00, 0xf3, 0xf4, 0x00, 0xf6, 0xf7, 0x00, 0x00, 0xfa, 0x00, 0xfc, 0xfd |
| 13 |
|
|
}; |
| 14 |
|
|
static const uint8_t iso8859_2_f_256[] = { |
| 15 |
|
|
0xc3, 0xe3, 0xa1, 0xb1, 0xc6, 0xe6, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xe8, 0xcf, 0xef, 0xd0, 0xf0, |
| 16 |
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0xea, 0xcc, 0xec, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 17 |
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 18 |
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5, 0xe5, 0x00, 0x00, 0xa5, 0xb5, 0x00, 0x00, 0xa3, |
| 19 |
|
|
0xb3, 0xd1, 0xf1, 0x00, 0x00, 0xd2, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd5, 0xf5, |
| 20 |
|
|
0x00, 0x00, 0xc0, 0xe0, 0x00, 0x00, 0xd8, 0xf8, 0xa6, 0xb6, 0x00, 0x00, 0xaa, 0xba, 0xa9, 0xb9, |
| 21 |
|
|
0xde, 0xfe, 0xab, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd9, 0xf9, 0xdb, 0xfb, |
| 22 |
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0xbc, 0xaf, 0xbf, 0xae, 0xbe |
| 23 |
|
|
}; |
| 24 |
|
|
|
| 25 |
root |
1.4 |
static uint32_t cs_iso8859_2_from_unicode (unicode_t unicode) { |
| 26 |
pcg |
1.1 |
if (unicode <= 0x009f) return unicode; |
| 27 |
|
|
if (unicode == 0x02c7) return 0x00b7; |
| 28 |
|
|
if (unicode == 0x02d8) return 0x00a2; |
| 29 |
|
|
if (unicode == 0x02d9) return 0x00ff; |
| 30 |
|
|
if (unicode == 0x02db) return 0x00b2; |
| 31 |
|
|
if (unicode == 0x02dd) return 0x00bd; |
| 32 |
|
|
if (0x00a0 <= unicode && unicode <= 0x00fd) |
| 33 |
|
|
return iso8859_2_f_0[unicode - 0x00a0] == 0 ? NOCHAR : iso8859_2_f_0[unicode - 0x00a0]; |
| 34 |
|
|
if (0x0102 <= unicode && unicode <= 0x017e) |
| 35 |
|
|
return iso8859_2_f_256[unicode - 0x0102] == 0 ? NOCHAR : iso8859_2_f_256[unicode - 0x0102]; |
| 36 |
|
|
return NOCHAR; |
| 37 |
root |
1.4 |
} |
| 38 |
pcg |
1.1 |
|
| 39 |
|
|
#else |
| 40 |
|
|
|
| 41 |
root |
1.4 |
#define cs_iso8859_2_from_unicode cs_unknown_from_unicode |
| 42 |
|
|
#define cs_iso8859_2_to_unicode cs_unknown_to_unicode |
| 43 |
pcg |
1.1 |
|
| 44 |
|
|
#endif |