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

QString::normalized does not work as expected on some characters

    XMLWordPrintable

Details

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

    Description

      // 03D2 0301;    03D2     # ϓ → ϒ    GREEK UPSILON WITH HOOK SYMBOL, COMBINING ACUTE ACCENT → GREEK UPSILON WITH HOOK SYMBOL
          //expected:ϒ, actual result is \u03a5  Υ
          QString a("\u03D2\u0301");//ϓ
          if(a.normalized(QString::NormalizationForm_KD).at(0).unicode()!=0x03D2){
              qDebug()<<"seems not correct";
          }
          //01B6;    007A      # ƶ → z    LATIN SMALL LETTER Z WITH STROKE → LATIN SMALL LETTER Z
          QString a1("\u01B6");
          if(a1.normalized(QString::NormalizationForm_KD).at(0).unicode()!=0x007A){
              qDebug()<<"seems not correct";
          }
      //    correct example
          //1E7D;    0076      # ṽ → v    LATIN SMALL LETTER V WITH TILDE → LATIN SMALL LETTER V
          QString a2("\u1E7D");
      //    qDebug()<<a2.normalized(QString::NormalizationForm_KD).at(0);
          if(a2.normalized(QString::NormalizationForm_KD).at(0).unicode()==0x0076){
              qDebug()<<"seems  correct";
          } 

       

      the QString::normalize method can not always return the correct values.

      see attachment

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              xiaoyifang yifang xiao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes