Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem with accents on QT desktop application. QT5 on Windows (Visual Studio 11)
Forum Updated to NodeBB v4.3 + New Features

Problem with accents on QT desktop application. QT5 on Windows (Visual Studio 11)

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    retf
    wrote on last edited by
    #1

    Hi All,

    My desktop QT app do not render accents correctly! For instance, if I use: 'é', it show an '?' in place.

    QT5 on Windows (Visual Studio 11)

    Anyone can help!

    E 1 Reply Last reply
    0
    • R retf

      Hi All,

      My desktop QT app do not render accents correctly! For instance, if I use: 'é', it show an '?' in place.

      QT5 on Windows (Visual Studio 11)

      Anyone can help!

      E Offline
      E Offline
      eos pengwern
      wrote on last edited by
      #2

      @retf Are you currently just entering the special characters at the keyboard? You may get better results if you look up the codes to represent the symbols as QChars, and enter them instead.

      For example, I recently needed to display a label for a length quantity measured in microns. Cutting and pasting the 'mu' symbol from Windows Character Map into my Visual Studio source code looked just fine, but when I compiled and ran the code the 'mu' came up as a '?'. Instead, I changed my code to:

      tr("Thickness (%1m)").arg(QChar(0xB5))

      ...and this gave me exactly what I wanted.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Huulivoide
        wrote on last edited by
        #3

        This could be an encoding problem. Make sure you are using utf-8 as the file encoding for your source files.

        1 Reply Last reply
        0
        • Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          Assuming your talking about display of characters, not input as stated in a previous reply, please check that you're doing proper translations with Qt Linguist, and that the generated XML (.ts) files have the proper encoding for the accented characters (UTF-8 for instance). I work usually with Spanish translations and I have no issues dealing with á, é, í and so on.

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved