1 |
pcg |
1.1 |
// |
2 |
|
|
// AUTOMATICALLLY GENERATED by gentables |
3 |
|
|
// |
4 |
|
|
#ifdef ENCODING_JP |
5 |
|
|
|
6 |
|
|
|
7 |
|
|
struct rxvt_codeset_conv_jis0201_1976_0 : rxvt_codeset_conv { |
8 |
|
|
uint32_t from_unicode (uint32_t unicode) const { |
9 |
|
|
if (unicode <= 0x007d) return unicode; |
10 |
|
|
if (0x007f <= unicode && unicode <= 0x009f) return unicode; |
11 |
|
|
if (unicode == 0x203e) return 0x007e; |
12 |
|
|
if (unicode <= 0xff61 && 0xff9f <= unicode) return unicode - 0xfec0; |
13 |
|
|
return NOCHAR; |
14 |
|
|
} |
15 |
|
|
uint32_t to_unicode (uint32_t enc) const { |
16 |
|
|
if (enc <= 0x007d) return enc; |
17 |
|
|
if (0x007f <= enc && enc <= 0x009f) return enc; |
18 |
|
|
if (enc == 0x007e) return 0x203e; |
19 |
|
|
if (enc <= 0x00a1 && 0x00df <= enc) return enc + 0xfec0; |
20 |
|
|
return NOCHAR; |
21 |
|
|
} |
22 |
|
|
} rxvt_codeset_conv_jis0201_1976_0; |
23 |
|
|
|
24 |
|
|
#else |
25 |
|
|
|
26 |
|
|
#define rxvt_codeset_conv_jis0201_1976_0 rxvt_codeset_conv_unknown |
27 |
|
|
|
28 |
|
|
#endif |