php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33695 localconv() returning invalid thousands_sep for France
Submitted: 2005-07-14 11:50 UTC Modified: 2005-07-14 12:42 UTC
From: tony at marston-home dot demon dot co dot uk Assigned:
Status: Not a bug Package: *Languages/Translation
PHP Version: 5.0.4 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tony at marston-home dot demon dot co dot uk
New email:
PHP Version: OS:

 

 [2005-07-14 11:50 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-14 12:42 UTC] derick@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC