X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstringcodec%2Futf8.h;h=fcf23eff35e55e0a03532f9e9b541ea2ac4a6414;hp=cb4924aeeed36b0960668e08f315c70bbc86663e;hb=d3fc0bf0f20f100f2831188c1ce21461d21c2c7a;hpb=94ee3a1040f67d9de2e92fc34049642b08d65b3e diff --git a/source/stringcodec/utf8.h b/source/stringcodec/utf8.h index cb4924a..fcf23ef 100644 --- a/source/stringcodec/utf8.h +++ b/source/stringcodec/utf8.h @@ -6,7 +6,7 @@ namespace Msp { namespace StringCodec { -class Utf8: public Codec +class Utf8: public StandardCodec { public: class Encoder: public Codec::Encoder @@ -27,10 +27,9 @@ public: virtual unichar decode_char(const std::string &, std::string::const_iterator &); }; - virtual const char *get_name() const { return "UTF-8"; } + Utf8(ErrorMode em = THROW_ON_ERROR): 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