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

QTextDocument cannot handle bidirectional control characters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.2.1
    • Labels:
      None
    • Environment:
      Arch Linux 64bit 3.12.6
      Gnome 3.10.1
      Qt 5.2.0
      Using GtkStyle
    • Commits:
      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

            Assignee:
            Unassigned Unassigned
            Reporter:
            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