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

qsTr() breaks unicode characters

    XMLWordPrintable

Details

    • 27e77b7ceeeffe9227b5b96fdd63e3433e0eb63e

    Description

      Using unicode characters such as Unicode Character 'SUBSCRIPT TWO' (U+2082) works in QML, but wrapping the string in qsTr() breaks the display of the text.

      Example :
      text: "H\u2082O" //works
      text: qsTr("H\u2082O") //does not work

      As a workaround it is possible to set the textFormat to be rich text, and then specify the character in HTML encoding :

      textFormat: Text.RichText
      text: qsTr("H₂O") //works

      Attachments

        Issue Links

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

          Activity

            People

              kenthans Kent Hansen (Inactive)
              dettman Dean Dettman (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes