6 namespace StringCodec {
8 void JisX0201::Encoder::encode_char(unichar ch, string &buf)
10 if(ch>=0 && ch<=0x7F && ch!=0x5C && ch!=0x7E)
16 else if(ch>=0xFF61 && ch<=0xFF9F)
19 error(ch, buf, invalid_character(ch, "JIS X 0201"));
22 void JisX0201::Encoder::transliterate(unichar, string &buf)
28 unichar JisX0201::Decoder::decode_char(const string &str, string::const_iterator &i)
33 unsigned char ch = *i;
41 else if(ch>=0xA1 && ch<=0xDF)
44 result = error(invalid_sequence(i, i+1, "undefined JIS X 0201 character"));
50 } // namespace StringCodec