]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
FindAdv: fix converting unicode-point to utf-8
[lyx.git] / src / lyxfind.cpp
index 4ba14ee0888055ea3bac56cb4e1b7dcee9c55021..c71a5a6aa1a13b28625909e50541113ee9e66c78 100644 (file)
@@ -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;