From 72c5ca98e539daab86542e53ce8404776d03a63f Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Thu, 26 Apr 2012 19:36:34 +0300 Subject: 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 Reviewed-by: Lars Knoll --- src/corelib/tools/qchar.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/corelib/tools/qchar.cpp') 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; } -- cgit v1.2.3