php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30769 LC_NUMERIC is not set with setlocale
Submitted: 2004-11-12 15:04 UTC Modified: 2004-11-12 15:14 UTC
From: ruempler at topconcepts dot com Assigned:
Status: Closed Package: *Languages/Translation
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
9 + 47 = ?
Subscribe to this entry?

 
 [2004-11-12 15:04 UTC] ruempler at topconcepts dot com
Description:
------------
After setting LC_ALL to de_DE, all LC_* types _except_ LC_NUMERIC are set right.

Tested with php 4 and 5 on several Linux systems. The same everywhere.

Reproduce code:
---------------
var_dump(setlocale(LC_ALL, 'de_DE'));
var_dump(setlocale(LC_ALL, 0));
var_dump(setlocale(LC_ALL, 'de_DE.iso-8859-1'));
var_dump(setlocale(LC_ALL, 0));
var_dump(setlocale(LC_ALL, 'en_US'));
var_dump(setlocale(LC_ALL, 0));


Expected result:
----------------
string(5) "de_DE"
string(5) "de_DE"
string(16) "de_DE.iso-8859-1"
string(16) "de_DE.iso-8859-1"
string(5) "en_US"
string(5) "en_US"


Actual result:
--------------
string(5) "de_DE"
string(204) "LC_CTYPE=de_DE;LC_NUMERIC=C;LC_TIME=de_DE;LC_COLLATE=de_DE;LC_MONETARY=de_DE;LC_MESSAGES=de_DE;LC_PAPER=de_DE;LC_NAME=de_DE;LC_ADDRESS=de_DE;LC_TELEPHONE=de_DE;LC_MEASUREMENT=de_DE;LC_IDENTIFICATION=de_DE"
string(16) "de_DE.iso-8859-1"
string(325) "LC_CTYPE=de_DE.iso-8859-1;LC_NUMERIC=C;LC_TIME=de_DE.iso-8859-1;LC_COLLATE=de_DE.iso-8859-1;LC_MONETARY=de_DE.iso-8859-1;LC_MESSAGES=de_DE.iso-8859-1;LC_PAPER=de_DE.iso-8859-1;LC_NAME=de_DE.iso-8859-1;LC_ADDRESS=de_DE.iso-8859-1;LC_TELEPHONE=de_DE.iso-8859-1;LC_MEASUREMENT=de_DE.iso-8859-1;LC_IDENTIFICATION=de_DE.iso-8859-1"
string(5) "en_US"
string(5) "en_US"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-12 15:14 UTC] derick@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC