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

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

Thread Previous | Thread Next
Craig A. Berry
January 25, 2014 05:21
Re: [perl #121080] blead setlocale broken on VMS
Message ID:

On Jan 24, 2014, at 11:08 PM, karl williamson via RT <> 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:

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

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

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