diff options
author | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2022-05-02 16:05:26 +0200 |
---|---|---|
committer | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2022-05-24 23:07:41 +0200 |
commit | 92d340ed1cce7ccbdaecb08e3c4ab775dc8df3e3 (patch) | |
tree | 739ac4c0f67ca1ed41957a95cf2781e987bf82f6 /src | |
parent | d1d75f3b72b2d4e8f4a75b552023b1ea6381fccc (diff) |
QUnicodeTools: Fix handling of ZWJ for line breaks
Adjust implementation of rule LB8a of UAX #14. The rule was changed
in version 41 (corresponding to Unicode 11.0.0):
ZWJ × (ID | EB | EM) ⇒ ZWJ ×
Fixing this rule fixes 9 line break tests. Those are re-enabled.
Task-number: QTBUG-97537
Pick-to: 6.2 6.3
Change-Id: I1570719590a46ae28c98ed7d5053e72b12915db7
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/text/qunicodetools.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/text/qunicodetools.cpp b/src/corelib/text/qunicodetools.cpp index 15588491c7..9a7791ea32 100644 --- a/src/corelib/text/qunicodetools.cpp +++ b/src/corelib/text/qunicodetools.cpp @@ -666,9 +666,8 @@ static void getLineBreaks(const char16_t *string, qsizetype len, QCharAttributes } if (Q_UNLIKELY(lcls == QUnicodeTables::LineBreak_ZWJ)) { - // LB8a: ZWJ x (ID | EB | EM) - if (ncls == QUnicodeTables::LineBreak_ID || ncls == QUnicodeTables::LineBreak_EB || ncls == QUnicodeTables::LineBreak_EM) - goto next; + // LB8a: ZWJ x + goto next; } // LB25: do not break lines inside numbers |