From c5cb2162baeeb7c750595e07ba1cbfcb03702f77 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 5 Jun 2011 22:52:42 +0300 Subject: [PATCH] Fix unicode replacement character --- source/stringcodec/codec.cpp | 2 +- source/stringcodec/codec.h | 2 +- source/stringcodec/utf8.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/stringcodec/codec.cpp b/source/stringcodec/codec.cpp index b7c600d..a342242 100644 --- a/source/stringcodec/codec.cpp +++ b/source/stringcodec/codec.cpp @@ -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: diff --git a/source/stringcodec/codec.h b/source/stringcodec/codec.h index eec1e4b..cb80066 100644 --- a/source/stringcodec/codec.h +++ b/source/stringcodec/codec.h @@ -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); }; diff --git a/source/stringcodec/utf8.cpp b/source/stringcodec/utf8.cpp index b0431eb..19fe488 100644 --- a/source/stringcodec/utf8.cpp +++ b/source/stringcodec/utf8.cpp @@ -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 } -- 2.43.0