- void error(UnicodeChar, std::string &, const std::string &);
- virtual void transliterate(UnicodeChar, std::string &) { }
+
+ /**
+ Handles an error depending on the error mode.
+
+ For THROW_ON_ERROR, throws CodecError(msg).
+
+ For IGNORE_ERROR, does nothing.
+
+ For TRANSLITERATE, calls transliterate(ch, buf).
+ */
+ void error(UnicodeChar ch, std::string &buf, const std::string &msg);
+
+ /**
+ Attempts to produce an alternative encoding for a unicode character.
+ Typically this includes dropping accent marks or romanizing letters.
+ */
+ virtual void transliterate(UnicodeChar ch, std::string &buf) =0;