cvs: php-src(PHP_5_2) / NEWS /ext/date/lib parse_tz.c

From: Date: Thu, 18 Jan 2007 23:20:24 +0000
Subject: cvs: php-src(PHP_5_2) / NEWS /ext/date/lib parse_tz.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-42793@lists.php.net to get a copy of this message
iliaa Thu Jan 18 23:20:24 2007 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/date/lib parse_tz.c Log: Fixed bug #39993 (tr_TR.UTF-8 locale has problems with PHP). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.498&r2=1.2027.2.547.2.499&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.498 php-src/NEWS:1.2027.2.547.2.499 --- php-src/NEWS:1.2027.2.547.2.498 Thu Jan 18 12:28:09 2007 +++ php-src/NEWS Thu Jan 18 23:20:24 2007 @@ -25,6 +25,7 @@ - Fixed bug #40036 (empty() does not work correctly with ArrayObject when using ARRAY_AS_PROPS). (Ilia) - Fixed bug #40002 (Try/Catch performs poorly). (Dmitry) +- Fixed bug #39993 (tr_TR.UTF-8 locale has problems with PHP). (Ilia) - Fixed bug #39990 (Cannot "foreach" over overloaded properties). (Dmitry) - Fixed bug #39988 (type argument of oci_define_by_name() is ignored). (Chris Jones, Tony) http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_tz.c?r1=1.20.2.6.2.9&r2=1.20.2.6.2.10&diff_format=u Index: php-src/ext/date/lib/parse_tz.c diff -u php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.9 php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.10 --- php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.9 Mon Jan 1 09:35:59 2007 +++ php-src/ext/date/lib/parse_tz.c Thu Jan 18 23:20:24 2007 @@ -16,11 +16,12 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_tz.c,v 1.20.2.6.2.9 2007/01/01 09:35:59 sebastian Exp $ */ +/* $Id: parse_tz.c,v 1.20.2.6.2.10 2007/01/18 23:20:24 iliaa Exp $ */ #include "timelib.h" #include <stdio.h> +#include <locale.h> #ifdef HAVE_STRING_H #include <string.h> @@ -195,6 +196,7 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) { int left = 0, right = tzdb->index_size - 1; + char *cur_locale = setlocale(LC_CTYPE, "C"); do { int mid = ((unsigned)left + right) >> 1; @@ -206,11 +208,13 @@ left = mid + 1; } else { /* (cmp == 0) */ (*tzf) = &(tzdb->data[tzdb->index[mid].pos + 20]); + setlocale(LC_CTYPE, cur_locale); return 1; } } while (left <= right); + setlocale(LC_CTYPE, cur_locale); return 0; }

« previous php.cvs (#42793) next »