Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100658 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 625 invoked from network); 16 Sep 2017 08:57:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2017 08:57:33 -0000 X-Host-Fingerprint: 62.31.75.76 76.75-31-62.static.virginmediabusiness.co.uk Received: from [62.31.75.76] ([62.31.75.76:12018] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/DA-19300-C77ECB95 for ; Sat, 16 Sep 2017 04:57:33 -0400 Message-ID: <90.DA.19300.C77ECB95@pb1.pair.com> To: internals@lists.php.net References: <3D.0C.10715.383F8B95@pb1.pair.com> <09.43.19300.8E659B95@pb1.pair.com> <73.F9.19300.7AA4AB95@pb1.pair.com> In-Reply-To: Date: Sat, 16 Sep 2017 09:57:29 +0100 Lines: 1 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3564.1216 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3564.1216 X-Posted-By: 62.31.75.76 Subject: Re: [PHP-DEV] Deprecate and remove case-insensitive constants? From: TonyMarston@hotmail.com ("Tony Marston") "Rowan Collins" wrote in message news:A7FFCE81-74E5-47D0-9EBF-9BDC90E2E957@gmail.com... > >On 14 September 2017 10:23:48 BST, Tony Marston >>Would this problem disappear by using UTF8 instead of the Turkish >>character >>set? If so then ten no other solution would be required. > >No, the problem has nothing to do with character sets, but with the actual >alphabet that humans in Turkey use, which doesn't follow the same rules as >the alphabet that American humans use. > >Unicode (the standard, not the character set or any of its encodings) has >an algorithm / lookup table for "case folding", because "convert everything >to lower case" is not a reliable way to produce case insensitive >comparisons. Using that correctly world presumably solve this particular >problem. > >The bottom line is that case sensitive comparisons are easier than case >insensitive ones. A programmer's job is to write software which makes life easier for his users, not to remove features which his users are used to just because it is "more convenient" for him. While the vast majority of characters in any character set have a one-to-one mapping between upper and lower case, there are exceptions. I have been writing software for several decades, and I have come to know the 80-20 rule which states that 80% of the code is for "normal" circumstances while 20% is for the exceptions, yet coding for the "normal" circumstances takes 20% of the effort while the exceptions require 80%. It is the programmer's job to deal with these exceptions, so to say that it's not going to be done because it is not easy is a very poor excuse. -- Tony Marston