From 63024751cc373859a7f4b22d59de74549ce9cec8 Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen Date: Sun, 4 Feb 2018 02:54:08 +0800 Subject: [PATCH] Add a comment for potential future breakage --- lib/Emulation.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Emulation.cpp b/lib/Emulation.cpp index 3fc963d..babf8b6 100644 --- a/lib/Emulation.cpp +++ b/lib/Emulation.cpp @@ -239,6 +239,11 @@ void Emulation::receiveData(const char* text, int length) bufferedUpdate(); + /* XXX: the following code involves encoding & decoding of "UTF-16 + * surrogate pairs", which does not work with characters higher than + * U+10FFFF + * https://unicodebook.readthedocs.io/unicode_encodings.html#surrogates + */ QString utf16Text = _decoder->toUnicode(text,length); std::wstring unicodeText = utf16Text.toStdWString();