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
binmode (encoding) is not idempotent #10454
Comments
From @yecril71pl== Problem description: == == Code: == == Expected output: == == Actual output: == == Workaround: == == References: == Perl Info
|
From @dmcbrideCreated by @dmcbrideThis is related to #113982, but not actually the same issue. Because of the clobbering of PerlIO layers, I inserted some code to ensure I would suggest, in increasing order of preference, one of: a) Documentation for :raw indicating it is recommended for undoing all b) An error message when an encoding layer is added on top of another b) Clobbering (such as with :raw) old encodings when adding a new Code: #! /usr/bin/perl use 5.10.1; $text = "\x{65E0}\x{6CD5}\x{542F}\x{52A8}"; binmode STDOUT, ':encoding(eucCN)'; say "== $_" for PerlIO::get_layers(STDOUT); say $text; __END__ I'm suggesting that this should produce the same output whether there is (The Perl I'm using this on is 5.10.1, which is not the same as my local Perl Info
|
From @jkeenanOn Mon Jul 30 15:26:17 2012, dmcbride@cpan.org wrote:
Reviewing this older ticket this evening, I had occasion to run the OP's program on perl 5.20.1. Here's what I got? ##### my $text = "\x{65E0}\x{6CD5}\x{542F}\x{52A8}"; binmode STDOUT, ':encoding(eucCN)'; say "== $_" for PerlIO::get_layers(STDOUT); say $text; $ perl 114334-raw.pl Can anyone assess the significance of this output in relation to the OP's feature request? Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Mon, 22 Sep 2014 23:31:34 GMT, jkeenan wrote:
Re-reviewing this older ticket today, I ran the OP's program on perl-5.24.0. ##### Can anyone assess the significance of this output in relation to the OP's feature request? Thank you very much. -- |
From @jkeenan |
The RT System itself - Status changed from 'new' to 'open' |
From @LeontOn Sat, Jan 7, 2017 at 4:21 PM, James E Keenan via RT <
The current behavior is not helpful. Making pushing an :encoding(foo) on Leon |
Migrated from rt.perl.org#75890 (status was 'open')
Searchable as RT75890$
The text was updated successfully, but these errors were encountered: