2

I use WxPerl and I would like to draw unicode or utf8 text.

Is that possible?

Currently, i have something like this: $dc->DrawText( $linestr, $x, $y * $th ); but it seems to draw ascii like text only.

I found out that yes

$this->{Font} = Wx::Font->new( 10, wxMODERN, wxNORMAL, wxNORMAL );
$this->{Font}-> SetDefaultEncoding(wxFONTENCODING_UTF8); # error for this line see later
$dc->SetFont($this->{Font});

Unfortunately, I get an error Usage: Wx::Font::SetDefaultEncoding(encoding) at ........

Aftershock
  • 5,205
  • 4
  • 51
  • 64

1 Answers1

0

I found it out.

$this->{Font}-> SetDefaultEncoding(wxFONTENCODING_UTF8); needs to be $this->{Font}-> SetEncoding(wxFONTENCODING_UTF8); The name of the function changed in some of the versions.

Aftershock
  • 5,205
  • 4
  • 51
  • 64