in reply to files saved in unicode are not being read correctly

If you want to use new feature of perl-5.8.0 and to read directly unicode data, you should tell to perl that your file is Unicode:
open(my $fh,'<:utf8', 'anything'); my $line_of_unicode = <$fh>; open(my $fh,'<:encoding(Big5)', 'anything'); my $line_of_unicode = <$fh>;
I got that code samples from perluniintro.pod, which is beautiful reading to start.

And yes, if you're not ready to move to perl-5.8.0 yet, then use Unicode::Map module to solve your task.

Courage, the Cowardly Dog.

Replies are listed 'Best First'.
Re: Re: files saved in unicode are not being read correctly
by Anonymous Monk on Jun 30, 2002 at 14:12 UTC

    I am using perl 5.6 release 631 from active state perl. where can I get active state perl 5.8? I searched google but 5.8 rc2 is available only on does that one have the Win32::Ole modules as well?

      In this case you better wait for a moment when 5.8.0 will be available, and ActiveState will prepare an "official" build for Win32 platform. Currently just use "Map::Unicode"!

      Courage, the Cowardly Dog.