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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to