develooper Front page | perl.perl5.porters | Postings from September 2013

Re: [perl #119499] $! returned with UTF-8 flag under UTF-8 localesonly under 5.19.2+

Thread Previous | Thread Next
Leon Timmermans
September 1, 2013 15:23
Re: [perl #119499] $! returned with UTF-8 flag under UTF-8 localesonly under 5.19.2+
Message ID:
On Sun, Sep 1, 2013 at 4:36 PM, Victor Efimov <> wrote:

> But that is not the only place, where non-ASCII character can appear.
> The following is documented in perlunicode:
> "While Perl does have extensive ways to input and output in Unicode, and a
> few other "entry points" like the @ARGV array (which can sometimes be
> interpreted as
>  UTF-8), there are still many places where Unicode (in some encoding or
> another) could be given as arguments or received as results, or both, but
> it is not."
> I believe that note can mean that encoded $! is not a bug, but a feature.
> If it's considered a bug, then all other places where non-ASCII appears
> encoded, and it's not explicitly documented, can be considered as bug
> (examples are $0, %INC values, @INC, something else?)
> Thus it's impossible for people to use those variables now, as it may
> change anytime in the future.

$! is inherently a piece of text, not piece of binary data. As such, it
makes perfect sense to treat it as such an automatically decode it. The
same is not necessarily true for your other examples.


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