in reply to Re^2: pp module messes encoding
in thread pp module messes encoding

The following works fine for me in a utf8 savy console (Komodo output window actually):

use strict; use warnings; use utf8; my $str = 'עוד להיט'; binmode STDOUT, ":encoding(utf8)"; print $str;

It's important to note that whatever is rendering your script output must be capable of handling whatever unicode characters you throw at it. If this script doesn't work right in the context you are having trouble then the fault is not with Perl but with the context.

Update: Note that PerlMonks has munted the unicode characters :-(. The original script used Unicode characters for the string, not entities. The following also works and uses HTML entities in place of the unicode characters:

use strict; use warnings; use utf8; use HTML::Entities; my $str = 'עוד להיט'; binmode STDOUT, ":encoding(utf8)"; print HTML::Entities::decode ($str);
True laziness is hard work

Replies are listed 'Best First'.
Re^4: pp module messes encoding
by palkia (Monk) on May 14, 2011 at 18:28 UTC
    good idea thx.
    Tried both over my extracted text but none returned it to it's normal form.
    also tried decode_entities but still didn't help.
    also tried without the use utf8; and the binmode STDOUT, ":encoding(utf8)";
    but still same problem remains.
      but still same problem remains.

      What debugging steps have you taken?