PDA

View Full Version : Unicode character 0x1F512 in QChar?



Ginsengelf
24th October 2016, 08:56
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

anda_skoa
24th October 2016, 09:31
Not sure about QChar, but maybe with QString::fromUcs4()?

Cheers,
_

Ginsengelf
25th October 2016, 07:01
Thanks, but the same result: just an empty square (under Windows. I'll check Linux the next time I boot it).

Ginsengelf

anda_skoa
25th October 2016, 09:11
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,
_

Ginsengelf
25th October 2016, 11:04
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