]> 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>
Thu, 3 Nov 2016 13:19:50 +0000 (14:19 +0100)
commit5d85a42bf0a182585b800a80817a6e1208ef7ec3
treee2a506921bfce67d03bf12c8e2b0070808f7adf0
parent8a9b376db708877da064f3d5a500e7401c53cce6
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.
src/frontends/qt4/GuiFontMetrics.cpp