1 #ifndef MSP_STRINGS_JISX0208_H_
2 #define MSP_STRINGS_JISX0208_H_
8 class JisX0208: public StringCodec
11 class Encoder: public StringCodec::Encoder
14 Encoder(ErrorMode em=THROW_ON_ERROR): StringCodec::Encoder(em) { }
15 void encode_char(wchar_t);
17 void append_replacement() { append("!)"); }
20 class Decoder: public StringCodec::Decoder
23 Decoder(ErrorMode em=THROW_ON_ERROR): StringCodec::Decoder(em), high(0) { }
24 void decode_char(const std::string &, std::string::const_iterator &);
31 Encoder *create_encoder(ErrorMode em=THROW_ON_ERROR) const { return new Encoder(em); }
32 Decoder *create_decoder(ErrorMode em=THROW_ON_ERROR) const { return new Decoder(em); }
35 extern wchar_t jisx0208_to_ucs(unsigned short);
36 extern unsigned short ucs_to_jisx0208(wchar_t);