#39873 [Opn->Fbk]: thousands_sep not shown
| From: | iliaa@php.net | Date: | Mon, 18 Dec 2006 18:52:48 +0000 |
| Subject: | #39873 [Opn->Fbk]: thousands_sep not shown | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-106518@lists.php.net to get a copy of this message | ||
ID: 39873
Updated by: iliaa@php.net
Reported By: rob4you at vodafone dot it
-Status: Open
+Status: Feedback
Bug Type: Strings related
Operating System: Windows XP
PHP Version: 5.2.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2006-12-18 17:48:18] rob4you at vodafone dot it
Description:
------------
The [thousands_sep] states dot "." as separator of thousands, but the
output of the number DOES NOT show it.
It is correctly shown in the array returned by "localeconv" although.
I've observed the same problem on other OS and with other locales.
Reproduce code:
---------------
<?php
echo "<pre>";
$ita=array("ita","it","Italian","it_IT","it_IT.ISO8859-1","it_IT.ISO_8859-1");
$local_settings=setlocale(LC_ALL,$ita);
echo $local_settings."<br>";
$num=0+"1234.56";
echo $num;
printf("\n Not dependant in local settings: %F \n",$num);
printf("\n Dependant on local settings: %f \n",$num);
$x=localeconv();
print_r($x);
echo "</pre>";
?>
Expected result:
----------------
Italian_Italy.1252
1.234,56
Not dependant in local settings: 1234.560000
Dependant on local settings: 1.234,560000
Array
(
[decimal_point] => ,
[thousands_sep] => .
...etc...
)
Actual result:
--------------
Italian_Italy.1252
1234,56
Not dependant in local settings: 1234.560000
Dependant on local settings: 1234,560000
Array
(
[decimal_point] => ,
[thousands_sep] => .
...etc...
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39873&edit=1