Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Linguist unicode problem

Qt Linguist unicode problem

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 3 Posters 701 Views 2 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.
  • M Offline
    M Offline
    maesti
    wrote on last edited by maesti
    #1

    Hello

    I am using Qt Linguist version 5.14.1.
    In my translation_configuration.pro this is set: CODECFORSRC = UTF-8

    When I generate the ts file with the lupdate command, characters like "ä" are converted to ä (when I view the ts file with notepad++).

    If I open the ts file with linguist, the characters are displayed in the tool as "ä" -> No problem so far.

    If I save the ts file in the linguist app and then look at the ts file with Notepad++, the "ä" is no longer saved as ä but as "ä" -> No problem so far.

    If I now update the ts file again with the lupdate command, the following happens:

    • if the message with the character "ä" has no translation yet (type=unfinished) it will be converted to ä again -> no problem
    • if the message has a translation, the ä is converted to ä and is now marked as "obsolete". Therefore, another message with ä is added as ä, but of course without translation -> my problem

    Any idea what i'm doing wrong?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Simply do not use non-ascii characters for your source files. Saves a lot of headaches, esp. with windows and the msvc compiler.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      M 1 Reply Last reply
      2
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        In my current project we're using UTF-8 in code everywhere, no problems with lupdate, lrelease and Linguist whatsoever. Maybe it's some bug with 5.14.x? Have you tried with other Qt versions?

        (Z(:^

        1 Reply Last reply
        0
        • Christian EhrlicherC Christian Ehrlicher

          Simply do not use non-ascii characters for your source files. Saves a lot of headaches, esp. with windows and the msvc compiler.

          M Offline
          M Offline
          maesti
          wrote on last edited by
          #4

          @Christian-Ehrlicher Thanks for the hint. I changend the default language from german to english, so i don't have any non-asci characters in the source. Non Asci in the translations files then is no problem.

          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