Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128028 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 6A6B31A00BC for ; Mon, 14 Jul 2025 10:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1752488466; bh=+uPgsj+NXXLoHqjT6eMyTLIz+bo02MpwjMjnESztKS8=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=cKEzk7rXQfCTxfgp5KCu76Qmj7p0IIZLIH4zV39VcoE5zmncnmPLNm75rsbnUttsf 7+zpekPfaz+BRDzDz2OVzlV1xyNaa07l0iEkdYVplQIp/oR3sblPwB5cLU/27FvSNG 8P8jPNGYJzwWWMS88FXrmz8wJl7GDOEr6OApIXwr8uZmqGn6mx5kX1dZnu2x/ogVKm a/ZuxQ70xdZF5xmHdnWiK4j5DdEmS3cm0Jht6UyHBmdJNgD0eyojp4oQYKlAuAGmI2 fC96gk+V9bj8ZK+5UjHQ6AwkPYphQN9sq7J9QK50TUV6/jfcVGiCriGHac6X8+Ah71 akcVm/actj66g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 60F38180003 for ; Mon, 14 Jul 2025 10:21:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_PASS, SPF_SOFTFAIL autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) (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 ; Mon, 14 Jul 2025 10:21:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1752488572; bh=+uPgsj+NXXLoHqjT6eMyTLIz+bo02MpwjMjnESztKS8=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=Yy8n3gaF+JnyMeb7NhF3cWLdsYIKTG8vi8kHie+8JyndCBORgycWZtJbIbsExNiCn YoiOimIyWd6/oFvwopSnCZlSKeeu9+lilCzy3xUrQz5GTcebiqngTf82aq7r0+MU2C ZFoH0Z4cflDUKC5RjimEaBJ4E55UaLAbBcrCYTDRsr57ATQAhgZYR9g3dtDJzQbRUJ +smbOFBDZZHDtFqMmb7RxzEa+dwqknRu57DYYcGYvAaKZJ3tNTligtD2DpYHXq+Tji uoIE7v4h13xgWgqeZUlOmzCCJjkKG/LwikIYhm7h/+SmCmfSuo1QL/KAsW5UswnfES lU5auNYfAHYNQ== Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id D33FD10C033; Mon, 14 Jul 2025 11:22:52 +0100 (BST) Date: Mon, 14 Jul 2025 11:22:52 +0100 (BST) To: youkidearitai cc: php internals Subject: Re: [PHP-DEV][DISCUSSION] Add locale and strength for grapheme functions In-Reply-To: Message-ID: <3b7b0362-537e-5e2f-4345-63d0b7ef0964@php.net> References: Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-697925078-1752488572=:52945" From: derick@php.net (Derick Rethans) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-697925078-1752488572=:52945 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 9 Jul 2025, youkidearitai wrote: > Hi, Internals >=20 > I changed below the RFC. > - https://wiki.php.net/rfc/grapheme_add_locale_for_case_insensitive > Pull request is below: > - https://github.com/php/php-src/pull/18792 >=20 > Change point is below: > - Add a strength for grapheme_* functions > - Affect to all over the world characters, ex: Ideographic Variation > Sequence(IVS) > - Use Collator object const values. These settings are indeed important for these functions, but I can't get=20 around the fact that it makes these APIs really cluttered and=20 complicated =E2=80=94 something that many functions in the grapheme_ / intl= =20 extension already suffer from. Is this API really the best way? > $locale parameter is not change anything. Because I could not find any wa= y. It seems that I came to a similar conclusion, but locales are much more=20 complicated than just languageCode_regionCode (for example, see=20 https://github.com/derickr/php-text/blob/main/tests/text-contains.phpt#L25) You also don't really need a strength argument, as you can 'encode' that=20 in the locale name, like: 'nb_NO-u-ks-primary' (I know, it's rather ugly=20 and the list of options is vast:=20 https://www.unicode.org/reports/tr35/tr35-collation.html#Common_Settings cheers, Derick --8323329-697925078-1752488572=:52945--