Re: locale bug from php4.3.0
| From: | Moriyoshi Koizumi | Date: | Mon, 24 Mar 2003 16:40:39 +0000 |
| Subject: | Re: locale bug from php4.3.0 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-217@lists.php.net to get a copy of this message | ||
Giuseppe Tanzilli - CSF <g.tanzilli@gruppocsf.com> wrote:
> Ciao,
> thanks for the so quick reply,
> just one more question to the group,
>
> will be fixed before 4.3.2 ?
Although I don't know how are you handling floats in your script,
the current casting behaviour is correct as stated in that bug page, and
maybe we'll have to introduce a new function to convert numeric strings to
floats in a locale-aware way.
I mean
<?php
setlocale(LC_NUMERIC, "it_IT.ISO-8859-15@euro");
var_dump((float)"1,43");
?>
here the output of this script should be
float(1)
because the language features should not be affected by anything variable
for the sake of portability.
Moriyoshi