commit 5a192d28f05e52b2cc061a97a94c0d3ee6e62754 Author: Kornel Benko <kor...@lyx.org> Date: Tue Dec 29 09:52:39 2020 +0100
FindAdv: fix converting unicode-point to utf-8 I misinterpreted the unicode creation 'u8"\uF00xx"'. The C++-compiler saw 'u8"\uF00x" "x"', but this was not intended. The routine which mimicked is doing the right job now. --- src/lyxfind.cpp | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 4ba14ee..c71a5a6 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -1320,12 +1320,6 @@ static string getutf8(unsigned uchar) unsigned char rest = 0x40; unsigned char first = 0x80; int start = maxc-1; - if (uchar >= (1 << 11)) { - // needed at least 3 bytes - c[4] = (uchar & 0x0f) | 0x30; - uchar >>= 4; - start = maxc-2; - } for (int i = start; i >=0; --i) { if (uchar < rest) { c[i] = first + uchar; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs