New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PerlIO::get_layers() *always* reports :crlf on Windows #17160
Comments
From @haukexHi all, On Windows, doing `PerlIO::get_layers($filehandle)` will always report The PerlIO documentation does say that :crlf is part of the "default I tested this on Strawberry Perl 5.8.9 through 5.28 on Windows 7. There This definitely feels like a bug to me, but I don't know enough about Thanks, |
From @LeontOn Sat, Sep 28, 2019 at 11:05 AM Hauke D (via RT)
Yeah, this is confusing behavior. :crlf is not just a translation layer on top of the buffering system, For extra confusion, on Linux binmode will pop off the crlf layer, I presume this is implemented the way it is because of performance reasons.
Yeah, that was a serious bug because that meant no buffering would
It's mainly terribly confusing, but AFAIK it does do the right thing. Leon |
The RT System itself - Status changed from 'new' to 'open' |
From @haukexHi, Thanks for the quick reply and the explanation!
I think that would be nice. AFAICT from the documentation, :utf8 is also just a flag, not really a layer, and in any case, seeing :crlf in the layer list is confusing, and I don't know of any other way to ask PerlIO whether CRLF translation is turned on or off?
If it's important that this buffering system be reported by get_layers(), perhaps it could be reported as a separate pseudolayer? I.e. get_layers() returns either `("unix","winbuf","crlf")` or `("unix","winbuf")` depending on whether CRLF translation is actually turned on or off (there's probably a better name than "winbuf"). Best, On Sat, 28 Sep 2019 02:50:45 -0700, LeonT wrote:
|
Migrated from rt.perl.org#134458 (status was 'open')
Searchable as RT134458$
The text was updated successfully, but these errors were encountered: