in reply to Re^4: Chinese font problem in Perl/Tk
in thread Chinese fonts problem in Perl/Tk

now I gained access to linux machine, tried your script but unfortunately my perlTk is 800, so no luck.

BUT I extracted unicode text, made it Tcl and now you can see all fonts are okay (at least on mandrake10), where I did not did any font setup.

See screenshot at http://vkonovalov.ru/tcltk-misc/a,tcl.jpg

here is Tk code:

pack [text .t] .t insert end " No Operator (61) \u5F85\u64CD\u4F5C\u54E1 Power Down (63) \u96FB\u6E90\u4E2D\u65B7 Contactor Repair (124) \u4FEE\u593E\u8173 Change Cleaning Disk (125) \u66F4\u63DB\u786C\u789F Change Loadboard (127) \u66F4\u63DB\u6E2C\u8A66\u677F Change LN2 (128) \u66F4\u63DB\u6DB2\u614B\u6C2E"
I don't remember though, did I or not installed Chinese support from rpmdrake...

Best regards,
Courage, the Cowardly Dog

Replies are listed 'Best First'.
Re^6: Chinese font problem in Perl/Tk
by shockers (Acolyte) on Jan 07, 2005 at 19:50 UTC
    Did you tried my example that I give in parallel post?? Do you receive same screenshot as mine? (to run, you need save my code as file, run 'wish' on it, and you should see mine screenshot)

    I saved the sample code to tksample.tk and simply ran "wish tksample.tk".

    On Solaris 8, this didn't work for me. It displayed the 6 lines between the quotes verbatim without any translation. Did I overlook something?

    Regarding the widget demos that had the Unicode text demo, they were run on each OS using the respective Activeperl 5.8.4 for each OS. There shouldn't be any Solaris/Linux incompatibility problems running widget.
      Please check those are double quites and not single quotes. BTW did that program created 'text' widget? And it filled it with \uBLABAL stuff?

      Also which version of Tcl/tk are you running (those with 'wish' executable)

      Okay, now I'll download Activestate's latest perl for Linux, so will see what your program will look like...

      Best regards,
      Courage, the Cowardly Dog

        I've not done tcl/tk at all. They were double-quotes and not single-quotes (just did a copy/paste). I didn't see any widgets. How would I see what version (if any) of Tcl/tk I have? Any demos (like perl's widget) bundled with Tcl/tk to try out?
        Hmm ... that's both encouraging and disheartening.

        Encouraging that this may be a localized (phantom?) problem.

        Disheartening in that my application's going on a couple thousand Redhat Linux and Solaris boxes in different locales and I'd hate to have to tell the SA's they've got a problem.

        Still, I can't believe only the Solaris 2.6, Solaris 8, and Linux boxes I'm working on have the same problem.

        Guess I can try ActivePerl 5.8.6 instead of 5.8.4.

        Thanks for checking, Courage.
        No-go with ActivePerl 5.8.6 on Redhat Linux, Solaris 8, nor Solaris 2.6 for me.

        Same as with 5.8.4, some characters displayed codes instead of the character.

        "uname -srv" for Redhat Linux: Linux 2.4.18-24.7.x_3.5G #1 Mon Jul 26 13:49:55 CDT 2004
        "uname -srv" for Solaris 8: SunOS 5.8 Generic_108528-14
        "uname -srv" for Solaris 6: SunOS 5.6 Generic_105181-33