develooper Front page | perl.perl5.porters | Postings from August 2021

Re: "use v5.36.0" should imply UTF-8 encoded source

Thread Previous | Thread Next
From:
Felipe Gasper
Date:
August 2, 2021 10:55
Subject:
Re: "use v5.36.0" should imply UTF-8 encoded source
Message ID:
1649BDB9-3AC0-41B7-B090-E358C6530F6A@felipegasper.com

> On Aug 2, 2021, at 4:12 AM, Leon Timmermans <fawaka@gmail.com> wrote:
> 
> On Mon, Aug 2, 2021 at 2:35 AM Felipe Gasper <felipe@felipegasper.com> wrote:
> Code is indeed text, but this is not reasonable:
> 
> > perl -Mutf8 -e'print "é"'
> �
> 
> … particularly in contrast to this:
> 
> > echo é | perl -Mutf8 -e 'print <>'
> é
> 
> … and these:
> 
> > node -e 'console.log("é")'
> é
> 
> > python -c 'print("é")'
> é
> 
> > ruby -e 'puts "é"'
> é
> 
> > echo '<?php print "é" ?>' | php
> é
> 
> > echo | awk '{print "é"}'
> é
> 
> > julia -e'print("é")'
> é
> 
> > lua -e'print "é"'
> é
> 
> I don't think the proposal said anything about -e or -E

1. -E loads the feature bundle. So if the 5.36 feature bundle is to include utf8.pm, so will -E, right?

2. The feature bundle represents a “best, most modern” set of default Perl features. The proposal will make Perl at its “best, most modern” complicate a simple “¡Hola, mundo” with a need to encode--and no indication of what’s wrong if that encoding is missing. Worse, the STDIN-piped variant of that code will still work as usual.


-F
Thread Previous | Thread Next


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