]> git.lyx.org Git - features.git/commit
QString only uses UTF-16, not UCS-4
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 2 Nov 2016 16:42:56 +0000 (17:42 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 4 Nov 2016 16:56:02 +0000 (17:56 +0100)
commitea3cdb15529d013bcac231c5b1f25628f5067b42
tree171074abf78f33647a5d56d9e7b359669843115a
parent6ab1f79b7c6ac306c3901ef570fe2077e6b49206
QString only uses UTF-16, not UCS-4

This means that, when a string contains high-plane Unicode characters,
the length of a docstring and the corresponding QString will be
different: Qt will encode these characters using several 16bit
characters.

We have additionally to take into account QTBUG-25536, which implies
that sometimes qstring_to_ucs4(toqstr(s)) !=s. It is not clear whether
this bug can be a problem in other places.

Fixes bug #10443.
(cherry picked from commit 5d85a42bf0a182585b800a80817a6e1208ef7ec3)
src/frontends/qt4/GuiFontMetrics.cpp
status.22x