Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13701 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58050 invoked by uid 1010); 3 Nov 2004 08:11:34 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 57282 invoked from network); 3 Nov 2004 08:11:18 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 3 Nov 2004 08:11:18 -0000 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.11/8.12.11) with ESMTP id iA38BIsT006095 for ; Wed, 3 Nov 2004 09:11:18 +0100 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.11/8.12.11) with ESMTP id iA38B77W006073; Wed, 3 Nov 2004 09:11:08 +0100 Date: Wed, 3 Nov 2004 09:11:08 +0100 (CET) X-X-Sender: derick@localhost To: Moriyoshi Koizumi cc: Klaus Reimer , internals@lists.php.net In-Reply-To: <8EF8081F-2D66-11D9-9893-000A95CE0C62@at.wakwak.com> Message-ID: References: <41838C66.4040604@ailis.de> <8EF8081F-2D66-11D9-9893-000A95CE0C62@at.wakwak.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jdimedia.nl Subject: Re: [PHP-DEV] localeconv not working From: derick@php.net (Derick Rethans) 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