Re: localeconv not working

From: Date: Wed, 03 Nov 2004 07:04:09 +0000
Subject: Re: localeconv not working
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-13697@lists.php.net to get a copy of this message
On 2004/10/30, at 21:43, Klaus Reimer wrote:
I think this explains the misbehaviour. If I do a "setlocale(LC_ALL, 'de_DE')" then the PHP function resets LC_NUMERIC to "C". So what chance have I to get the LC_NUMERIC configuration of a specific locale now? Well, I think there was a good reason to reset LC_NUMERIC to C but this breaks localeconv(). I want to read the LC_NUMERIC configuration of the selected locale to use these informations with the number_format() function but I can't do it because of the above code. Is there a workaround?
Yup, save all the relevant environment variables beforehand and restore them with setlocale() after the localeconv() call. Either way, That's a valid bug that needs attention. Moriyoshi

« previous php.internals (#13697) next »