Re: Re: cvs: php4 /ext/xml/tests 007.phpt
| From: | (Michael Mauch) | Date: | Tue, 22 Oct 2002 18:21:43 +0000 |
| Subject: | Re: Re: cvs: php4 /ext/xml/tests 007.phpt | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-89928@lists.php.net to get a copy of this message | ||
Melvyn Sopacua <msopacua@idg.nl> wrote:
> [ Sorry Derick, missed a whole bunch of CVS mail, because of multiple spaces
> in the subject and my overeager filtering :) ]
>
> At 23:58 21-10-2002, Michael Mauch wrote:
>
>>Derick Rethans <derick@php.net> wrote:
>> > On Mon, 21 Oct 2002, Melvyn Sopacua wrote:
>> >
>> >> msopacua Mon Oct 21 04:55:07 2002 EDT
>> >>
>> >> Modified files:
>> >> /php4/ext/xml/tests 007.phpt
>> >> Log:
>> >> Skip this when strtoupper doesn't behave as expected, because
>> casefolding
>> >> depends on this.
>> >
>> > erm, this is just a local problem. Just set the locale to "German" here
>> > and it will work just fine I think. IMO this is a hack :)
>>
>>The problem is that there are an awful lot of "German" locales.
>
> While I agree, the only thing that should be needed is LC_CTYPE to ISO-8859-1,
> which is somewhat managable (ISO8859=1 is the most portable I think?).
ISO-8859-1 is the most portable character set (apart from plain 7 bit
ASCII), but e.g. your LC_CTYPE="ISO-8859-1" doesn't work here at all.
Not with the current PHP-CVS, not with PHP-4.2.3, and not with Perl:
% LC_CTYPE=ISO-8859-1 perl -w -e ';'
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "ISO-8859-1",
LC_COLLATE = "C",
LANG = "de_DE.ISO-8859-15"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
> IIC - Michael is right that locale names are even less consistent, than a
> lawyer.
>
> So you can either setlocale(LC_CTYPE, "some string") then test if it works,
> maybe
> try again with "other string", but you can't grab'm all.
True. If LC_ALL is set, it overrides any other of the LC_ settings, so
you should make sure that LC_ALL is unset (or just set LC_ALL instead of
LC_CTYPE).
> Apart from that:
> msopacua@trinity.webteckies.org ~/cvs/php4
> $ /php/bin/php -f ext/standard/tests/strings/strtoupper.phpt
> --TEST--
> Test strtoupper on non-ASCII characters
> --POST--
> --GET--
> --FILE--
> ÀËÏ--EXPECT--
> ÄËÏ
>
> msopacua@trinity.webteckies.org ~/cvs/php4
> $ sapi/cli/php -f ext/standard/tests/strings/strtoupper.phpt
> --TEST--
> Test strtoupper on non-ASCII characters
> --POST--
> --GET--
> --FILE--
> àëï--EXPECT--
> ÄËÏ
>
> /php/bin/php is 4.2.3 so something has changed not for the better :(
Both versions work here without problems - but if it doesn't work
anymore on your machine, something is probably wrong (btw: did you check
strtoupper.phpt in already? I can't find it yet).
Can you please try if Perl is happy with your locale settings?
perl -w -e ';'
should print nothing. If it prints some warnings,
<http://www.uni-ulm.de/~s_smasch/locale/> might
help.
The program at <http://www.uni-ulm.de/~s_smasch/locale/#checklocale>
can
also give some hints.
> Should I file a bugreport?
I think so, at least if the Perl test above does not show any warnings.
Regards...
Michael