Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63518

QString::localeAwareCompare problem with case sensitivity on Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.10.0 Alpha, 5.15.3, 6.0.0
    • QPA
    • Samsung S7, Android 7
    • Android

    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

          Activity

            People

              mateusz_sobal Mateusz Sobal
              DanielSt Peter Staab
              Maurice Kalinowski Maurice Kalinowski
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: