Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
the arabic letters in $text2 and $text3 are displayed correctly in arabic, while $text1 is displayed as unicode numbers and not arabic letters ie the label of the main menu is displayed as:#!/usr/bin/perl use warnings; use strict; use Tk; use utf8; use encoding 'cp1256'; use Encode qw(encode decode); my $mw = tkinit; my $menubar = $mw->Menu(-type => 'menubar'); $mw->configure(-menu => $menubar); my $text1 = encode( 'utf8','ملف'); #arabic word for file my $text2 = encode( 'utf8','فتح'); # arabic word for open my $text3 = encode( 'utf8','تسجيل'); # arabic word for save my $menu = $menubar->cascade(-label => $text1); $menu->command(-label => $text2); $menu->command(-label => $text3); MainLoop; __END__
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl/TK unicode font problem
by zentara (Cardinal) on Apr 05, 2008 at 15:09 UTC | |
|
Re: Perl/TK unicode font problem
by thundergnat (Deacon) on Apr 05, 2008 at 15:47 UTC | |
by Anonymous Monk on Apr 06, 2008 at 03:06 UTC | |
|
Re: Perl/TK unicode font problem
by Anonymous Monk on Apr 05, 2008 at 13:26 UTC | |
by Anonymous Monk on Apr 05, 2008 at 15:34 UTC | |
by swampyankee (Parson) on Apr 05, 2008 at 15:42 UTC |