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

Re: Pre-RFC: Improve “wide character” warnings

Thread Previous | Thread Next
From:
Yuki Kimoto
Date:
January 26, 2022 02:03
Subject:
Re: Pre-RFC: Improve “wide character” warnings
Message ID:
CAExogxM19+9Dwam6y1=VyPATHfPXcdTOoSt4S7ShozNqf47VtA@mail.gmail.com
2022-1-26 6:04 Felipe Gasper <felipe@felipegasper.com> wrote:

> PART 1:
>
> -----
> > perl -e'print "\x{100}"'
> Wide character in print at -e line 1.
> Ā
> -----
>
> ^^ Would it benefit if that warning instead were something like:
>
> -----
> Wide character in print (you forgot to encode) at -e line 1.
> -----
>
> The status quo merely describes the problem; I’d like to add a bit that
> points to the fix.
>
> --------------------------------------------
>
> PART 2:
>
> While I’m raising the issue, what would it take for Perl-issued warnings
> (and exceptions?) writ-large to include some sort of searchable, indexed
> lookup code, something like:
>
> -----
> W.18: Wide character in print (you forgot to encode) at -e line 1.
> -----
>
> Then users could search on that code in Perl’s documentation, maybe like:
>
> -----
> perldoc W.18
> -----
>
> Thoughts?
>
> -FG
>

I think this is a good idea because users don't know the meaning of "Wide
Character" .

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