#33695 [NEW]: localconv() returning invalid thousands_sep for France
| From: | tony at marston-home dot demon dot co dot uk | Date: | Thu, 14 Jul 2005 09:50:56 +0000 |
| Subject: | #33695 [NEW]: localconv() returning invalid thousands_sep for France | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-81849@lists.php.net to get a copy of this message | ||
From: tony at marston-home dot demon dot co dot uk
Operating system: Windows XP
PHP version: 5.0.4
PHP Bug Type: *Languages/Translation
Bug description: localconv() returning invalid thousands_sep for France
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 bug report at http://bugs.php.net/?id=33695&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33695&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33695&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33695&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33695&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33695&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33695&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33695&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33695&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33695&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33695&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33695&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33695&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33695&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33695&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33695&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33695&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33695&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33695&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33695&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33695&r=mysqlcfg