Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug) - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug)
Date
Msg-id 43C0491C.2080309@dunslane.net
Whole thread Raw
In response to Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug)
List pgsql-hackers

Tom Lane wrote:

>Andrew Dunstan <andrew@dunslane.net> writes:
>  
>
>>However, to the best of my knowledge, Windows does NOT consult the environment when set_locale is called. ISTM we
probablyneed to call set_locale ourselves on Windows with the desired values.
 
>>    
>>
>
>We already do, during process startup.  The question becomes where the
>heck is Perl looking for the locale information, when on Windows?
>  
>

The Windows docs at 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_setlocale.2c_._wsetlocale.asp 
say:

|setlocale( LC_ALL, "" );|   Sets the locale to the default, which is the user-default ANSI code   page obtained from
theoperating system.
 

Does libperl call this only at interpreter startup? If so, maybe we 
should probably save out the settings and then restore them after the 
interpreter has started.

cheers

andrew

||




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug)
Next
From: Jeremy Drake
Date:
Subject: Re: catalog corruption bug