ID:               19836
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Analyzed
 Bug Type:         Strings related
 Operating System: AIX 4.3.3
 PHP Version:      4CVS-2002-10-09
 New Comment:

Yep, you're right, Markus.

I was put off, by what FreeBSD returns (and other platforms I guess).
Those platforms consolidate the different values, when the locale is
the same for all.

Despite the difference - AIX is consistent in it's output. It always
returns all values, space separated - when you set them and when you
only query them.

Since the setlocale manual entry already mentions platform specific
issues, I'm not sure this should be "fixed". Even though the manpage
for AIX doesn't specify the output returned:
http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/basetrf2/setlocale.htm

Allthough it makes it harder to write platform independent packages
this way, locale names are already very different, so unless PHP keeps
an internal table of platform differences and defines constants for
different locale names, this function will never be platform
independant and expecting a different output is just another small
issue.

If you agree, change this to "Won't fix" or a doc problem and I'll fix
the testcases affected by this difference.

With doc problem I mean, that the user isn't too much informed right
now, about how different implementations are accross platforms, and
what one should consider.


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

[2002-10-10 03:04:48] [EMAIL PROTECTED]

The PHP setlocale() function only returns what the System setlocale()
function returns.

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

[2002-10-09 14:46:49] [EMAIL PROTECTED]

On AIX setlocale(LC_ALL, locale) returns a space separated list of the
locales in effect, instead of a '/'. A little test program explains:

$ ./o
setlocale LC_ALL, "C" returns <C C C C C C>
setlocale LC_CTYPE, "en_US" returns <en_US>
setlocale LC_ALL, NULL returns <C en_US C C C C>

I've taken a look at ext/standard/string.c but can't figure out
how/where
the string is turned into just one character.
This affects (among other things) ext/ctype/tests/002.phpt

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


-- 
Edit this bug report at http://bugs.php.net/?id=19836&edit=1

Reply via email to