Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61122 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10261 invoked from network); 11 Jul 2012 09:56:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jul 2012 09:56:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=thetaphi@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=thetaphi@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 188.138.97.18 as permitted sender) X-PHP-List-Original-Sender: thetaphi@php.net X-Host-Fingerprint: 188.138.97.18 serv1.sd-datasolutions.de Received: from [188.138.97.18] ([188.138.97.18:48791] helo=mail.sd-datasolutions.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/84-01957-5ED4DFF4 for ; Wed, 11 Jul 2012 05:56:54 -0400 Received: from VEGA (port-92-196-51-162.dynamic.qsc.de [92.196.51.162]) by mail.sd-datasolutions.de (Postfix) with ESMTPSA id C474414AA07E; Wed, 11 Jul 2012 09:56:50 +0000 (UTC) To: "'PHP Internals'" Cc: =?iso-8859-1?Q?'Johannes_Schl=FCter'?= , "'Nikita Popov'" References: <4FFD11C1.3090007@sugarcrm.com> In-Reply-To: Date: Wed, 11 Jul 2012 11:57:16 +0200 Message-ID: <003201cd5f4b$8d9c9e90$a8d5dbb0$@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQILXjTkvewDxr2PXw3nmFoWqNoJ2AGG3kxDlpuiW6A= Content-Language: de Subject: RE: [PHP-DEV] bug 18556 - tolower & locales From: thetaphi@php.net ("Uwe Schindler") Hi Nikita, That was my first problem with the code, too! I would make the Zend engine use the ROOT Locale for PHP's language = parsing (in Java it's called Locale.ROOT, in C it=92s the Locale named ""), so = its invariant to local settings but works correct for all of Unicode. In = theory, this "case insensitive matching" should *not* be done by lowercasing, in Unicode the correct way to do it is by "case folding", which is = something different (but using the ROOT locale has almost the same effect). In = general methods like Java's String.equalsIgnoreCase(String) do this internally. I don't think ASCII-only lowercasing is in-compatible to the allowed PHP identifier characters used by class names and what else. Uwe ----- Uwe Schindler thetaphi@php.net - http://www.php.net NSAPI SAPI developer Bremen, Germany > -----Original Message----- > From: Nikita Popov [mailto:nikita.ppv@gmail.com] > Sent: Wednesday, July 11, 2012 11:41 AM > To: Stas Malyshev > Cc: PHP Internals; Johannes Schl=FCter > Subject: Re: [PHP-DEV] bug 18556 - tolower & locales >=20 > On Wed, Jul 11, 2012 at 7:40 AM, Stas Malyshev = > wrote: > > Hi! > > > > I've prepared a fix for bug #18556 - see > > https://github.com/php/php-src/pull/126 > > A slight complication there is that for internal operations we > > probably want locale-independent lowercasing, while for regular = string > > operations we probably want to stay with locale-depenedent one. = That's > > how I implemented it, even though it adds a bit of complexity, but I > > think it's the best way to solve it. Any comments/objections/improvements? >=20 > With this patch, will it still be possible to use foreign class names correctly? > Like writing them in Russian and expecting the case-insensitivity to = work > correct? >=20 > Nikita >=20 > -- > PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: > http://www.php.net/unsub.php