[Israel.pm] unicode characters in your code
Shlomo Yona
shlomo at cs.haifa.ac.il
Sat Mar 13 11:17:28 PST 2004
On Sat, 13 Mar 2004, Mikhael Goikhman wrote:
> Do you mean that you want $str = "binary_data"; to be interpreted by Perl
> as utf8 string? I think (please someone correct me), Perl code itself is
> considered ascii, so this is not possible, you should either use \x{...}
> notation or read the unicode data from stdin/file using utf8 encoding.
Yes. That's my intention.
> Starting with 5.8.1, a new "perl -C" option is introduced that makes your
> stdin/stdout and other streams to be considered utf8. Read "man perlrun"
> in the recent perl versions. You may also use "use utf8;" or unicode
> locale for this.
>
> BTW, perl 5.8.0 has some known bugs with unicode locale that are fixed in
> 5.8.1. It is possible this does not affect you. Still, I think you should
> upgrade your perl if you want to use advanced unicode features.
Thanks.
I wasn't aware of that.
I cannot upgrade as Perl 5.8.0 is assumed elsewhere where
this code should run.
I might later on try and upgrade Perl on some other
development environment and see if things break and if I can
make it work on both versions.
Thanks.
--
Shlomo Yona
shlomo at cs.haifa.ac.il
http://cs.haifa.ac.il/~shlomo/
More information about the Perl
mailing list