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

[perl #40964] MSWin32: can't disable crlf trans. on STDxxx using :raw or binmode

Thread Previous
From:
James E Keenan via RT
Date:
May 26, 2013 17:05
Subject:
[perl #40964] MSWin32: can't disable crlf trans. on STDxxx using :raw or binmode
Message ID:
rt-3.6.HEAD-2650-1369587931-326.40964-15-0@perl.org
On Wed Nov 22 06:19:43 2006, zito wrote:
> This is a bug report for perl from zito@bobekw,
> generated with the help of perlbug 1.35 running under perl v5.8.8.
> 
> Hello,
> i compiled perl 5.8.8 on win32 in a standard way using
> MSVC6 (with service pack 6 and PSDK) on Windows XP.
> All tests passed after compilation.
> 
> I found, that I can't disable lf <-> crlf translations
> using layer `raw' nor using binmode on filehandle
> of STDOUT or STDERR (STDIN not tested). Newly opened
> files are ok.
> 
> (Tests are run on cygwin prompt, but without cygwins perl.
> Native perl is on the PATH.)
> 
> 
>     zito@bobekw:~$ mytest() {
>     > perl -e 'print "\n";' |xxd
>     > perl -e 'print join(", ", PerlIO::get_layers(STDOUT)), "\n";'
>     > }
> 
> 
>     zito@bobekw:~$ mytest
>     0000000: 0d0a                                     ..
>     unix, crlf
> Ok
> 
>     zito@bobekw:~$ PERLIO=':raw' mytest
>     0000000: 0d0a                                     ..
>     unix
> Bug?
> 
>     zito@bobekw:~$ PERLIO=':stdio' mytest
>     0000000: 0d0a                                     ..
>     stdio
> Bug?
> 
>     zito@bobekw:~$ PERLIO=':perlio' mytest
>     0000000: 0a                                       .
>     unix, perlio
> Ok?
> Interesting! Layer unix alone produces crlf,
> but unix+perlio behaves ok?
> 
>     zito@bobekw:~$ PERLIO=':win32' mytest
>     0000000: 0a                                       .
>     win32
> Ok
> 
> Layer win32 is considered experimental in PerlIO pod, so should
> I workaround problem with perlio? Is it safe?
> 
> Thanks for any comments on this.
> Maybe, I misuderstood something.


Is there anyone who has Perl 5.18 on Windows and who is familiar with
layers who could take a look at this older ticket?

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=40964

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About