diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-05 12:12:43 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-05 15:57:25 (GMT) |
commit | 4f02ca5c9458299185d447da87058d6e8ca1b260 (patch) | |
tree | 82450705b6a0e2c8e34bb58f5f903f9e5dd71119 /src | |
parent | ca33c72439ba92ca8bdeca4d172550602f01f0cc (diff) | |
download | Qt-4f02ca5c9458299185d447da87058d6e8ca1b260.zip Qt-4f02ca5c9458299185d447da87058d6e8ca1b260.tar.gz Qt-4f02ca5c9458299185d447da87058d6e8ca1b260.tar.bz2 |
Finish reverting the UTF-8 hack added in 80ea01c6 (P4 106704, Qt 3.2).
This code was removed from QString in 539cd1e5 (P4 259474, Qt 4.3), but
apparently lingered on the UTF-8 codec code.
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/codecs/qutfcodec.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp index 7655c51..742b2e7 100644 --- a/src/corelib/codecs/qutfcodec.cpp +++ b/src/corelib/codecs/qutfcodec.cpp @@ -107,15 +107,8 @@ QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::Conve *cursor++ = 0xc0 | ((uchar) (u >> 6)); } else { if (u > 0xffff) { - // see QString::fromUtf8() and QString::utf8() for explanations - if (u > 0x10fe00 && u < 0x10ff00) { - *cursor++ = (u - 0x10fe00); - ++ch; - continue; - } else { - *cursor++ = 0xf0 | ((uchar) (u >> 18)); - *cursor++ = 0x80 | (((uchar) (u >> 12)) & 0x3f); - } + *cursor++ = 0xf0 | ((uchar) (u >> 18)); + *cursor++ = 0x80 | (((uchar) (u >> 12)) & 0x3f); } else { *cursor++ = 0xe0 | (((uchar) (u >> 12)) & 0x3f); } |