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

QString with 0xFEFF at first position

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.8.1
    • None

    Description

      ... failed to be handled properly by various QString APIs. Test cases:

      const char32_t testValue = 65279; // 0xFEFF ZERO WIDTH NO-BREAK SPACE
      QString str = QString::fromUcs4(&testValue, 1);
      qDebug() << "size: " << str.size(); // result: 0
      
      QString str2 = QString::fromUtf8("\uFEFF\u0041\uFEFF");
      qDebug() << "size2: " << str2.size(); // result: 2 ... why not 3?
      qDebug() << "str2: " << str2; // result: "A\uFEFF"
      

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            paeglis Gatis Paeglis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes