Re: The decimal separator is changed when PHP-GTK is loaded

From: Date: Wed, 13 Apr 2005 00:10:52 +0000
Subject: Re: The decimal separator is changed when PHP-GTK is loaded
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5755@lists.php.net to get a copy of this message
I'd the same trouble in my apps and resolved it by doing this: setlocale(LC_NUMERIC,'C'); -- -- Malk0 -- On 4/12/05, Valéry Amiot <vamiot@9online.fr> wrote: > Hi everybody. > > This issue must be well known now - not to be considered as a bug but I > didn't find any workaround yet. > > I'm developing a simple bank account application and I'm managing > decimal figures containing a dot as the decimal separator. > > As soon as PHP-GTK is loaded, PHP no longer considers figures containing > a dot as doubles, but as integers. I'm therefore loosing the decimal > part of each figure (ex: the string "1.95" turns into 1 when I add > figures together). > > Instead of the dot character, PHP considers the comma character as the > new decimal separator. I live in France and as a matter of fact, the > official decimal separator is the comma here :) > > I guess this localization issue can be tuned somewhere, but as a PHP and > GTK newbie, I don't know where. > > Can someone help me ? > > Thanks in advance. > > -- > > Le papagone du 4ème. > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.gtk.general (#5755) next »