Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122275 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 14936 invoked from network); 2 Feb 2024 09:15:37 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Feb 2024 09:15:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1706865387; bh=3M3P1CdIcVhoLqsJliz/R2EZgkdMgyOYtlBNAv+0bww=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DfXsmbfShtJ939RV7SdUbYFBiCvKJqaA+TK5uj3aRxUROvZl7uLRR/SedbsByAPfX qEo80Xn3vUoEhkXc2bzfi2oNGbia8N8b965eG2M8ElUHM1wNAKibS3nkndc9vqLllN J1F4T3JJbWhgdr7fNqlB0eEG+1waek5D4zFXqVqvPgRLafK/apQtWm6cvKqEqWKHkc 37fICwpuX7HgZAtrIZ/XVEIU5GBEP4N5qd9glGBpLV3cvZ8MolX8VydmTNAwOvHVpy o1AscG2aYo5bXY7ZshQswXMCBVqlVurkMXmVNtZHvDB9TZaVBySBQxOThf+lIXR01h wxQItMOa2QQOA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8F38A180048 for ; Fri, 2 Feb 2024 01:16:25 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from forward502a.mail.yandex.net (forward502a.mail.yandex.net [178.154.239.82]) (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 ; Fri, 2 Feb 2024 01:16:24 -0800 (PST) Received: from mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net [IPv6:2a02:6b8:c15:2c95:0:640:f90:0]) by forward502a.mail.yandex.net (Yandex) with ESMTPS id AB08A60BC8 for ; Fri, 2 Feb 2024 12:15:30 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id SFYiIFBn6Sw0-ly5iU01R; Fri, 02 Feb 2024 12:15:30 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=php.watch; s=mail; t=1706865330; bh=4T80/X4uFq4MdTC/QPUHpwwUerzIvuz/3ARvnqB644Y=; h=To:Subject:Message-ID:Date:References:From:Cc:In-Reply-To; b=qgSAWG5czdE5bG9gFT73kX7I4uAXq4408ffIJrUHEpnVOOxVcbgjrKLxzcXeU3a96 0hShF+uFzzRTN9sSwo4AR9LDZwTucHekF3ZRYfaI037g/6r0TvIGc9s/OR6EGKWJF3 vZKaWGUzZwmGHHTOUUE6+zhiTovPqndfsEgzmZcA= Authentication-Results: mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net; dkim=pass header.i=@php.watch Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5113a8ab4ceso50139e87.1 for ; Fri, 02 Feb 2024 01:15:29 -0800 (PST) X-Gm-Message-State: AOJu0YzdDxlSU+8V/pENWJfmIoSM0FyLIxNN1/z3QZyiLcyNOKwaIbea /U5LMBdU4guvl7pdfgrWQEDhIxY5iUGjvKDW94zweIO8CFNbqGUQabBqQxM/btVFC8ow7aNvojp 5PrFDx/uTNEQ0nnHbc+ubCnSXhA0= X-Google-Smtp-Source: AGHT+IG+p+AtqeXS7fjq6By/QQ6lxg+XXUll+zuGCIW+pI/i22QnyZ3T2aGI+FEThDCTzrNwYq/ycD7l9ZiD/OSPhRw= X-Received: by 2002:ac2:54a7:0:b0:511:38f6:14c9 with SMTP id w7-20020ac254a7000000b0051138f614c9mr392521lfk.61.1706865328813; Fri, 02 Feb 2024 01:15:28 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 2 Feb 2024 16:15:16 +0700 X-Gmail-Original-Message-ID: Message-ID: To: Lynn Cc: youkidearitai , php internals Content-Type: multipart/alternative; boundary="0000000000009a7de30610628d6e" Subject: Re: [PHP-DEV][VOTE][RFC] mb_ucfirst and mb_lcfirst functions From: ayesh@php.watch (Ayesh Karunaratne) --0000000000009a7de30610628d6e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > On Fri, Feb 2, 2024 at 2:00=E2=80=AFAM youkidearitai > wrote: > > > Hi, Internals > > > > I have just opened the voting "Multibyte ucfirst and lcfirst functions" > > RFC. > > https://wiki.php.net/rfc/mb_ucfirst > > > > Voting will be open until February 26th, 2024 at 01:00 UTC. > > > > Cheers > > Yuya > > > > -- > > --------------------------- > > Yuya Hamada (tekimen) > > - https://tekitoh-memdhoi.info > > - https://github.com/youkidearitai > > ----------------------------- > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: https://www.php.net/unsub.php > > > > > In the proposal part is mentioned "From what I've researched with Unicode= , > it may not behave as expected in some languages. In that case, please dea= l > with it in userland.". If my understanding here is wrong, please correct > me. ucfirst and lcfirst are to uppercase/lowercase the first character of= a > word for characters that have an upper/lower case variant. Whether or not= a > word _should_ have an uppercase or lower case character is not important > and currently doesn't behave in such a way for ucfirst and lcfirst. To me > this isn't unexpected behavior, that's exactly how I would expect it to > behave. > I think the author refers to the potential edge cases in certain Unicode mappings. There isn't an ucfirst mapping, but there are uppercase and titlecase mappings. Unicode titlecase mapping is different from uppercase mapping. This PR seems to be using uppercase mapping. This should not matter for a vast majority of characters, except for ligatures and digraphs. I'm not at all and expert in these edge cases, but I just wanted to put my two cents forth that I personally think using titlecase mapping on the first word would be the more appropriate approach. Thank you. > --0000000000009a7de30610628d6e--