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:
Dan Book
Date:
July 30, 2021 15:02
Subject:
Re: "use v5.36.0" should imply UTF-8 encoded source
Message ID:
CABMkAVV2ZLHRP+VPu8i+YDcDu=bFdZ_gJCR1cG58tkR1EaH=Wg@mail.gmail.com
On Fri, Jul 30, 2021 at 10:46 AM Ricardo Signes <perl.p5p@rjbs.manxome.org>
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;
>
>
> We're on the cusp or merging warnings in.  Next, we merge in utf8.  This
> shouldn't break existing programs, only programs that opt to change
> behavior by adding v5.36.0.
>
> With that, the boilerplate could be:
>
> use v5.36.0;
>
>
> This doesn't need to load utf8.pm, and could just alter $^H, but:
> whatever.
>

+1: https://dev.to/grinnz/perl-7-a-modest-proposal-434m#apply-utf8

But I do think we need to take care that the documentation for this clearly
specifies the change in assumptions this necessitates, namely that
non-ASCII strings in the source will no longer be suitable for directly
printing to byte handles like STDOUT (by default).

-Dan

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