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:
Karl Williamson
Date:
March 27, 2014 18:14
Subject:
Re: [perl #119499] $! returned with UTF-8 flag under UTF-8 localesonly under 5.19.2+
Message ID:
53346A94.20009@khwilliamson.com
On 03/27/2014 02:01 AM, Victor Efimov wrote:
> 2014-03-27 3:12 GMT+04:00 Karl Williamson <public@khwilliamson.com>:
>>
>> locale works a lot better (I anticipate) in 5.20 than before.
>
> So, it worked bad before? Than it will be hard to write code
> compatible with 5.20 and, say, 5.8.8 at same time (that again related
> to 'ack'-like programs  - it's command line program that should work
> in system perl installed by end users. it's not a web application
> where programmer can choose perl version)

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 could be true, but it's not something that there is 
anything that can be done about, except possibly some things in 
PPPort.h, if we end up adding new macros.

It's a given that we can't break things like ack unless there is an easy 
workaround that is backwards compatible.
>
>> The problem is that the commit fixed real bugs in code that didn't "use
>> locale"  Thus the quandary.  If we go back to 5.18 behavior, those bugs come
>> back.
>
> Who told that it was bug? I saw this behaviour but never thought it is
> a bug, because there is note in documentation:
> ===
> 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.
> ===
> a user reported this as bug because he did not read this. for me it's
> documented behaviour.

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.

If we revert this commit, those bugs come back.



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