Hi,
I am trying to display UTF-8 text in a richtext field using the following
code:
my $font = Wx::Font->new( $font_size, wxFONTFAMILY_SWISS,
wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_NORMAL, 0, "Verdana", wxFONTENCODING_UTF8 );
But when I run the program, it appears a nice window with the following
message:
Wx::SimpleApp: unknown encoding
No font for displaying text in encoding 'Unicode 8 bit (UTF-8)' found.
Would you like to select a font to be used for this encoding (otherwise the
text in this encoding will not be shown correctly)?
Yes No
And if I press the button Yes, I can choose one of the fonts I have
installed. I've seen that some of them have the name "Unicode" in their
names, for example "Arial Unicode MS" so I replaced the font name "Verdana"
in the code above with "Arial Unicode MS".
But no luck. If I run the program again, the same message appears.
I am running Perl 14.2 under Windows XP Pro with WxPerl 0.9904.
Until now I used the constant wxFONTENCODING_SYSTEM and the program worked
fine without appearing that window that promps for the font, but of course,
the UTF-8 chars were displaying as squares.
Please tell me what I am doing wrong.
Thanks.
--Octavian