in reply to Re^3: Perl TK character disappearingue
in thread Perl TK character disappearing

Well, you don't get utf from perlmonks, you get latin-1 or some such, and œ comes back as hex 9C

If you add use utf8; at the bottom of the program it won't display right :) you have to add it to the top

Replies are listed 'Best First'.
Re^5: Perl TK character disappearingue
by zentara (Cardinal) on Jun 27, 2012 at 17:44 UTC
    That explains the weirdness I saw, but how would you suggest the OP solve the original problem? Also, do you mean that "use utf8" must be listed first in the "use" list?

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

      That explains the weirdness I saw, but how would you suggest the OP solve the original problem?

      How I did it :)

      wget -O junk ?abspart=1;displaytype=displaycode;node_id=978515;part=1

      iconv -f windows-1252 -t UTF-8 < junk > pm978515.pl

      Then add  use utf8; at the top of the file pm978515.pl

      Also, do you mean that "use utf8" must be listed first in the "use" list?

      If you add "use utf8;" after  $middlebox->insert('end',"This is a test of the œ character"); it won't work, the string won't be displayed properly because it won't be marked/decoded as utf