ID: 44041
Updated by: [EMAIL PROTECTED]
Reported By: trickie at gmail dot com
-Status: Open
+Status: Feedback
-Bug Type: Unknown/Other Function
+Bug Type: *General Issues
Operating System: Gentoo Linux
PHP Version: 5.2.5
New Comment:
What does this output:
<?php
if (false !== setlocale(LC_ALL, 'lv_LV.UTF-8')) {
$locale_info = localeconv();
var_dump($locale_info);
}
?>
Previous Comments:
------------------------------------------------------------------------
[2008-02-04 15:18:20] trickie at gmail dot com
Description:
------------
If you set the locale to 'lv_LV.UTF-8' and have the locale generated on
your system, then the code below will return garbage as the 'thousands
separator'. It displays ok for me when running with CLI SAPI
Reproduce code:
---------------
<?php
if (false !== setlocale(LC_ALL, 'lv_LV.UTF-8')) {
$locale_info = localeconv();
echo number_format(20000,0,$locale_info['decimal_point'],
$locale_info['thousands_sep']);
}
?>
Expected result:
----------------
20 000
Actual result:
--------------
20�000
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44041&edit=1