X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstringcodec%2Futf8.h;h=94c627ec5a0ca0f905eac01ea4a4de4ef35fb934;hp=cb4924aeeed36b0960668e08f315c70bbc86663e;hb=242a4a9abe1e1113b5eb39aa751aa054f696d7be;hpb=02794ef3620d0d9cc3b8f1c0d8f2995c825fdf4f diff --git a/source/stringcodec/utf8.h b/source/stringcodec/utf8.h index cb4924a..94c627e 100644 --- a/source/stringcodec/utf8.h +++ b/source/stringcodec/utf8.h @@ -6,13 +6,13 @@ namespace Msp { namespace StringCodec { -class Utf8: public Codec +class Utf8: public StandardCodec { public: class Encoder: public Codec::Encoder { public: - Encoder(ErrorMode em = THROW_ON_ERROR): Codec::Encoder(em) { } + Encoder(ErrorMode em = DEFAULT): Codec::Encoder(em) { } virtual void encode_char(unichar, std::string &); private: @@ -22,15 +22,14 @@ public: class Decoder: public Codec::Decoder { public: - Decoder(ErrorMode em = THROW_ON_ERROR): Codec::Decoder(em) { } + Decoder(ErrorMode em = DEFAULT): Codec::Decoder(em) { } virtual unichar decode_char(const std::string &, std::string::const_iterator &); }; - virtual const char *get_name() const { return "UTF-8"; } + Utf8(ErrorMode em = DEFAULT): StandardCodec(em) { } - virtual Encoder *create_encoder(ErrorMode em = THROW_ON_ERROR) const { return new Encoder(em); } - virtual Decoder *create_decoder(ErrorMode em = THROW_ON_ERROR) const { return new Decoder(em); } + virtual const char *get_name() const { return "UTF-8"; } }; } // namespace StringCodec