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
use open doesn't affect magic diamond operator #15311
Comments
From ambs@zbr.ptCreated by ambs@cpan.orgIn perl 5.22.0, does not affect the "filehandle" ARGV. Perl Info
|
From ambs@zbr.ptSorry, probably I pushed the trigger too fast, but: while (<>) { say } # seems to print everything good (byte wise). /// use open ":encoding(utf-8)"; /// binmode STDOUT, ":encoding(utf-8)"; So, I would say there *is* some bug... On 07/05/16 21:06, ambs@cpan.org wrote:
|
The RT System itself - Status changed from 'new' to 'open' |
From ambs@zbr.ptOn 07/05/16 21:14, Alberto Simoes via RT wrote:
Extra one: use open ":encoding(utf-8)"; this combo outputs utf-8 correctly.
|
From @ikegamiOn Sat, May 7, 2016 at 4:16 PM, Alberto Simoes <ambs@perl-hackers.net>
One normally wants: use open ":std", ":encoding(utf-8)"; Set the default encoding for open(), and binmodes STDIN, STDOUT and STDERR |
From ambs@zbr.pt
OK, reading the docs, I get: The ":std" subpragma on its own has no effect, but if combined with the *BUT* synopsis has a line with: use open ':std'; So, please, remove that line, or add one like you suggest: use open ":std", ":encoding(utf-8)"; and probably add a comment on each synopsis line. And the sentence: The "open" pragma serves as one of the interfaces to declare default might be changed to The "open" pragma serves as one of the interfaces to declare default Am I reading the docs correctly? |
From @tonycozOn Sat May 07 13:14:28 2016, ambs wrote:
Am I right in assuming you're only talking about when <> falls back to STDIN. It seems to work ok when filename are supplied: $ ./perl -Ilib -le 'use open ":encoding(UTF-8)"; while (<>) { print ord }' foo (foo contains a single "\x{101}") Tony |
Migrated from rt.perl.org#128096 (status was 'open')
Searchable as RT128096$
The text was updated successfully, but these errors were encountered: