Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122340 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30813 invoked from network); 8 Feb 2024 08:03:46 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Feb 2024 08:03:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1707379479; bh=LI4DjuCTr/Og6rxjh2Ggchfkt9vdt4zcKvqFmEw4HIE=; h=References:In-Reply-To:From:Date:Subject:To:From; b=VnSLjdMkyP0rnO4iGcVmGMLThUOjzhCecjTPGgde9I8AcB/uWV8rgNC7G5AZ56c6d 3jjAUgBu9sPiUflVMVo6l4Rjr+6uEmqFY6up52mpLepzfKCqlUgBvQdNT/axYfOSUO fsomuUGnYgEV3wRVge5JwGHCLDPIv3t3hXBIryL7XASZ2pSgY1mKAZFhZPAcEv6aHb G9Cl806uUPiDT0ZEaYAhLT/AEYeFE3Qk7/cA2awAfVB5UPMUtt7XovKUxYVXRJKBmz Ovji5fTAH80S2mUAHhcaufNm3zrS8+qkvlEEIVQckZHhLJxE5fkMiRcok4s19ZTlNX jwRZ+GOxzr4uw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 116BB180064 for ; Thu, 8 Feb 2024 00:04:39 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 8 Feb 2024 00:04:38 -0800 (PST) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5114b1e8819so2331542e87.1 for ; Thu, 08 Feb 2024 00:03:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707379424; x=1707984224; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LI4DjuCTr/Og6rxjh2Ggchfkt9vdt4zcKvqFmEw4HIE=; b=ZRsO3g+M5uKwabmjPF49g/mbB9xm7uuCZdii4uWxcrKMp1+w9x3DbeMCOI3LUoq6Xf Ud6yXWV+d9a2c1FvuOVSb45fbG99Xapx0e02iRhaiczPsE1bpAiEMe1dmKPOIfTkIUou vo59g/Hr2fClmjfIfbaanJuMha61Ez2DjG34nl4lSpgLgLEh9tNEvFPJbxubQAHfG+pQ FsCoNJKhTSWl9TGhP7WelxAkDZvN5xdDHvs9N8zUTLfWyMJDyPtziKvd/SANAq00kJLP fE4GW80vBWHaHdgUF4VpDSjopcICSMxccFccTgXsnKj+J838cscixJmdjmpjx6MR6WwO GqSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707379424; x=1707984224; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LI4DjuCTr/Og6rxjh2Ggchfkt9vdt4zcKvqFmEw4HIE=; b=PxmiycS3H3f118NLWG4sG9M/axgoh8niPTa1OVjieGNERXrC1Ui6a/jThDBeDQf9I2 YTHtdRR5A90UR2xBTpLyM0kBojwuc0HfQhkc54IwAynA9PPzG/ox53xjdpDlyRhICsjX N2h42ZjUxp8xEH1LuoeuN7pMbgU3Z1W3rKjuSGarU+lkTEI+ALbVLHX6O3dmg2cwMlXd H4BjzTl2d696uQ7TXM4ytcNzYP20TPXI8IsKMwB+mgpHpkRAxyuTJq9Je0qIbNnuweU5 1IKNiWODqpphyz6i1/VdLE9uQK8LYNQCPCETq+jcYj0ueXuE4DMd43FXvqUOXwEu0T0t D6SA== X-Gm-Message-State: AOJu0Yw2q1sW4MXzcOii+JV5KdF3zfEcaYtv22u0tEwechahCnSPR/Ku w8/wsBLLupknlMuAfctIX6Bv+UkHsGWVZ3PVZHVqWAuidNggryfgS1fTV9yEY7hIspVUNZSkBVL csQTFIGEM0uh7ON2Z7V6A2m5PvGQ0TLQ= X-Google-Smtp-Source: AGHT+IF9HsQ9YNPBz3Ub/T3PHQJnaXyazGVX3V8D37Ty93QqHSaa9w0fzJ13JRZh6ZVGFNSgWo5O3mdvd/+4Y3w4BHM= X-Received: by 2002:ac2:59c1:0:b0:511:5537:fb26 with SMTP id x1-20020ac259c1000000b005115537fb26mr6633807lfn.39.1707379423569; Thu, 08 Feb 2024 00:03:43 -0800 (PST) MIME-Version: 1.0 References: <29b0a205-8903-4ae8-b1e4-45db846fee7f@wikimedia.org> <7e42d1eb-4924-4a57-a4c1-412a665a4496@wikimedia.org> In-Reply-To: <7e42d1eb-4924-4a57-a4c1-412a665a4496@wikimedia.org> Date: Thu, 8 Feb 2024 17:03:32 +0900 Message-ID: To: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV][VOTE][RFC] mb_ucfirst and mb_lcfirst functions From: youkidearitai@gmail.com (youkidearitai) 2024=E5=B9=B42=E6=9C=887=E6=97=A5(=E6=B0=B4) 12:56 Tim Starling : > > On 7/2/24 13:43, Ayesh Karunaratne wrote: > > > > Hi Tim, > > Now that the RFC is restarted, could you mention some examples in > > Georgian that might be good test cases? > > > > I was thinking there might be some good test cases in Turkish, but > > couldn't find any. The RFC has examples > > (https://github.com/php/php-src/pull/13161) in Vietnamese, but they > > are correct for both "uppercase first character" and titlecase > > conversions. > > Any Georgian word would do. Your ASCII test case is "abc". The > Georgian equivalent for that would be "=E1=83=90=E1=83=91=E1=83=92" (ani = bani gani, U+10D0 > U+10D1 U+10D2) which should remain the same after passing through > mb_ucfirst(). Compare mb_strtoupper("=E1=83=90=E1=83=91=E1=83=92") -> "= =E1=B2=90=E1=B2=91=E1=B2=92" (U+1C90 U+1C91 > U+1C92). > > On the task I mentioned that ligatures are also affected. I gave the > example mb_ucfirst("=C7=89") -> "=C7=88", that is, U+01C9 -> U+01C8. You = could > add a test case for that. Compare mb_strtoupper("=C7=89") -> "=C7=87" (U+= 01C7). > > To repeat my rationale -- we can view ucfirst() either through a > technical lens (convert the first character of a string to upper case) > or through a natural language lens (convert a string to sentence case, > with the initial letter capitalised per local conventions). I am > arguing to make mb_ucfirst() be a natural language extension of > ucfirst(), because applying the technical extension would produce > results that look quite jarring in a natural language context. > > There are some edge cases which are not quite right. To really do a > good job, a new case map will be needed. But if we document it as > being for natural language, and set the right expectations, we can fix > the edge cases later. > > -- Tim Starling > Hi, Tim Thank you for Georgian test case. I added to test case. If other any comments, please feel free. Regards Yuya --=20 --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------