diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2012-04-26 19:36:34 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-04 15:24:52 +0200 |
commit | 72c5ca98e539daab86542e53ce8404776d03a63f (patch) | |
tree | 2720cd5e2c62a5abff0af5fc35b844ea9bdb7d6d /src/corelib/tools/qchar.cpp | |
parent | 46b78113b22428e6f8540193fcf0e00591dbd724 (diff) |
stop ignoring unassigned codepoints
in Unicode 5.1, it was clarified that unassigned codepoints normally
should not be excluded from the process; moreover, unassigned codepoints
assumed to be starters in decomposition by default
Change-Id: Ic4a61ec3759ee62b6843c81045e1d611d0684ead
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/tools/qchar.cpp')
-rw-r--r-- | src/corelib/tools/qchar.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp index 358653a412..33b2c0bc82 100644 --- a/src/corelib/tools/qchar.cpp +++ b/src/corelib/tools/qchar.cpp @@ -1419,8 +1419,7 @@ static void decomposeHelper(QString *str, bool canonical, QChar::UnicodeVersion } } - const QChar::UnicodeVersion v = QChar::unicodeVersion(ucs4); - if (v > version || v == QChar::Unicode_Unassigned) + if (QChar::unicodeVersion(ucs4) > version) continue; const unsigned short *d = decompositionHelper(ucs4, &length, &tag, buffer); @@ -1521,7 +1520,7 @@ static void composeHelper(QString *str, QChar::UnicodeVersion version, int from) } const QUnicodeTables::Properties *p = qGetProp(uc); - if (p->unicodeVersion > version || p->unicodeVersion == QChar::Unicode_Unassigned) { + if (p->unicodeVersion > version) { starter = -1; next = -1; // to prevent i == next lastCombining = 255; // to prevent combining > lastCombining @@ -1597,7 +1596,7 @@ static void canonicalOrderHelper(QString *str, QChar::UnicodeVersion version, in c2 = 0; { const QUnicodeTables::Properties *p = qGetProp(u2); - if (p->unicodeVersion <= version && p->unicodeVersion != QChar::Unicode_Unassigned) + if (p->unicodeVersion <= version) c2 = p->combiningClass; } if (c2 == 0) { @@ -1607,7 +1606,7 @@ static void canonicalOrderHelper(QString *str, QChar::UnicodeVersion version, in if (c1 == 0) { const QUnicodeTables::Properties *p = qGetProp(u1); - if (p->unicodeVersion <= version && p->unicodeVersion != QChar::Unicode_Unassigned) + if (p->unicodeVersion <= version) c1 = p->combiningClass; } |