This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #133604) fix binmode on Win32 :crlf layers origin/tonyc/133604-crlf-binmode-utf8
authorTony Cook <tony@develop-help.com>
Mon, 22 Oct 2018 04:22:47 +0000 (15:22 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 22 Oct 2018 04:22:47 +0000 (15:22 +1100)
commitdda4a47798d635b6b0d236c270660c8eacdda2fa
tree2210d057b0957bbbc86f9729bdb76bcd019d0ee0
parent854affc4344e6f48685cc3050ef600402eb8de60
(perl #133604) fix binmode on Win32 :crlf layers

On Win32 the :crlf layer is special - it replaces the use of the normal
:perlio buffering layer.

So while binmode :raw with :crlf present on non-Win32 removes the
CRLF layer, on Win32 it simply switches the :crlf layer's CRLF flag off
to prevent translation.

Unfortunately the :crlf skipped doing something else expected by :raw -
it didn't turn off the layer UTF8 flag.  This broke the tests I added
in 9704d779004.
perlio.c
t/io/crlf.t
t/io/socket.t