Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122276 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16974 invoked from network); 2 Feb 2024 09:27:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Feb 2024 09:27:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1706866108; bh=+NkeDbbuTdpMXaZJFLSGCfpdTOAW8cbdH6753Arkato=; h=References:In-Reply-To:From:Date:Subject:To:From; b=SQ21UXPCsyAWRojEg7EfUMBD52bUGRos87i4tFo+UQz0Cyx+5peuTqCwP6Rl2srGD Da1kfivxpkL0v863ceaFwOBsB7tDiB6OUthkllZHGG3xM+9HeGJumo1icowAU9c9Xa oEWWa54w3kAwhy6JH0T5yU9Mr8q3nG0qmJDiZP8O1z0JE5zQCu7SMEFMKJz4/HUl6C Euw8p+GCNH6cm+vT2DZkeqprX8CjE1W1SXzNAFKzWQMJ2Wo9lb1rv7tYAfZ8GiSreu oxzidiN6D2gyRiMq/1J9AXZ1mzwEs/sYjfclxdintJ/tKsFLsHbRYANpC9wIgsmz69 VxQzKrCa+0keQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 67223180057 for ; Fri, 2 Feb 2024 01:28:27 -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=-3.1 required=5.0 tests=BAYES_00,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-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (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:28:26 -0800 (PST) Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2d05b06b5f9so21991401fa.3 for ; Fri, 02 Feb 2024 01:27:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706866055; x=1707470855; 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=t7UCDV816Awpbm3V+nSG+DcW60+Up+2xaGoxJpcKwTU=; b=Ouq6bItZDSwmcta+w7aFrLIdEKfUsMPespZERiu6QHTH6siIMve/Ucf3I8NZcDZqDE S/vxQLda65EZeT9mO7YL++oCix3KWVgSgrDdW2jrGKb9nCfJjpfSrnZDf3/pbdEge8Ql lhIeqdIj2GE6eqjvxz5tKJE4Yqh8SKILv2k68vKPBMN8+vFrf5FqRxkjhbbbF5y8a78p ReO4eBBrcUfWEBrvT7U7F/Q2KBXAiyMEoJLr6lxKNrl4q+uslSh28eqJsAdBt1oFCBn7 oftJnne1AQFS8+Q+kt3hFHyrplzwgCK/TMGo5ot9IDqhXCzy8JYoITKaGXX16LJPeDL6 C6vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706866055; x=1707470855; 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=t7UCDV816Awpbm3V+nSG+DcW60+Up+2xaGoxJpcKwTU=; b=Yss6gOu46Jmyxe1gGXlj9HcF3MzMGUZBS8QH45bsqkXqx86GYpPt7KpG70Bv1mEr0W OFyywQPWr/K+SfFYQXB/hzp9bSfTrVRxPr4y5ST0j1pGOUJ3k9QrneWfIqwj1yFZa0+H RkTH7JtzyfZDrZzLulwIajAKQzZHcz/JRvCsvgFZWMNYRgX02wcTwNwj29Tm73MnLyy2 n0GGxyYv3ZPkn+0qw5OpAYYbxVsbL/rn4txPRM0RYPhKtOpN+KvTwRIBTFXYUsoKxsfK d4oI5WFkmFqdpyIdUahJrhFXXTbcNYRIMrbNUdgdr64ZglUGYBhtmuTj+7AMIZ8J4Xuc PQbQ== X-Gm-Message-State: AOJu0YwrFLrCbz5GFnpBXW6ZuoX2cGcr2ckLkCu7wze02uodB1CL1j/n WdqmAfKJf/X67c9NhX9qZOty8fKyrjm2zu8xVgMhgllwfZFl0eClSufKKtRYFHeWHWgT/GS8+w9 fK/Rnaa8DNrE2vEu+2T9H9WXgoY+mlA1cNA== X-Google-Smtp-Source: AGHT+IHNpvqt+B9j/A25Z7X1fOyKjmGU/QCnRJzxnEgmH3nBIkgjeXIwghYtaw0Mq/rC6hjBp3eqdo2xSRy9j6FkQhs= X-Received: by 2002:a2e:910c:0:b0:2cf:4b6d:3629 with SMTP id m12-20020a2e910c000000b002cf4b6d3629mr905237ljg.9.1706866055293; Fri, 02 Feb 2024 01:27:35 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 2 Feb 2024 18:27:24 +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=882=E6=97=A5(=E9=87=91) 18:15 Ayesh Karunaratne : >> >> 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 Unicod= e, >> it may not behave as expected in some languages. In that case, please de= al >> with it in userland.". If my understanding here is wrong, please correct >> me. ucfirst and lcfirst are to uppercase/lowercase the first character o= f a >> word for characters that have an upper/lower case variant. Whether or no= t 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 m= e >> 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 titl= ecase mappings. > > Unicode titlecase mapping is different from uppercase mapping. This PR se= ems to be using uppercase mapping. This should not matter for a vast majori= ty of characters, except for ligatures and digraphs. > > I'm not at all and expert in these edge cases, but I just wanted to put m= y two cents forth that I personally think using titlecase mapping on the fi= rst word would be the more appropriate approach. > > Thank you. Hi, Thank you for reply. > > 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 titl= ecase mappings. > Yes, Ayesh is right. This is a text that is the result of investigating edge cases. > I'm not at all and expert in these edge cases, but I just wanted to put m= y two cents forth that I personally think using titlecase mapping on the fi= rst word would be the more appropriate approach. I see. I'll change mb_ucfirst using titlecase. Thank you. Regards Yuya --=20 --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------