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

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

Thread Previous | Thread Next
From:
Victor Efimov
Date:
March 27, 2014 18:38
Subject:
Re: [perl #119499] $! returned with UTF-8 flag under UTF-8 localesonly under 5.19.2+
Message ID:
CAF7QZD7RAkH1TQsU-N5U=KtzbxKU_SqTzbM3om+N3z9z+TZdUQ@mail.gmail.com
2014-03-27 22:14 GMT+04:00 Karl Williamson <public@khwilliamson.com>:
> I don't follow your logic.  5.20 will contain a bunch of bug fixes related
> to locale handling.  Earlier versions will continue to work as before.
> Perhaps what you meant is that it will be hard to write code that takes
> advantage of whatever 5.20 has, but still works in older releases.

That is hard to write code which works in 5.8 and 5.20 at same time
(_without_ taking advantages of 5.20), because now
I need to 'use locale', and I assume in old version of perl 'use
locale' works bad and introduce additional complexities.

> I disagree that documenting bad behavior means it should not eventually be
> fixed.  The commit that led to this ticket fixed two other tickets, now
> merged as https://rt.perl.org/Ticket/Display.html?id=112208.  Those tickets
> seem to me to be perfectly legitimate as being bugs deserving of being
> fixed.

But those are not a bugs compared to real trouble now. And if it was
documented, those are feature requests.
Real trouble now: old code open(my $f, ">", $filename) or die $!; will
issue warnings. there are lot of "or die $!" in perl documentation and
now everything broken.

Why it's so complex to just introduce $DECODED_ERRNO or a pragma to
turn utf8 flag on (which works in lexical scope)? That's much better
than breaking so much old code and inserting "zero width whitespaces"
into messages.

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