… | |
… | |
35 | 0x8b, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, |
35 | 0x8b, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, |
36 | 0x8f, 0x90, 0x91, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
36 | 0x8f, 0x90, 0x91, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
37 | 0x94 |
37 | 0x94 |
38 | }; |
38 | }; |
39 | |
39 | |
40 | struct rxvt_codeset_conv_koi8_u : rxvt_codeset_conv { |
|
|
41 | uint32_t from_unicode (unicode_t unicode) const { |
40 | static uint32_t cs_koi8_u_from_unicode (unicode_t unicode) { |
42 | if (unicode <= 0x007f) return unicode; |
41 | if (unicode <= 0x007f) return unicode; |
43 | if (unicode == 0x2022) return 0x0095; |
42 | if (unicode == 0x2022) return 0x0095; |
44 | if (unicode == 0x221a) return 0x0096; |
43 | if (unicode == 0x221a) return 0x0096; |
45 | if (unicode == 0x2248) return 0x0097; |
44 | if (unicode == 0x2248) return 0x0097; |
46 | if (unicode == 0x2264) return 0x0098; |
45 | if (unicode == 0x2264) return 0x0098; |
… | |
… | |
52 | if (0x0401 <= unicode && unicode <= 0x0491) |
51 | if (0x0401 <= unicode && unicode <= 0x0491) |
53 | return koi8_u_f_1024[unicode - 0x0401] == 0 ? NOCHAR : koi8_u_f_1024[unicode - 0x0401]; |
52 | return koi8_u_f_1024[unicode - 0x0401] == 0 ? NOCHAR : koi8_u_f_1024[unicode - 0x0401]; |
54 | if (0x2500 <= unicode && unicode <= 0x25a0) |
53 | if (0x2500 <= unicode && unicode <= 0x25a0) |
55 | return koi8_u_f_9472[unicode - 0x2500] == 0 ? NOCHAR : koi8_u_f_9472[unicode - 0x2500]; |
54 | return koi8_u_f_9472[unicode - 0x2500] == 0 ? NOCHAR : koi8_u_f_9472[unicode - 0x2500]; |
56 | return NOCHAR; |
55 | return NOCHAR; |
57 | } |
56 | } |
58 | } rxvt_codeset_conv_koi8_u; |
|
|
59 | |
57 | |
60 | #else |
58 | #else |
61 | |
59 | |
62 | #define rxvt_codeset_conv_koi8_u rxvt_codeset_conv_unknown |
60 | #define cs_koi8_u_from_unicode cs_unknown_from_unicode |
|
|
61 | #define cs_koi8_u_to_unicode cs_unknown_to_unicode |
63 | |
62 | |
64 | #endif |
63 | #endif |