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

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

Thread Previous | Thread Next
From:
Andrew Hewus Fresh
Date:
July 30, 2021 18:34
Subject:
Re: "use v5.36.0" should imply UTF-8 encoded source
Message ID:
YQRGNbFsilX8Sxxg@us.holligan.net
On Fri, Jul 30, 2021 at 10:45:53AM -0400, Ricardo Signes wrote:
> Porters,
> 
> I propose that "use v5.36.0" should imply that the source code is, subsequently, UTF-8 encoded.
> 
> Currently, I advise the following boilerplate:
> use v5.34.0;
> use warnings;
> use utf8;

Tom recommends a bit more boilerplate than that, although the only
one (other than fatal warnings) that hasn't been mentioned is:

use open qw(:std :encoding(UTF-8)); # undeclared streams in UTF-8

https://perldoc.perl.org/perlunicook#%E2%84%9E-0:-Standard-preamble

And wow would I like to get rid of the "wide character in output" from
my `perl -E` one-liners (I know, `perl -C -E`, but boilerplate!).

l8rZ,
-- 
andrew - http://afresh1.com

At the source of every error which is blamed on the computer, you
will find at least two human errors, including the error of blaming
it on the computer.

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