Results 1 to 16 of 16

Thread: unable to have greek characters appear in a text Label

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2006
    Posts
    79
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: unable to have greek characters appear in a text Label

    says here UTF-8...
    but is that directly taken from the Os or KDe or smth?
    cause a while ago i was trying to make my linux recognise UTF-8 using the info on this link
    http://hektor.umcs.lublin.pl/~mikosm...x-unicode.html
    so i started by

    Qt Code:
    1. "export LC_ALL=en_US.UTF-8"
    To copy to clipboard, switch view to plain text mode 

    and then it says

    Applications started afterwards from the same terminal window should be aware of UTF-8. To check if that's the case, you could for example use the command wc. wc -c will tell you the number of bytes and wc -m the number of characters in a file or in data read from standard input (end typing with Enter and Ctrl-D). In a UTF-8 locale, if text contains non-ASCII characters, the number of bytes will be greater than the number of characters. For example:

    user@host:~$ wc -c
    Bär
    5
    user@host:~$ wc -m
    Bär
    4
    and when i do that test using a greek alpha as opposed to the a with umlaut that is used in the example, i always get 4 as a result.. not 5.. so i am not sure UTF-8 is there as
    running
    Qt Code:
    1. locale
    To copy to clipboard, switch view to plain text mode 
    in a console at my pc states:

    Qt Code:
    1. LANG=
    2. LC_CTYPE="en_US.UTF-8"
    3. LC_NUMERIC="en_US.UTF-8"
    4. LC_TIME="en_US.UTF-8"
    5. LC_COLLATE="en_US.UTF-8"
    6. LC_MONETARY="en_US.UTF-8"
    7. LC_MESSAGES="en_US.UTF-8"
    8. LC_PAPER="en_US.UTF-8"
    9. LC_NAME="en_US.UTF-8"
    10. LC_ADDRESS="en_US.UTF-8"
    11. LC_TELEPHONE="en_US.UTF-8"
    12. LC_MEASUREMENT="en_US.UTF-8"
    13. LC_IDENTIFICATION="en_US.UTF-8"
    14. LC_ALL=en_US.UTF-8
    To copy to clipboard, switch view to plain text mode 
    Last edited by nass; 31st August 2006 at 15:17.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: unable to have greek characters appear in a text Label

    Quote Originally Posted by nass
    says here UTF-8...
    OK, what encoding do you use for string literals in your sources?

  3. #3
    Join Date
    Jan 2020
    Posts
    3
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: unable to have greek characters appear in a text Label

    I had similar problem but not with Greek chars. I use "material design" font as my buttons icons. since it is a font, it is practically a set of chars. You should find each character code, they are something like 0xFFDD or 0x4C and create a QString like bellow

    QString(L'\uFFDD') for VS compiler and
    QString("\uFFDD") for mingw.

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.