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

Re: [perl #121080] blead setlocale broken on VMS

Thread Previous | Thread Next
From:
Craig A. Berry
Date:
January 25, 2014 05:21
Subject:
Re: [perl #121080] blead setlocale broken on VMS
Message ID:
EAF4522B-1C68-4AA4-AB4B-FE15479AE0A9@mac.com

On Jan 24, 2014, at 11:08 PM, karl williamson via RT <perlbug-followup@perl.org> wrote:

> On 01/24/2014 08:58 PM, Craig A. Berry (via RT) wrote:
>> I question the expectation of locale.t that setlocale(LC_NUMERIC, NULL) will return the value of LC_NUMERIC from the environment.
> 
> You're right.  The value setlocale returns is opaque, and can't be 
> parsed like that test expects.  All that is supposedly guaranteed is 
> that if you pass a value returned from a setlocale() to a later 
> setlocale(), it will understand the opaque value correctly.
> 
> I'll have to come up with a better test.

The standard at:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/setlocale.html

says, regarding the locale argument to setlocale,

"A null pointer -- Directs setlocale() to query the current global locale setting and return the name of the locale if category is not LC_ALL, or a string which encodes the locale name(s) for all of the individual categories ifcategory is LC_ALL."

So are you saying that the implementations don't really do what the standard says or are you saying the "name of the locale" might not be a human-recognizable locale name but is just a key in the internal locale database or something?
________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser


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