From 80b82c506c747a32d551545abcd5be9dff8a9a03 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 11 Apr 2015 18:27:25 +0000 Subject: *** empty log message *** --- src/table/iso8859_8.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/table/iso8859_8.h (limited to 'src/table/iso8859_8.h') diff --git a/src/table/iso8859_8.h b/src/table/iso8859_8.h new file mode 100644 index 0000000..6afcdc0 --- /dev/null +++ b/src/table/iso8859_8.h @@ -0,0 +1,31 @@ +// +// AUTOMATICALLLY GENERATED by gentables +// +#ifdef ENCODING_EU + +static const uint8_t iso8859_8_f_0[] = { + 0xa0, 0x00, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0x00, 0xbb, 0xbc, 0xbd, 0xbe, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xba +}; + +static uint32_t cs_iso8859_8_from_unicode (unicode_t unicode) { + if (unicode <= 0x009f) return unicode; + if (unicode >= 0x05d0 && 0x05ea >= unicode) return unicode - 0x04f0; + if (unicode == 0x200e) return 0x00fd; + if (unicode == 0x200f) return 0x00fe; + if (unicode == 0x2017) return 0x00df; + if (0x00a0 <= unicode && unicode <= 0x00f7) + return iso8859_8_f_0[unicode - 0x00a0] == 0 ? NOCHAR : iso8859_8_f_0[unicode - 0x00a0]; + return NOCHAR; +} + +#else + +#define cs_iso8859_8_from_unicode cs_unknown_from_unicode +#define cs_iso8859_8_to_unicode cs_unknown_to_unicode + +#endif -- cgit v1.2.3