mpolo has asked for the wisdom of the Perl Monks concerning the following question:
I have a program written a few years ago to run a "quiz show" under Perl using the Tk library for windowing. This year I hit the problem that one of my "contestants" has an Š in his name, which does not exist in ISO-8859-1.
If I convert the script to Unicode using iconv, I can add the character to the name, but Tk seems to see every thing as ISO-8859-1, so that the Unicode characters all become 2 character blocks. I like the angstrom symbol and all, but not when I'm trying to get an Š. Looking through the search on the site and in the Internet, it seems that this is an admitted problem with Perl-Tk, which the author is working on.
But this leaves me with a bit of a quandary, as I need the program this evening (I suppose I should have had more foresight...). Is there any "easy" solution to this? For instance, is there an alternative toolkit to which I can convert the program without spending hours learning a new system? Or a way to force Tk to play nice with the Unicode? Or... If all else fails, I'll strip the accent from the name, but that wouldn't be my preferred solution.
I am using perl 5.8.8-5 (FC5) with perl-Tk 804.027-9.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Unicode in Tk
by zentara (Cardinal) on Oct 21, 2006 at 13:10 UTC | |
by mpolo (Chaplain) on Oct 21, 2006 at 13:58 UTC | |
by vkon (Curate) on Oct 22, 2006 at 21:26 UTC |