Quoth ikegami@adaelis.com (Eric Brine): > On Sun, May 16, 2010 at 9:21 AM, David Golden <xdaveg@gmail.com> 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. c.f. PerlIO::eol, which may be fractionally less efficient but doesn't have this bug. BenThread Previous | Thread Next