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

QString::localeAwareCompare() reports wrong result for more than 2Gi character long strings

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • None
    • None

      This code fails on 64-bit Windows platforms, and with ICU:

      const QString lhs(qsizetype(INT_MAX) + 1, u'A');
      const QString rhs = lhs + u'A';
      assert(QString::localeAwareCompare(lhs, rhs) < 0);
      

      The APIs we use don't support more than INT_MAX characters (CompareStringsEx, QCollator).

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Eddy Edward Welbourne
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes