develooper Front page | perl.perl5.porters | Postings from March 2022

Re: Deprecating downgrade of `use utf8`

Thread Previous | Thread Next
From:
Arne Johannessen
Date:
March 5, 2022 08:21
Subject:
Re: Deprecating downgrade of `use utf8`
Message ID:
EBEA59F1-DA42-4E10-98DC-605020FB4AE7@thaw.de
Paul LeoNerd Evans wrote on 21 February:
> 
> On a similar note: How do people feel about code which turns off the
> "my source encoding is UTF-8" pragma after having previously turned it
> on? [...]
> 
> As with VERSION: Are there any actually-valid use-cases for doing this
> kind of thing?

I rather doubt that there are actually-valid use cases for this kind of thing, because editor support for text files that mix multi-byte and single-byte encodings is basically non-existent.

A possible exception might be testing scenarios that employ `use utf8` and `no utf8` as a way to manipulate the UTF8 flag on literal UTF-8 strings. But there are other ways to do that.


-- 
Arne Johannessen
<https://arne.johannessen.de/>




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