diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2012-05-04 19:51:00 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-11 16:51:56 +0200 |
commit | fb6c3e4f31dd0943d8751c986f7112dccd604211 (patch) | |
tree | 718ebcde9c93f9be330ecbcb7a50525c920c75f9 /tests/auto/qchar/tst_qchar.cpp | |
parent | 65a46b9f0b130cb3e509d7e4c06ab662b2fb54ec (diff) | |
download | qt4-tools-fb6c3e4f31dd0943d8751c986f7112dccd604211.tar.gz |
fix composition (C/KC) of some sequences
an unassigned code point should be treated like a starter code point;
thus, if we have met an unassigned code point in the currently processed
sequence, we should start process the next one (but we know there are
no composed character for an unassigned starter -> simply skip it)
This patch doesn't apply to qtbase, commit 46b78113b22428e6f8540193fcf0e00591dbd724
solved the same issue in a different way.
Change-Id: I781a26024878d8b83a182b0fd4e681be2a6d9a27
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/qchar/tst_qchar.cpp')
-rw-r--r-- | tests/auto/qchar/tst_qchar.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qchar/tst_qchar.cpp b/tests/auto/qchar/tst_qchar.cpp index 2f41d744a5..c6df716bdd 100644 --- a/tests/auto/qchar/tst_qchar.cpp +++ b/tests/auto/qchar/tst_qchar.cpp @@ -638,6 +638,18 @@ void tst_QChar::normalization() void tst_QChar::normalization_manual() { { + QString decomposed; + decomposed += QChar(0x41); + decomposed += QChar(0x0221); // assigned in 4.0 + decomposed += QChar(0x300); + + QVERIFY(decomposed.normalized(QString::NormalizationForm_C, QChar::Unicode_3_2) == decomposed); + + decomposed[1] = QChar(0x037f); // unassigned in 6.1 + + QVERIFY(decomposed.normalized(QString::NormalizationForm_C) == decomposed); + } + { QString composed; composed += QChar(0xc0); QString decomposed; |