ID: 49520
User updated by: jchochola at demsys dot cz
Reported By: jchochola at demsys dot cz
Status: Open
-Bug Type: I18N and L10N related
+Bug Type: Strings related
Operating System: Debian 4.0
PHP Version: 5.2.10
New Comment:
Moved to "Strings related" category I missed while posting original
bug.
Previous Comments:
------------------------------------------------------------------------
[2009-09-10 11:11:13] jchochola at demsys dot cz
OS rectification received from my ISP.
------------------------------------------------------------------------
[2009-09-10 10:43:11] jchochola at demsys dot cz
Description:
------------
setlocale( LC_ALL, 'Czech' ) does not work in my ISP's environment; one
has to use lowercase 'czech' instead. The ISO639 (mentioned in
setolcale() docs) lists country names with capitalized first letters,
ie. setlocale() should accept 'Czech' or not to mention ISO639 at all.
'Czech' locale is OK under XAMPP used for local debugging.
I can't imagine why such functions should use case-sensitive string
params.
Reproduce code:
---------------
//---
//From manual page: function.setlocale
//---
function e( $s ) {
eval( '$r = '.$s.';' );
echo $s, ' returns ', $r ? 'true (\''.$r.'\')' : 'false', "\n";
}
e( "setlocale( LC_ALL, 'Czech' )" );
e( "setlocale( LC_ALL, 'czech' )" );
Expected result:
----------------
setlocale( LC_ALL, 'Czech' ) returns true ('Czech')
setlocale( LC_ALL, 'czech' ) returns true ('czech')
Actual result:
--------------
setlocale( LC_ALL, 'Czech' ) returns false
setlocale( LC_ALL, 'czech' ) returns true ('czech')
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49520&edit=1