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. [Resolved] Fonts not rendering for characters with accents and east asian languages
Forum Updated to NodeBB v4.3 + New Features

[Resolved] Fonts not rendering for characters with accents and east asian languages

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.6k 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
    ronM71
    wrote on last edited by
    #1

    I am adding the names of the langauges into a listview.

    @ui->CurrentLanguageList->addItem("English");
    ui->CurrentLanguageList->addItem("Deutsch");
    ui->CurrentLanguageList->addItem("Español");
    ui->CurrentLanguageList->addItem("Français");
    ui->CurrentLanguageList->addItem("Italiano");
    ui->CurrentLanguageList->addItem("日本語");
    ui->CurrentLanguageList->addItem("한국어");@

    however, I am getting gibberish at runtime on anything with a special character (all asian, N of espanol, C of francais, etc) and it takes 5 seconds for the screen to render, when those characters are involved. My listview font is Lucida Grande, 12. Should I use a different font? isn't QT supposed to be handling this for me?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      My guess would be that the encoding of your file can not handle the characters.

      You might also have a problem with the implicit conversion from the text string into unicode. I always use QString::fromUtf8("some string") in situations like this to make sure I will get the right encoding (which must match the encoding the source file is in!).

      1 Reply Last reply
      0
      • R Offline
        R Offline
        ronM71
        wrote on last edited by
        #3

        QString::fromUtf8 did the trick. much thanks.

        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