3 This file is part of libmspstrings
4 Copyright © 2006-2007 Mikko Rasa
5 Distributed under the LGPL
15 void JisX0201::Encoder::encode_char(UnicodeChar ch, string &buf)
17 if(ch>=0 && ch<=0x7F && ch!=0x5C && ch!=0x7E)
23 else if(ch>=0xFF61 && ch<=0xFF9F)
26 error(ch, buf, "Can't express character in JIS X 0201");
29 void JisX0201::Encoder::transliterate(UnicodeChar, string &buf)
35 UnicodeChar JisX0201::Decoder::decode_char(const string &str, string::const_iterator &i)
38 return error("No input");
40 unsigned char ch = *i;
48 else if(ch>=0xA1 && ch<=0xDF)
51 result = error("Undefined JIS X 0201 character");