in reply to disable warnings: utf8 "\x8E" does not map to Unicode
How do I disable these warnings?
In theory, the following should work:
use PerlIO::encoding; $PerlIO::encoding::fallback = Encode::FB_DEFAULT;
However, when I try it, for example
#!/usr/bin/perl use PerlIO::encoding; $PerlIO::encoding::fallback = Encode::FB_DEFAULT; open my $fh, "<:encoding(UTF-8)", $ARGV[0] or die $!; binmode STDOUT, ":encoding(UTF-8)"; while (<$fh>) { print }
with an input file such as (where the 'ä' is Latin-1 encoded)
foo bär
although it does silence the warning, I do get an endless loop!
foo b�r foo b�r foo b�r ...
Not sure why... (Encode::FB_QUIET, OTOH, doesn't have the latter problem).
Looks like a bug to me. Can others confirm the problem?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: disable warnings: utf8 "\x8E" does not map to Unicode
by choroba (Cardinal) on Feb 10, 2012 at 22:03 UTC |