nayakgi / perl-compiler

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

binmode of filehandles not preserved from BEGIN state #287

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$>perl -e 'BEGIN { binmode(STDOUT, ":utf8"); } $a = "\xee\n"; 
utf8::upgrade($a); print $a; ' 2>&1|od -tx1
0000000 c3 ae 0a
0000003

$>perlcc -r -e 'BEGIN { binmode(STDOUT, ":utf8"); } $a = "\xee\n"; 
utf8::upgrade($a); print $a; ' 2>&1|od -tx1
0000000 ee 0a
0000002

Original issue reported on code.google.com by todd.e.rinaldo on 30 Jan 2014 at 11:22

GoogleCodeExporter commented 9 years ago
I'm aware B::C has special code to re-open file handles. I'm wondering if this 
support could be implemented. It's mostly a nice to have not a need.

Original comment by todd.e.rinaldo on 30 Jan 2014 at 11:23

GoogleCodeExporter commented 9 years ago
It's not the binmode, it's the perlio layer in this case.

Original comment by reini.urban on 31 Jan 2014 at 6:33

GoogleCodeExporter commented 9 years ago

Original comment by reini.urban on 4 Feb 2014 at 4:57