X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstringcodec%2Fiso88591.cpp;h=a21b6f15d6601e04be4cbeb7100218a5308cc90b;hp=cdb5f484a2f7532d1987828971dc37336c69f83e;hb=242a4a9abe1e1113b5eb39aa751aa054f696d7be;hpb=02794ef3620d0d9cc3b8f1c0d8f2995c825fdf4f diff --git a/source/stringcodec/iso88591.cpp b/source/stringcodec/iso88591.cpp index cdb5f48..a21b6f1 100644 --- a/source/stringcodec/iso88591.cpp +++ b/source/stringcodec/iso88591.cpp @@ -8,7 +8,7 @@ namespace StringCodec { void Iso88591::Encoder::encode_char(unichar ch, string &buf) { if(ch<0 || ch>0xFF) - return error(ch, buf, "Can't express character in ISO-8859-1"); + return error(ch, buf, invalid_character(ch, "ISO-8859-1")); buf += ch; } @@ -22,7 +22,7 @@ void Iso88591::Encoder::transliterate(unichar, string &buf) unichar Iso88591::Decoder::decode_char(const string &str, string::const_iterator &i) { if(i==str.end()) - return error("No input"); + return -1; return static_cast(*i++); }