Dear friends, I am looking for a critical answer in a design issue. I want to use the Tkx subset to program a gui, but need to verify that Tkx will indeed display my foreign characters (Mongolian, Tibetan, Chinese). I can see the good utf8 characters being processed in output, but not as displayed in the listbox. Could you verify that this is true or false, bug or deficiency, maybe my lack of knowing the correct syntax? If you could tell me what I need to do in this code snippet to display the $v variable, then I will go ahead and press ahead. If you view the file with Arial Unicode MS or some other pan-Unicode font, you should be able to see the $v variable fine. Thank you so much, Greg Eck [EMAIL PROTECTED]
use Unicode::String qw(utf8 latin1 utf16be); use Tkx; use warnings;
my $mw = Tkx::widget->new("."); $mw->g_wm_title("GreySon"); $mw->g_wm_minsize(300,200); $u = utf8("hello1"); $v = utf8("жиÑÑÑ"); $w = utf8("hello3"); print "$u $v howdy ... \n"; my $message = "The $v hen lives in a chicken coop."; print $message ; my @colors = ($u, $v, $w); my $label = $mw->new_label(-textvariable => \$message); my $enter = $mw->new_label(-text => "Select correct word"); my $lb = $mw->new_listbox(-selectmode => "single"); $lb->insert("end", @colors); my $show = $mw->new_button(-text => "Show selection", -command => \&display); my $exit = $mw->new_button(-text => "Exit", -command => sub {exit}); $label->g_pack; $enter->g_pack; $lb->g_pack; $show->g_pack; $exit->g_pack; Tkx::MainLoop(); sub display { my @selections = $lb->curselection; $message = "You selected: "; foreach (@selections) {$message .= $lb->get($_);} }