#33695 [Opn->Bgs]: localconv() returning invalid thousands_sep for France
| From: | derick@php.net | Date: | Thu, 14 Jul 2005 10:42:48 +0000 |
| Subject: | #33695 [Opn->Bgs]: localconv() returning invalid thousands_sep for France | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-81850@lists.php.net to get a copy of this message | ||
ID: 33695
Updated by: derick@php.net
Reported By: tony at marston-home dot demon dot co dot uk
-Status: Open
+Status: Bogus
Bug Type: *Languages/Translation
Operating System: Windows XP
PHP Version: 5.0.4
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
If the windows locale information defines the non breaking character as
the thousands_sep value - then we can't do anything about this. This is
not a PHP bug.
Previous Comments:
------------------------------------------------------------------------
[2005-07-14 11:50:56] tony at marston-home dot demon dot co dot uk
Description:
------------
I am using the following code:
$locale = setlocale(LC_ALL, 'FRA');
$data = localeconv();
$thousands_sep = $data['thousands_sep'];
$ascii = ord($thousands_sep);
The value in $ascii is 160 (?) when it should be 32 (space).
When I use this with number_format() the result is written to an XML
file then transformed into HTML using XSL. The XSL transformation
process fails because it is not valid UTF-8.
Reproduce code:
---------------
$locale = setlocale(LC_ALL, 'FRA');
$data = localeconv();
$thousands_sep = $data['thousands_sep'];
$ascii = ord($thousands_sep);
Expected result:
----------------
ord($thousands_sep) should be 32 (space), not 160
Actual result:
--------------
ord($thousands_sep) is 160
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33695&edit=1