1 #ifndef MSP_STRINGS_JISX0208_H_
2 #define MSP_STRINGS_JISX0208_H_
10 Codec for the JIS X 0208 encoding. This is not particularly useful as a
11 stand-alone codec, due to lack of a linefeed character among other things,
12 but is included as part of some other encodings.
14 class JisX0208: public Codec
17 class Encoder: public Codec::Encoder
20 Encoder(ErrorMode em = THROW_ON_ERROR): Codec::Encoder(em) { }
22 virtual void encode_char(UnicodeChar, std::string &);
24 virtual void transliterate(UnicodeChar, std::string &);
27 class Decoder: public Codec::Decoder
30 Decoder(ErrorMode em = THROW_ON_ERROR): Codec::Decoder(em) { }
32 virtual UnicodeChar decode_char(const std::string &, std::string::const_iterator &);
35 virtual const char *get_name() const { return "JIS X 0208"; }
37 virtual Encoder *create_encoder(ErrorMode em = THROW_ON_ERROR) const { return new Encoder(em); }
38 virtual Decoder *create_decoder(ErrorMode em = THROW_ON_ERROR) const { return new Decoder(em); }
47 Kuten(): ku(0), ten(0) { }
49 operator bool() { return ku!=0 && ten!=0; }
52 extern UnicodeChar jisx0208_to_ucs(Kuten);
53 extern Kuten ucs_to_jisx0208(UnicodeChar);