Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27654 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29659 invoked by uid 1010); 25 Jan 2007 15:20:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29644 invoked from network); 25 Jan 2007 15:20:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jan 2007 15:20:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 64.233.166.176 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 64.233.166.176 py-out-1112.google.com Linux 2.4/2.6 Received: from [64.233.166.176] ([64.233.166.176:8915] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/9E-13597-3DAC8B54 for ; Thu, 25 Jan 2007 10:20:52 -0500 Received: by py-out-1112.google.com with SMTP id a25so250411pyi for ; Thu, 25 Jan 2007 07:20:49 -0800 (PST) Received: by 10.35.17.12 with SMTP id u12mr4124414pyi.1169738448876; Thu, 25 Jan 2007 07:20:48 -0800 (PST) Received: from ?192.168.1.151? ( [204.101.63.110]) by mx.google.com with ESMTP id x72sm1822566pyg.2007.01.25.07.20.48; Thu, 25 Jan 2007 07:20:48 -0800 (PST) In-Reply-To: <000a01c74093$b03dd180$0100a8c0@pc07653> 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> <3ED37F9A-9BC8-4BBA-BB85-77BB0B188074@prohost.org> <000b01c74090$60bce950$0100a8c0@pc07653> <017A7F13-255C-4C7E-B22F-7481CCE07BAB@prohost.org> <000a01c74093$b03dd180$0100a8c0@pc07653> Mime-Version: 1.0 (Apple Message framework v752.3) X-Priority: 3 Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-ID: <0EFF1969-038A-4F67-872C-674B99E75009@prohost.org> Cc: Content-Transfer-Encoding: quoted-printable Date: Thu, 25 Jan 2007 10:20:45 -0500 To: Nuno Lopes X-Mailer: Apple Mail (2.752.3) Subject: Re: [PHP-DEV] Re: PHP 5.2.1RC3 Released From: ilia@prohost.org (Ilia Alshanetsky) PCRE should operate in UTF-8 mode. On 25-Jan-07, at 10:15 AM, Nuno Lopes wrote: > So are you saying that php will automatically issue setlocale() calls? > e.g.: > i18n_loc_set_default('pt_PT'); // or whatever that is called these =20 > days > //now it magically calls setlocale('pt_PT', 'pt_PT.iso8859-1', =20 > 'portuguese'); -- linux/bsd/windows > > echo preg_match('/^\w+$/', "=E0=E1=E3=E7=EA=F5"); //prints 1? > ?> > > >> Nuno, >> >> The idea is that while internal libs will use it, PHP will do all =20 >> the user-locale handling internally. >> >> >> On 25-Jan-07, at 9:52 AM, Nuno Lopes wrote: >> >>>>> PHP needs locale insensitive strcasecmp() or your developers =20 >>>>> will continue >>>>> hitting string comparison issues in Turkish and Azerbaijani. =20 >>>>> Ilia patched >>>>> it in timezone parsing code. Some day other strcasecmp will =20 >>>>> pop in other >>>>> place. >>>>> >>>>> Switching locale everytime you want to compare strings is a =20 >>>>> hack and not a >>>>> bug fix. >>>> >>>> Its a solution that works. There are very few instances where =20 >>>> such behavior is needed and in php6 it won't be relevant anyway =20 >>>> since posix locales will not be used. >>> >>> This is not true at all.. I even think this is a big =20 >>> misconception of PHP 6. >>> Although this has nothing to do with the issue mentioned above, =20 >>> we will still need setlocale() in PHP 6 because of externals =20 >>> libs. Even the bundled PCRE uses locales, and that is very =20 >>> handful (e.g. locale-dependent '\w'). So, POSIX locales will be =20 >>> deprecated for string handling, date formatting and such things, =20= >>> but they will still be used by external libs. >>> >>> Nuno > Ilia Alshanetsky