Re: localeconv not working
| From: | Derick Rethans | Date: | Wed, 03 Nov 2004 08:11:08 +0000 |
| Subject: | Re: localeconv not working | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13701@lists.php.net to get a copy of this message | ||
On Wed, 3 Nov 2004, Moriyoshi Koizumi wrote:
> 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.
It's assigned to me for now... I'll have a look at it this week. Does
somebody remember why we need to mangle the locale anyway by resetting
LC_NUMERIC to "C"?
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org