ID: 49520 Updated by: [email protected] Reported By: jchochola at demsys dot cz -Status: Open +Status: Bogus Bug Type: Strings related Operating System: Debian 4.0 PHP Version: 5.2.10 New Comment:
Locales are OS issue, not PHP issue. We don't have control over what OS might or might not support. Read more at http://php.net/setlocale "Different systems have different naming schemes for locales." Previous Comments: ------------------------------------------------------------------------ [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
