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

Re: Deprecating downgrade of `use utf8`

Thread Previous | Thread Next
Arne Johannessen
March 5, 2022 08:21
Re: Deprecating downgrade of `use utf8`
Message ID:
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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About