nayakgi / perl-compiler

Automatically exported from code.google.com/p/perl-compiler
Other
0 stars 0 forks source link

No warnings reading in invalid utf8 stream from compiled code. #320

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
$>perlcc -r  -e 'use warnings "utf8"; local $SIG{__WARN__} = sub { $@ = shift 
}; open F, ">", "a"; binmode F; my ($chrE4, $chrF6) = (chr(0xE4), chr(0xF6)); 
print F "foo", $chrE4, "\n"; print F "foo", $chrF6, "\n"; close F; open F, 
"<:utf8", "a";  undef $@; my $line = <F>; print $@'

(no output from perlcc)

$>perl -e 'use warnings "utf8"; local $SIG{__WARN__} = sub { $@ = shift }; open 
F, ">", "a"; binmode F; my ($chrE4, $chrF6) = (chr(0xE4), chr(0xF6)); print F 
"foo", $chrE4, "\n"; print F "foo", $chrF6, "\n"; close F; open F, "<:utf8", 
"a";  undef $@; my $line = <F>; print $@'
utf8 "\xE4" does not map to Unicode at -e line 1, <F> line 1.

Original issue reported on code.google.com by todd.e.rinaldo on 7 May 2014 at 11:29