Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106049 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 58700 invoked from network); 25 Jun 2019 00:57:06 -0000 Received: from unknown (HELO mail.apserver.co.uk) (85.119.82.103) by pb1.pair.com with SMTP; 25 Jun 2019 00:57:06 -0000 Received: from localhost (localhost [127.0.0.1]) by mail.apserver.co.uk (Postfix) with ESMTP id 509F64F4064 for ; Mon, 24 Jun 2019 23:12:57 +0100 (BST) Received: from mail.apserver.co.uk ([127.0.0.1]) by localhost (server2.alteredperspective.co.uk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FVmP2NaLpPkp for ; Mon, 24 Jun 2019 23:12:55 +0100 (BST) Received: from [192.168.0.8] (cpc113420-maid7-2-0-cust1808.20-1.cable.virginm.net [86.18.119.17]) by mail.apserver.co.uk (Postfix) with ESMTPA id 603204F4061 for ; Mon, 24 Jun 2019 23:12:55 +0100 (BST) To: internals@lists.php.net References: <8442f1fa5544b2ca03e7cebbc64e8e5c@wkhudgins.info> <683c5da474e13283030cac3d0c0ec080@wkhudgins.info> <2c37999d1e5372ae6ab48bfce5420796@wkhudgins.info> <2CF672F8-12F5-4D37-8B8C-591A6E695220@benramsey.com> <3E2100B1-7BF7-4C9F-AA77-D82924A2D5FC@gmail.com> <8CFCFE96-E2B7-456B-85A3-8737754C59D6@benramsey.com> Message-ID: <9751de5e-420a-56f2-dec9-3e3d58945e79@allenjb.me.uk> Date: Mon, 24 Jun 2019 23:13:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] [RFC] Desire to move RFC add_str_begin_and_end_functions to a vote From: php.lists@allenjb.me.uk (AllenJB) On 24/06/2019 10:28, Nikita Popov wrote: > On Sun, Jun 23, 2019 at 5:46 PM Nikita Popov wrote: > >> On Sun, Jun 23, 2019 at 5:30 PM Ben Ramsey wrote: >> >> The reason why this doesn't work is that mb_stripos internally >> performs a >> simple case fold, while a full case fold would be needed in this case >> (Turkish i is hard). It's a bit tricky due to the need to remap character >> offsets. >> > I've implemented use of full case folding in > https://github.com/php/php-src/pull/4303. While doing that I kind of > convinced myself that we probably shouldn't actually do this, because it > breaks simple mb_stripos loops in a subtle way. It probably makes more > sense for people to explicitly call mb_convert_case($string, MB_CASE_FOLD) > and then operate on the resulting strings. Both much more efficient, and > avoids offset remapping issues. > > Nikita If these functions (mb_stripos and any others affected by the same issue) are not the recommended way, and may not act as users expect, should they be deprecated? Or at least notes added to the manual pages regarding this behavior / the differences between the different methods? AllenJB