From bc66f3a464f0801b19dddad186d68e7f4121bb2e Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Thu, 29 Oct 2020 13:44:04 +0800 Subject: [PATCH 1/3] Update css_parser.cpp --- nel/src/gui/css_parser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nel/src/gui/css_parser.cpp b/nel/src/gui/css_parser.cpp index ebc8d8d34..6967cd567 100644 --- a/nel/src/gui/css_parser.cpp +++ b/nel/src/gui/css_parser.cpp @@ -667,7 +667,8 @@ namespace NLGUI else if (_Style[_Position] == 0x00) { // Unicode replacement character - _Style[_Position] = 0xFFFD; + // _Style[_Position] = 0xFFFD; + _Style.replace(_Position, 1, "\xE\xB\xBD"); } else { From 850b8e0158d1d28f1e940f1dd1817a9fbfde6d39 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Thu, 29 Oct 2020 13:44:38 +0800 Subject: [PATCH 2/3] Update css_parser.cpp --- nel/src/gui/css_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nel/src/gui/css_parser.cpp b/nel/src/gui/css_parser.cpp index 6967cd567..f3003b195 100644 --- a/nel/src/gui/css_parser.cpp +++ b/nel/src/gui/css_parser.cpp @@ -668,7 +668,7 @@ namespace NLGUI { // Unicode replacement character // _Style[_Position] = 0xFFFD; - _Style.replace(_Position, 1, "\xE\xB\xBD"); + _Style.replace(_Position, 1, "\xEF\xBF\xBD"); } else { From 396f0d808e90e2d77f9bdf032e66feaad1840425 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Thu, 29 Oct 2020 14:06:23 +0800 Subject: [PATCH 3/3] Update unix_event_emitter.cpp --- nel/src/3d/driver/opengl/unix_event_emitter.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nel/src/3d/driver/opengl/unix_event_emitter.cpp b/nel/src/3d/driver/opengl/unix_event_emitter.cpp index 2945b90e7..fcb00b20e 100644 --- a/nel/src/3d/driver/opengl/unix_event_emitter.cpp +++ b/nel/src/3d/driver/opengl/unix_event_emitter.cpp @@ -699,22 +699,21 @@ bool CUnixEventEmitter::processMessage (XEvent &event, CEventServer *server) if (XGetWindowProperty(_dpy, _win, XA_NEL_SEL, 0, XMaxRequestSize(_dpy), False, AnyPropertyType, &actualType, &actualFormat, &nitems, &bytesLeft, (unsigned char**)&data) != Success) return false; - ucstring text; - std::string tmpData = (const char*)data; + std::string text = (const char*)data; XFree(data); // convert buffer to ucstring if (target == XA_UTF8_STRING) { - text = ucstring::makeFromUtf8(tmpData); + // OK } else if (target == XA_STRING) { - text = tmpData; + // FIXME: Convert local to UTF-8 } else { - nlwarning("Unknow format %u", (uint)target); + nlwarning("Unknown format %u", (uint)target); } // sent string event to event server