Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27649 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1236 invoked by uid 1010); 25 Jan 2007 14:36:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1221 invoked from network); 25 Jan 2007 14:36:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jan 2007 14:36:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 82.94.239.5 cause and error) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.94.239.5 jdi.jdi-ict.nl Received: from [82.94.239.5] ([82.94.239.5:59979] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/C9-13597-550C8B54 for ; Thu, 25 Jan 2007 09:36:15 -0500 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.13.7/8.12.11) with ESMTP id l0PEZqr0011430; Thu, 25 Jan 2007 15:35:52 +0100 Date: Thu, 25 Jan 2007 15:35:30 +0100 (CET) X-X-Sender: derick@localhost To: Tomas Kuliavas cc: Antony Dovgal , PHP Developers Mailing List In-Reply-To: <40869.195.22.180.233.1169733866.squirrel@avilys.eik.lt> Message-ID: References: <0F741213-BCA4-4923-A83A-3E4E9C561DAE@prohost.org> <5F.94.13597.04698B54@pb1.pair.com> <45B897E5.40007@zend.com> <41936.195.22.180.233.1169730121.squirrel@avilys.eik.lt> <45B8B2E5.4010204@zend.com> <40869.195.22.180.233.1169733866.squirrel@avilys.eik.lt> X-Face: "L'&?Ah3MYF@FB4hU'XhNhLB]222(Lbr2Y@F:GE[OO;"F5p>qtFBl|yVVA&D{A(g3[C}mG:199P+5C'v.M/u@Z\![0b:Mv.[l6[uWl' MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Re: PHP 5.2.1RC3 Released From: derick@php.net (Derick Rethans) On Thu, 25 Jan 2007, Tomas Kuliavas wrote: > >>>> 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. > > > > Making PCRE a requirement for ext/date is not an option. > > > >> 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(). > > > > Looks way overcomplicated comparing to the Ilia's solution. > > PHP needs locale insensitive strcasecmp() or your developers will > continue hitting string comparison issues in Turkish and Azerbaijani. > Ilia patched it in timezone parsing code. Some day other strcasecmp > will pop in other place. > > Switching locale everytime you want to compare strings is a hack and > not a bug fix. I actually agree there and it was one of the reasons why I didn't like this patch. However, it is the quickest way to do this for now. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org