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:
Yuki Kimoto
Date:
August 2, 2021 05:11
Subject:
Re: "use v5.36.0" should imply UTF-8 encoded source
Message ID:
CAExogxMBuEMxQ2ZdBxEyaNCKS3_5Ogo-xvCYjTL=o8sv+cGU3A@mail.gmail.com
2021-8-1 9:54 Felipe Gasper <felipe@felipegasper.com> wrote:

>
> Another way to look at it: the content of the parsed strings actually
> differs between the two:
>
> my $x = do { no utf8; "éé" };
> my $y = do { use utf8; "éé" };
>
>
Felipe

I have a question.

I think the problem is which is the better default in 2021 for general
application users.

The existing code is "no utf8" so it won't break.

In the new code, the generally recommended way is

  use strict;
  use warnings;
  use utf8;

If user needs old behavior, he need to write

  use v5.xx;
  no utf8;

Are you clearly aware that this is a default change, not internal
representation changes?

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