… | |
… | |
12 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xba |
12 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xba |
13 | }; |
13 | }; |
14 | |
14 | |
15 | static uint32_t cs_iso8859_8_from_unicode (unicode_t unicode) { |
15 | static uint32_t cs_iso8859_8_from_unicode (unicode_t unicode) { |
16 | if (unicode <= 0x009f) return unicode; |
16 | if (unicode <= 0x009f) return unicode; |
17 | if (unicode <= 0x05d0 && 0x05ea <= unicode) return unicode - 0x04f0; |
17 | if (unicode >= 0x05d0 && 0x05ea >= unicode) return unicode - 0x04f0; |
18 | if (unicode == 0x200e) return 0x00fd; |
18 | if (unicode == 0x200e) return 0x00fd; |
19 | if (unicode == 0x200f) return 0x00fe; |
19 | if (unicode == 0x200f) return 0x00fe; |
20 | if (unicode == 0x2017) return 0x00df; |
20 | if (unicode == 0x2017) return 0x00df; |
21 | if (0x00a0 <= unicode && unicode <= 0x00f7) |
21 | if (0x00a0 <= unicode && unicode <= 0x00f7) |
22 | return iso8859_8_f_0[unicode - 0x00a0] == 0 ? NOCHAR : iso8859_8_f_0[unicode - 0x00a0]; |
22 | return iso8859_8_f_0[unicode - 0x00a0] == 0 ? NOCHAR : iso8859_8_f_0[unicode - 0x00a0]; |