Linux: Showing TAB character lazarus / 32-Linux ---------------------------------------------------------------------- tk · 2015-07-12 15:40 Hi all! After a long time I need a quick help, just want to show the TAB character as an arrow from Symbol font. Code is: Code: [Select] procedure TMainForm.FormPaint(Sender: TObject); const   cTabChar = #$AE; // right arrow but valid only for Symbol font! var   S, TabAsUTF8: string; begin   S := 'A'#9'B'#9'C';   TabAsUTF8 := UnicodeToUTF8(Cardinal(cTabChar));   Canvas.Font.Color := clBlack;   Canvas.Font.Name := 'Symbol';   S := StringReplace(S, #9, TabAsUTF8, [rfReplaceAll]);   Canvas.TextOut(10, 10, S); end; The above working on Win w/o problems but on Linux Kubuntu showing (R) character instead of the arrow. Symbol font is installed, I can normally see the arrow character in my KCharSelect utility (like character map on win). How to show that arrow on Linux? ---------------------------------------------------------------------- Bart · 2015-07-12 17:26 I would rather copy the symbol and paste it into some LCL control (so you get UTF8) and examine the contents of it, then store it as UTF-8 in source code. Bart ---------------------------------------------------------------------- Martin_fr · 2015-07-12 21:12 QuoteCode: [Select]  cTabChar = #$AE; // right arrow but valid only for Symbol font! Well #$AE is a REGISTERED SIGN (R in a circle). http://unicode- table.com/en/ or http://www.utf8-chartable.de/ Maybe try (not tested) Code: [Select]cTabChar = #194#187; // String, not char, because in utf8 you need several bytes That is the arrow used in SynEdit for tab (already in utf8, no need to call any convert method) ---------------------------------------------------------------------- tk · 2015-07-12 21:40 QuoteWell #$AE is a REGISTERED SIGN Yes this I know, but if you use Symbol font the characters draw differently. I not only need TAB character but I need to use Symbol font, because some other application tells me to use Symbol font and sends characters in that special "symbol" encoding. It is still UTF8/UTF16 but the characters must draw differently. This works fine on Windows but does not work on Linux (KDE). If you start Lazarus on Win, fresh form, put TEdit on it and select Symbol font for this TEdit. Then type some text to Text property and Latin characters will show as Greek characters in the edit (in object inspector still Latin). But on Linux they stay Latin everywhere, which seems to be a bug (either in Lazarus or in KDE). Edit: It seems the only solution would be to use remapping of the Symbol encoding to Unicode (see http://unicode.org/Public/MAPPINGS/VENDORS/ADOBE/symbol.txt). That should work on all OSes.