]> git.tdb.fi Git - libs/core.git/commitdiff
Fix unicode replacement character
authorMikko Rasa <tdb@tdb.fi>
Sun, 5 Jun 2011 19:52:42 +0000 (22:52 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 5 Jun 2011 19:52:42 +0000 (22:52 +0300)
source/stringcodec/codec.cpp
source/stringcodec/codec.h
source/stringcodec/utf8.cpp

index b7c600d74d6fbf0c70ccfd5fed9b766bd96a1c56..a342242402beaf65b8aafb4e9eee29b0af20550d 100644 (file)
@@ -83,7 +83,7 @@ unichar Codec::Decoder::error(const string &msg)
        switch(err_mode)
        {
        case TRANSLITERATE:
-               return 0xFFFE;
+               return 0xFFFD;
        case IGNORE_ERRORS:
                return -1;
        default:
index eec1e4bddb092a80a03574aa6207c30df53150ea..cb8006696e52c17042e304cc66efc1ef5d644815 100644 (file)
@@ -121,7 +121,7 @@ public:
                
                THROW_ON_ERROR: throws CodecError(msg)
                IGNORE_ERRORS: returns -1
-               TRANSLITERATE: return 0xFFFE */
+               TRANSLITERATE: return 0xFFFD */
                unichar error(const std::string &msg);
        };
 
index b0431eb4f49e3d595ddefd44e5dfca57e421d060..19fe488282561dafbe1d4b788ec3bee0b8cb1b18 100644 (file)
@@ -37,7 +37,7 @@ void Utf8::Encoder::encode_char(unichar ch, string &buf)
 
 void Utf8::Encoder::transliterate(unichar, string &buf)
 {
-       buf.append("\357\277\275", 3);  // � U+FFFE Replacement Character
+       buf.append("\357\277\275", 3);  // � U+FFFD Replacement Character
 }