1 #ifndef MSP_STRINGCODEC_ISO2022JP_H_
2 #define MSP_STRINGCODEC_ISO2022JP_H_
7 namespace StringCodec {
9 class Iso2022Jp: public StandardCodec<Iso2022Jp>
19 class Encoder: public Codec::Encoder
25 Encoder(ErrorMode em = THROW_ON_ERROR): Codec::Encoder(em), mode(ASCII) { }
27 virtual void encode_char(unichar, std::string &);
28 virtual void sync(std::string &);
31 void switch_mode(Mode, std::string &);
32 virtual void transliterate(unichar, std::string &);
35 class Decoder: public Codec::Decoder
42 Decoder(ErrorMode =THROW_ON_ERROR);
44 virtual unichar decode_char(const std::string &, std::string::const_iterator &);
47 void switch_mode(Mode);
50 Iso2022Jp(ErrorMode em = THROW_ON_ERROR): StandardCodec<Iso2022Jp>(em) { }
52 virtual const char *get_name() const { return "ISO-2022-JP"; }
55 } // namespace StringCodec