Works for me, no problem -- I see a Chinese character. In fact, I distinctly remember that whenever I've installed Tk for perl 5.8, the "make test" phase spends a fair bit of time going through all the unicode characters (including the Chinese, Japanese and Korean).#!/usr/bin/perl -w use Tk; use strict; my ($mw, $test_string, $txt); $mw = MainWindow->new(-title => "UTF-8 Test", -width=>400, -height=>30 +0); $test_string = "This is a sample Chinese character: \x{6211}"; $txt = $mw->Text(-height=>5)->pack; $txt->insert('end', $test_string); MainLoop;
I don't think Tk can do Arabic (or any other right-to-left writing system), and I don't know how well it can do with Devanagari or similar Indic scripts, but all the left-to-right characters work fine.
So if this little test snippet isn't working for you, there might be a problem with your particular installation of the Tk bundle (or maybe it's a font issue?)
If this test snippet works, but you're still having trouble getting stuff from mysql to display correctly (even though you seem to be decoding it as you should, or have "utf8_enabled" in the DBI connection), then you may want to check other modes of access to the DB, to see if the actual content in your tables is not what you expect.
In reply to Re^2: Perl/Tk: utf8 in Text widget?
by graff
in thread Perl/Tk: utf8 in Text widget?
by Marais
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |