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

QTextDocument cannot handle bidirectional control characters

    XMLWordPrintable

Details

    • qtbase: 753b472cb851bf12033b1e3ae663b4bdd056d1ef

    Description

      When wrapping a part of a text with a bidirectional control native mark, all Latin letters have a Ceasar shift of -2 (ROT-2).

      Following code snippet shows: "?@AVWX" instead of "ABC XYZ"

      
      QTextCursor cur = ...
      const QString nativeMark = QString::fromUtf8( "\xe2\x80\x8e" );
      cur.insertHtml("<b>"+ nativeMark + "ABC XYZ" + nativeMark + "</b>");
      

      It seems that if I mark the text and copy paste the string somewhere else, the correct string is pasted.

      Attachments

        1. main.cpp
          0.5 kB
        2. qtbug.pro
          0.3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            kretikus Roman HImmes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes