Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27647 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96257 invoked by uid 1010); 25 Jan 2007 14:33:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 96241 invoked from network); 25 Jan 2007 14:33:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jan 2007 14:33:07 -0000 Authentication-Results: pb1.pair.com header.from=tokul@users.sourceforge.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=tokul@users.sourceforge.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain users.sourceforge.net from 213.197.162.99 cause and error) X-PHP-List-Original-Sender: tokul@users.sourceforge.net X-Host-Fingerprint: 213.197.162.99 avilys.eik.lt Linux 2.6 Received: from [213.197.162.99] ([213.197.162.99:50566] helo=avilys.eik.lt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/48-13597-1F8B8B54 for ; Thu, 25 Jan 2007 09:04:34 -0500 Received: from avilys.eik.lt (avilys.local [127.0.0.1]) by avilys.eik.lt (Postfix) with ESMTP id D5E121F5147; Thu, 25 Jan 2007 16:04:26 +0200 (EET) Received: from avilys.eik.lt (avilys.local [127.0.0.1]) by avilys.eik.lt (Postfix) with ESMTP id B7DA91F5145; Thu, 25 Jan 2007 16:04:26 +0200 (EET) Received: from 195.22.180.233 (NaSMail authenticated user tomas@topolis.lt) by avilys.eik.lt with HTTP; Thu, 25 Jan 2007 16:04:26 +0200 (EET) Message-ID: <40869.195.22.180.233.1169733866.squirrel@avilys.eik.lt> In-Reply-To: <45B8B2E5.4010204@zend.com> 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> Date: Thu, 25 Jan 2007 16:04:26 +0200 (EET) To: "Antony Dovgal" Cc: internals@lists.php.net User-Agent: NaSMail/1.0 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] Re: PHP 5.2.1RC3 Released From: tokul@users.sourceforge.net ("Tomas Kuliavas") >>>> 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. -- Tomas