Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.10.0 Alpha, 5.15.3, 6.0.0
-
Samsung S7, Android 7
Description
Example:
const QString str1 = QStringLiteral("String A"); const QString str2 = QStringLiteral("String A"); const QString str3 = QStringLiteral("string A"); const QString str4 = QStringLiteral("string B"); const QString str5 = QStringLiteral("String B"); qDebug() << "1 vs. 2: " << str1.localeAwareCompare(str2); // 0, result: 0 qDebug() << "1 vs. 3: " << str1.localeAwareCompare(str3); // -1, result: -1 qDebug() << "3 vs. 4: " << str3.localeAwareCompare(str4); // -1, result: -1 qDebug() << "3 vs. 5: " << str3.localeAwareCompare(str5); // -1, result: 1 !!!
I cannot reproduce the problem on other platforms than Android. The problem happens with different locales (I tested English, German).
Attachments
Issue Links
- depends on
-
COIN-727 Android test VMs lack locales
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-63518 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
339055,15 | WIP: try using wcscoll() rather than strcoll() for locale-aware compare | dev | qt/qtbase | Status: NEW | -2 | 0 |
308904,2 | Be clearer about the locale-aware comparison QString supports | dev | qt/qtbase | Status: MERGED | +2 | 0 |
309050,2 | Be clearer about the locale-aware comparison QString supports | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
309079,2 | Don't second-guess strcoll() | dev | qt/qtbase | Status: MERGED | +2 | 0 |