0

I am programming in Lazarus at school. I wrote one program for chess table, but I have problem with printing these two charcters ♂ and ♀. I tried this code

var s : string;
...
s := 'VKS' + SysToUTF8(#11#12) + 'SKVPPPPPPPPPPPPPPPPVKSKKSKV'; 

but it does not work, it only prints little square instead of each of these characters. I am using Win XP SP3. Any tips?

c0ntrol
  • 908
  • 2
  • 9
  • 14
  • Check that the font your interface uses actually includes these characters. (The tooltip when hovering your post from the main-page also shows the male and female symbols as square boxes - presumably as a result of the font used by tooltips in this browser (chrome on win7)) I'd try identifying a font I know to contain these characters, before then making sure that my dialog also uses the same font. – enhzflep Apr 10 '13 at 17:11
  • I tried Lucida Console, because that shows this char in console good, but nothing gets better. – c0ntrol Apr 10 '13 at 17:28
  • Ah! A question - where are you displaying the output? Is it in a window/dialog, or is it in the console? (I've assumed window/dialog thus far) There could well be a problem with the SysToUTF8 call if printed in the console. – enhzflep Apr 10 '13 at 17:36
  • It is printed in Image component with TextOut. – c0ntrol Apr 10 '13 at 17:54
  • Problem is in system, I have Windows XP SP3, on Windows 7 it works. – c0ntrol Apr 10 '13 at 18:16
  • It could simply be a problem with fonts. If this is the case, i.e XP machine's fonts are different, you could download and include a font in your program's resources section. Not so sure how to go about retrieving and using it from there in pascal, but if you can, google should tell you how pretty quickly. – enhzflep Apr 10 '13 at 18:22

0 Answers0