Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71010 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96107 invoked from network); 5 Jan 2014 18:06:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2014 18:06:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.204 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.204 mail4.serversure.net Linux 2.6 Received: from [217.147.176.204] ([217.147.176.204:40569] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/81-19934-B3F99C25 for ; Sun, 05 Jan 2014 13:06:52 -0500 Received: (qmail 1547 invoked by uid 89); 5 Jan 2014 18:06:48 -0000 Received: from unknown (HELO linux-dev4.lsces.org.uk) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 5 Jan 2014 18:06:48 -0000 Message-ID: <52C99FC0.4090901@lsces.co.uk> Date: Sun, 05 Jan 2014 18:09:04 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Floating Point support in GMP extension From: lester@lsces.co.uk (Lester Caine) Sara Golemon wrote: >> * Is there any way to get rid of the locale-dependent behavior of >> mpf_set_str? This sounds like it could be a big pain. (Especially given how >> gmp floats are not what you use with your average user input, so seems >> little useful.) >> > Not really... libgmp can't be told "don't do that", and unilaterally > calling setlocale() is probably a bad idea (as it's not thread local). > > We could query localeconv() and str_replace the input to normalize '.' > -> locale->decimal_point, but that's a bit hacky IMO. Or temporarily > change LC_DECIMAL (when not in ZTS mode). Still hacky... The question is more one of "is this is the correct process anyway?" I'm still looking into an alternate problem with allowing client locale action in these cases. One of the sites I've been playing with has a problem with clients who insist on using the wrong separators and this is not a server local problem, but a client one :( -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk