ID:               49520
 User updated by:  jchochola at demsys dot cz
 Reported By:      jchochola at demsys dot cz
 Status:           Bogus
 Bug Type:         Strings related
 Operating System: Debian 4.0
 PHP Version:      5.2.10
 New Comment:

...which is pitty, and as PHP is not an integral part of the hosting
OS, it should (or at least could) implement a unifying (platform
dependent) layer above the C-lib's setlocale().

I hoped it's clear I really did read the setlocale()'s doc from the
text of the original post. I consulted the ISO it mentioned
and...following it was a kind of failure to me. My fault, I've to learn
English better.

Maybe it's time to fork&reclassify (and reopen) this BR to docs issue
and feature request...?

Thx for your Re: anyway.

Have a nice day,
H.


Previous Comments:
------------------------------------------------------------------------

[2009-09-10 13:12:09] [email protected]

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."

------------------------------------------------------------------------

[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

Reply via email to