Results 1 to 5 of 5

Thread: Unicode character 0x1F512 in QChar?

  1. #1
    Join Date
    Jul 2008
    Posts
    409
    Thanks
    9
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Unicode character 0x1F512 in QChar?

    Hi, is it possible to use Unicode characters that are larger than 0xFFFF (=16bit) as a QChar? I tried this
    QChar (0x0001F512)
    and Windows 7 with Qt 4.7 only shows an empty rectangle. I also checked the Windows Character Map, but those tables always end with 0xFFFF as last character for a font. So I'm not sure if QChar is the limiting factor or if my Windows or its default font is not capable of showing this at all.

    Ginsengelf

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Unicode character 0x1F512 in QChar?

    Not sure about QChar, but maybe with QString::fromUcs4()?

    Cheers,
    _

  3. #3
    Join Date
    Jul 2008
    Posts
    409
    Thanks
    9
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Unicode character 0x1F512 in QChar?

    Thanks, but the same result: just an empty square (under Windows. I'll check Linux the next time I boot it).

    Ginsengelf

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Unicode character 0x1F512 in QChar?

    It could either be an string content problem or a font problem.

    If you can find the UTF-8 sequence of bytes for that character you could convert the string to UTF-8 and check if you have that sequence.
    If you do then the string itself is correct but the font is missing the character.

    Cheers,
    _

  5. #5
    Join Date
    Jul 2008
    Posts
    409
    Thanks
    9
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Unicode character 0x1F512 in QChar?

    I tried QString::fromUcs4() on my openSUSE and I got a nice lock So it is a Windows-only problem, maybe caused by the font that does not contain this lock glyph.
    Using QChar (0x0001F512) created the same empty rectangle as it did on Windows.

    Ginsengelf

Similar Threads

  1. Display on console unicode symbol from QChar
    By Scope in forum Qt Programming
    Replies: 0
    Last Post: 18th July 2016, 17:56
  2. Replies: 2
    Last Post: 13th November 2013, 08:03
  3. Replies: 6
    Last Post: 7th August 2009, 17:00
  4. Character by Character (Unicode?) File Reading
    By mclark in forum Qt Programming
    Replies: 4
    Last Post: 22nd April 2009, 15:28
  5. Unicode Character Problem
    By prakash in forum Qt Programming
    Replies: 1
    Last Post: 11th May 2006, 07:25

Tags for this Thread

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.