develooper Front page | perl.perl5.porters | Postings from May 2010

Re: [perl #75106] binmode $fh, ":raw" doesn't undo :utf8 on win32

Thread Previous | Thread Next
Eric Brine
May 16, 2010 14:46
Re: [perl #75106] binmode $fh, ":raw" doesn't undo :utf8 on win32
Message ID:
On Sun, May 16, 2010 at 9:21 AM, David Golden <> wrote:

> Strangely:
> C:\david\tmp>perl -MPerlIO -wE "binmode STDOUT; say for
> PerlIO::get_layers(STDOUT)"
> unix
> crlf
> But further investigation with get_layers() and detail => 1 reveals
> that crlf just has different flags set depending on whether binmode
> (raw) is called on STDOUT or not.
That causes isssues if you try to add :encoding(UTF-16):crlf to a handle
that previously had :crlf since the layer ordering ends up wrong.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About