[Israel.pm] Hebrew strings in perl

Ran Eilam ran.eilam at gmail.com
Wed Nov 28 04:44:00 PST 2012


> use utf8;
> print "דוב";
> why does this produce the following:
> Wide character in print at Desktop\test.pl line 2.

http://search.cpan.org/~dom/perl-5.12.5/pod/perldiag.pod#Wide_character_in_%s

use utf8;
binmode STDOUT, ':encoding(UTF-8)';
print "דוב";

will work, or you could run perl with "-CS" command line switch.

Ran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.perl.org.il/pipermail/perl/attachments/20121128/acecd7a1/attachment.htm 


More information about the Perl mailing list