summaryrefslogtreecommitdiffstats
path: root/src/table/iso8859_8.h
blob: 6afcdc0f915f89641a56c9dc8da3d34fd5535f5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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