in reply to Tk Characters

...but if I change the sentence to Arabic characters , it shows some meaningless symbols

Could you post the code you've tried — it would allow us to see what might be going wrong.  And which Perl/Tk version are you using?

Also, have you come across Perl/TK unicode font problem, yet?

Replies are listed 'Best First'.
Re^2: Tk Characters
by Swalif (Scribe) on May 11, 2009 at 15:29 UTC
    The code is from the samples provided by Tk I just changed the sentence to an Arabic one , As for the version I just built it using strawberry on windows vista so i think it is the latest .. here is the code
    #!/usr/local/bin/perl -w # # Simple Tk script to create a button that prints "Hello, world". Cli +ck on # the button to terminate the program. # # The first line below imports the Tk objects into the application, th +e second # line creates the main window, the third through sixth lines create t +he button # and defines the code to execute when the button is pressed, the seve +nth line # asks the packer to shrink-wrap the application's main window around +the # button, and the eight line starts the event loop. use Tk; $MW = MainWindow->new; $hello = $MW->Button( -text => 'Hello, world', -command => sub {print STDOUT "Hello, world\n"; exit;}, ); $hello->pack; MainLoop;
    I will check the link you provided now .. thanks
      I just changed the sentence to an Arabic one

      ...but that's the interesting part :)

      In other words, the very way of specifying the Arabic text may be the reason it's not working.  For example, did you specify UTF-8 characters literally in the code (using a UTF-8 capable editor — in which case you'd need "use utf8;")?  Or did you use \x{....} escapes?  Did you use Unicode at all or some legacy encoding/code page?  Etc...

        Thank you sir, I don't know if it is now fully supported but I do have Arabic support for now,.. Thanks for your help