Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122770 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 qa.php.net (Postfix) with ESMTPS id 0285F1A009C for ; Wed, 27 Mar 2024 00:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1711500523; bh=lDuTcXGqJvAOuiT3JVKIJ+fMw/TH10Ek7pLFwPSxeo8=; h=References:In-Reply-To:From:Date:Subject:To:From; b=bimc+Y3yasVtxNGcjZnPLvlrgaqCaEp7qJy3bgmeg3HhezPKTlg2vI1C33jtami2b fUqdovMKsjjE2WLUtc+RTsHwhwt6ct0Hnci3vnk0KDfluqvYsw0TxwgJrEDyMBZRa5 F32RTcV2NMLBt1PYQBWTxAPIHcHc8KQB88hXq5I3pViAMzKBaBOS3bVMlUNCPQDyXb HT6ejAA5zxgCaNHnIWL8KLScwBF4hyONI8IGupZzDJKdjnYcVqbjyaWrUFmZ0jtELT 932k5nZQ89S5158XDsv1KoGhA4J86WQXSgLsiT1uKln5Ba2h3Vw2tVwVZzGAzxwNWE P7REdxqccau6w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DB58F180340 for ; Wed, 27 Mar 2024 00:48:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,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, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 ; Wed, 27 Mar 2024 00:48:41 +0000 (UTC) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4148d1b4a26so9767265e9.1 for ; Tue, 26 Mar 2024 17:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711500495; x=1712105295; 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=IVNLfzrQH5eyp43hfKZcrIp6JvcYPtN9DfjzK3hebmY=; b=HTn9b+EG+vcQ2o8fwx4Ckc+gPrAtLLyEP7LBWa5SeNxzimb1B/xv5HrkRo7dRoFReV CtgXE5g7xxCTY7SJWMyfGIvxiB55xjzcZ1Vursehs4jc+F/SC58E1fMRVplTS0u8wkRa bq7cjxZvNI+9lSjkYc55WrP5XXNnd46n8DG4824oZOh9nSNIEHfTTeSbWGf50Xb1DPeq xCVXqR6H+zx9b9Q06a5Bj1B72VCI11QzTs+g70FmkRJIb60ArCHM6tnXeIXUMdPHbZzy er0KRteipL90S3P4g/LKmfMXBS2MvPIRHotL5K3Rw+RwLasMJmk9xcrNMbDDG4Np8oZO rSVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711500495; x=1712105295; 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=IVNLfzrQH5eyp43hfKZcrIp6JvcYPtN9DfjzK3hebmY=; b=DcGZweB+DTX19EvIbiDLqM1m4smeUI50gZhbesmEi6GlWer0Kc+zbKVhfRx25yOuYT j3Io3BMme37oudWmVIPypW8DBsm81DFX8+I938CMXfyySZGqbT5/KEi1y3OIAvxTvO1s JyoIHSsJFxYkfWlq1jYiy6VCWw1qVihc+YmaebnNAX8rsn6ISYAjoJJxclwYhjR7g+lL Sh9VVHqXc1oTqQUPhgWxUXMTaNodcUA3pSG5nUKA/xyE5C1azyp1FVadFkWqPYxwaFm5 Ah3D66N6yI2RiW4S076k0uhYb4wGdQO0DkyBsRu24a3FuztO1DmDYWf1U0cmu+9vvsDB HMjQ== X-Gm-Message-State: AOJu0YzPquxKrunJEwbwMoKcPEGisOncIK1vnYK1+nux+yzydOsrRaQl ozjDpRFyy7hhx6Z/7F1m2fcMBg/ZLQXadXY9NMp2S8cr4yulOFAMlxJUVHP6anMyg/FNoI8Ak3p dqI4IT2/wRCZHjmGdqQG1X9FLLfQ3Rlqw0eDV X-Google-Smtp-Source: AGHT+IFHe+E8r4mc5k0WNf1m/04W9grOtQpuWwmSwwWeYbtV84jEcnhalPYBzmSMTWnNTI+zYmmTudt+DomHl894sJE= X-Received: by 2002:a05:6000:1c6:b0:33d:b376:8a07 with SMTP id t6-20020a05600001c600b0033db3768a07mr2153495wrx.8.1711500495494; Tue, 26 Mar 2024 17:48:15 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <141e31f3-b7cf-4bd1-9bac-c9ec078767ed@app.fastmail.com> <216d4a09-7921-48f6-b892-8d9605d367ab@app.fastmail.com> In-Reply-To: <216d4a09-7921-48f6-b892-8d9605d367ab@app.fastmail.com> Date: Wed, 27 Mar 2024 09:48:04 +0900 Message-ID: Subject: Re: [PHP-DEV][RFC] grapheme cluster for str_split, grapheme_str_split function To: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: youkidearitai@gmail.com (youkidearitai) 2024=E5=B9=B43=E6=9C=8827=E6=97=A5(=E6=B0=B4) 6:18 Casper Langemeijer : > > On Tue, Mar 26, 2024, at 18:15, Derick Rethans wrote: > > Many of these already exist, such as grapheme_substr. We can't simply cha= nge the behaviour of the already existing functions due to BC reasons. > > > Wow. I feel very stupid. I feel I should have known about grapheme_*, but= I didn't. Oh my, the manual says since PHP 5.3 no less. From what I've see= n around being used, I'm far from the only one though. In an attempt to jus= tify my own stupidity I searched its use and it's bad. > > Searching on github with language:PHP: > `mb_strlen` 84k files, `grapheme_strlen` 680 > > Then a big number of first 100 of these files are stubs/polyfills/phpstan= metadata. I've seen no framework except Symphony (but they might be furthe= r in the searchresults) > > The grapheme_str_split function, as well as other intl extension function= s is what should replace mbstring really. > > > YES! > > I'm sorry to have wasted your time. If you need someone to help for the g= rapheme_ marketing team, let me know. Hi, Casper I think still useful mbstring functions. Because mbstring functions is still valid as a bridge to non-Unicode character codes. We think it makes sense for mbstring to calculate in Unicode code point uni= ts. Therefore, I think make sense that separate mbstring functions and grapheme functions. Regards Yuya --=20 --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------