Re: Re: PHP 5.2.1RC3 Released
| From: | Tomas Kuliavas | Date: | Thu, 25 Jan 2007 13:02:01 +0000 |
| Subject: | Re: Re: PHP 5.2.1RC3 Released | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-27645@lists.php.net to get a copy of this message | ||
>>> The 2nd release candidate for PHP 5.2.1 is now available for download.
>>> The tarballs can be found here:
>>>
>>> http://downloads.php.net/ilia/php-5.2.1RC3.tar.bz2
>>> (d3889eda8c3471ce7cf2adb35a4de736)
>>> http://downloads.php.net/ilia/php-5.2.1RC3.tar.gz
>>> (c5b3e5540d1951d4c4b976b8a39c09ab)
>>>
>>> and the Win32 binaries will be available in short order.
>>>
>>> Since the last release, there are over 20 different bug fixes resolving
>>> some annoying engine issues such as the tempval leak inside foreach().
>>> We do not anticipate any regressions to be introduced by this RC, but I
>>> would still like to ask everyone to take a few minutes and test it
>>> against their code base. If you come across any issues please report
>>> them at http://bugs.php.net/.
>>>
>>> Depending on the stability of this release it may either be followed by
>>> a final release or another RC, therefor your feedback is critical to
>>> determining whether or not the code is stable enough to warrant the
>>> 5.2.1 final.
>>
>> Bugfix for #39993 introduced LC_CTYPE variable corruption.
>
> Please provide more details on this.
>
>> Comments in bug report stated that patch is not correct, yet patch was
>> commited to cvs.
From http://bugs.php.net/bug.php?id=39993
Test script:
---
<?php
// Set all locale vars
var_dump(setlocale(LC_ALL,'tr_TR.UTF-8'));
// get default timezone
var_dump(date_default_timezone_get());
// get current LC_CTYPE value
var_dump(setlocale(LC_CTYPE,0));
---
Expected result:
---
string(11) "tr_TR.UTF-8"
string(15) "Europe/Helsinki"
string(11) "tr_TR.UTF-8"
---
Result after Iliaa's patch:
---
string(11) "tr_TR.UTF-8"
string(15) "Europe/Helsinki"
string(1) "C"
---
Patch was applied in ext/date/lib/parse_tz.c revision 1.20.2.6.2.10.
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_tz.c?view=log
OS - Linux Debian Etch. glibc 2.3.6.
Tested PHP versions:
* php 5.2.0-8 debian - timezone database corruption error
* php5.2-200701011130 - timezone database corruption error
* php5.2-200701241930 - LC_CTYPE environment variable is modified after
date_default_timezone_set/get calls.
If you set LC_CTYPE to C, you might break gettext translations that don't
set codeset with bind_textdomain_codeset().
>> Is it that difficult to replace strcasecmp with locale independent case
>> insensitive comparison function?
>
> We're open for patches. Feel free to send one.
I am PHP developer and don't code in C. In PHP script locale insensitive
strtolower/strtoupper can be done with one preg_replace call.
All timezone identifiers are written in plain US-ASCII. Lowercase ASCII
characters are in 0x61-0x7A range, uppercase characters are in 0x41-0x5A.
Maybe you can add 0x20 to all 0x41-0x5A byte values and use strcmp()
instead of strcasecmp().
--
Tomas