X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstringcodec%2Fiso88591.cpp;h=9adc2d9e09bf7423d650b78c66409a0e8c9bbbcf;hb=3e3868860d4f4ca1bbe55fbf271c804307cea3c9;hp=a5f3c55bb402a57348372644911f27cf50e7ae42;hpb=967785734be5c3fc6f75da122c2d93ebbb338271;p=libs%2Fcore.git diff --git a/source/stringcodec/iso88591.cpp b/source/stringcodec/iso88591.cpp index a5f3c55..9adc2d9 100644 --- a/source/stringcodec/iso88591.cpp +++ b/source/stringcodec/iso88591.cpp @@ -3,9 +3,9 @@ using namespace std; namespace Msp { -namespace Codecs { +namespace StringCodec { -void Iso88591::Encoder::encode_char(UnicodeChar ch, string &buf) +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"); @@ -13,19 +13,19 @@ void Iso88591::Encoder::encode_char(UnicodeChar ch, string &buf) buf += ch; } -void Iso88591::Encoder::transliterate(UnicodeChar, string &buf) +void Iso88591::Encoder::transliterate(unichar, string &buf) { buf += '?'; } -UnicodeChar Iso88591::Decoder::decode_char(const string &str, string::const_iterator &i) +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++); } -} // namespace Codecs +} // namespace StringCodec } // namespace Msp