D11552: [WIP] Handle CJK characters

Christoph Feck noreply at phabricator.kde.org
Thu Mar 22 22:31:22 UTC 2018


cfeck requested changes to this revision.
cfeck added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> characterrangescjk.cpp:38
> +        if (i < length - 1 && c.isHighSurrogate() && text.at(i+1).isLowSurrogate()) {
> +            c = c.surrogateToUcs4(c, text.at(++i));
> +        }

You need to use uint to store the full character. QChar is *not* a character, it is just one UTF-16 codeword.

Additionally, use the QChar::name(uint) static methods to operate on uint characters.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D11552

To: michaelh, hein, cfeck
Cc: bruns, lbeltrame, #frameworks, alexeymin, cfeck, ashaposhnikov, michaelh, astippich, spoorun, nicolasfella, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180322/23d1fa17/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list