in reply to Using Unicode in Tk

This is just a guess, which I got to work, on my machine anyways. I'm still in the woods with all these encoding problems. It's further compounded by the fact that my provincial editor, still shows the Š as an Angstrom. But this Tk script shows the letter properly for me in the label. I had to open it in yudit ( a unicode editor ) to copy-and-paste it in.
#!/usr/bin/perl use warnings; use strict; use utf8; use Tk; #$Tk::encodeFallback=1; my $main = tkinit(); my $text = 'contestant has an Š' ; $main->Label(-text =>$text )->pack(); MainLoop;

I'm not really a human, but I play one on earth. Cogito ergo sum a bum

Replies are listed 'Best First'.
Re^2: Using Unicode in Tk
by mpolo (Chaplain) on Oct 21, 2006 at 13:58 UTC

    Thank you. I was missing the use utf8;. All is well with my program now.

    I suppose that means all the comments about Tk not working with Unicode that I found are outdated. Nice to know.

      You're right, Tk became Unicode-capable starting from 804.xxx versions, so now its just works.

      Few years ago there was a gap, however, when Unicode appeared in Perl and Tcl/Tk, but not in perl/Tk, now the situation improved,