]> git.tdb.fi Git - libs/core.git/blobdiff - source/stringcodec/windows1252.cpp
Add move semantics to Variant
[libs/core.git] / source / stringcodec / windows1252.cpp
index 72eb104115db192cce202802d479a4d0e592beff..a6bde2407bad5cdcb5fa3a2cb458b911b0ebd9b5 100644 (file)
@@ -31,7 +31,7 @@ void Windows1252::Encoder::encode_char(unichar ch, string &buf)
                                return;
                        }
 
-               error(ch, buf, "Can't express character in Windows-1252");
+               error(ch, buf, invalid_character(ch, "Windows-1252"));
        }
 }
 
@@ -52,7 +52,7 @@ unichar Windows1252::Decoder::decode_char(const string &str, string::const_itera
        {
                result = table[ch-0x80];
                if(result==0)
-                       result = error("Undefined Windows-1252 character");
+                       result = error(invalid_sequence(i, i+1, "undefined Windows-1252 character"));
        }
        else
                result = ch;