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

Re: [perl #5907] inconsistencies in locale support

Thread Previous | Thread Next
From:
Karl Williamson
Date:
October 21, 2014 15:01
Subject:
Re: [perl #5907] inconsistencies in locale support
Message ID:
5446755E.906@khwilliamson.com
On 10/19/2014 05:42 PM, James E Keenan via RT wrote:
> Two-and-a-half years ago, I wrote:
>
> On Mon Jan 30 18:34:57 2012, jkeenan wrote:
>>>
>>
>> There has been no movement on this ticket for nearly eleven years.
>>
>> Does anyone feel we are in need of the "setlocale acrobatics" discussed
>> in this ticket?  If so, then we should probably outline those in a new
>> RT.  If not, we should close the ticket.
>>
>
> Subsequently, Karl Williamson wrote:
>
>>
>> [T]hings have been cleaned up for 5.20.  'use locale' is required
>> for locale to be visible to Perl space, but not to POSIX:: space.  The
>> POSIX::isfoo functions are now
>> deprecated, instead of fixing their bugs.  The one remaining issue I
>> see in this ticket is the POSIX::toupper and ::tolower functions don't
>> respect locale, unlike the other POSIX functions.  This is trivial to
>> change, but I'm not sure we shouldn't just deprecate these as well;
>> they have behaved identically to uc() and lc() for some time, except
>> that the latter can be made to respect locale.
>>
>> So the question is do we fix these or deprecate them?
>
> When I later asked:
>
>>>> Can we now move forward with the deprecation?
>>>>
>>
>
> Karl commented further:
>
>> But actually, there may be a reason to fix and not deprecate, and that
>> is fixing is trivial, that is, it's less work in the short term than
>> deprecating.
>>
>
> Can we move toward a resolution of this 13-1/2-year-old ticket?  Suggestions?  Patches?
>
> Thank you very much.
>
>

I have been planning and still do plan on getting to this in 5.21.  It's 
trivial to fix it, and I'm tempted to, given the dearth of interest in 
this.  But a reply to my proposal to fix things like POSIX::isalnum() 
was that we shouldn't be changing the behavior of very old functions 
like this because we might break some very old code.  Better to 
deprecated (which might still break that code, by yielding unexpected 
output, but that can easily be silenced.

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