perl-unicode

Should Encode::encode affect the original string?

2007-07-06 06:05:58
My platform:

$ perl -V:version -MEncode -e 'print "$Encode::VERSION\n"'
version='5.8.7';
2.23

What I expected:

$ perl -MEncode -e '$s='hi';Encode::encode("UTF-8", $s, 0);print "($s)\n"'
(hi)

Unexpected results when CHECK is 1:

$ perl -MEncode -e '$s='hi';Encode::encode("UTF-8", $s, 1);print "($s)\n"'
()

Thanks,
Stephen

<Prev in Thread] Current Thread [Next in Thread>