Unicode in Windows vs Linux lazarus / 13-General ---------------------------------------------------------------------- jhmos · 2010-04-23 07:15 Hi All, I need to display a block character, U+258B, and can do so fine in Linux with:   Memo1.Lines[0]:= #$258B; Memo1 has Font.Charset:= Unicode;                 Font.Name:= 'Courier New'; However when I try this under Windows XP, I just get a '?' displayed. Supposedly (http://lazarus.freepascal.org/index.php/topic,8538.0.html) Unicode is fully supported. I am using 0.9.28.2 on both platforms. What am I doing wrong? John. ---------------------------------------------------------------------- Bart · 2010-04-23 10:37 Does this character exits in the "Courier New" font in Windows at all? Can you get it to dsiplay in say Notepad with said font? Bart ---------------------------------------------------------------------- jhmos · 2010-04-23 14:27 I see now that I was using the Unicode code directly rather than the UTF-8 representation of the code. Not sure why using Unicode 258B directly works on Linux, but if I use the UTF-8 encoding of E2 96 8B it will work on Windows XP, Windows 7 and Linux. As you say, also have to have a font that is consistent between all platforms (not Courier New unfortunately). I don't know all that much about font handling, I looked for relevant Forum topics and found some hints but a worse problem than Linux/Windows XP is that Windows 7 does not have some of the fonts that XP has, not on mine anyway. Ideally there would be a way of providing a font that could be installed with the application (a fixed pitch one in this case).  Is there any easy way of doing that, even if just for Windows platforms? ---------------------------------------------------------------------- Zoran · 2010-04-23 17:26 I'm not sure, but there might be a way to chose system's default monospace font (the font whose characters are fixed-width, like courier new). I think that I saw an example for this somewhere, but I cannot find it now. I beleive that can be done, as Lazarus itself probably uses this somehow, for it's code editor's default font. ---------------------------------------------------------------------- scept1c · 2010-04-26 09:34 I would like to extend my font category set too if that's possible (a patch maybe)