Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125013 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 70AE91A00BD for ; Sat, 17 Aug 2024 00:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1723855667; bh=b8XBW4ojPTqu6AJMXrSMzn0v+2K4YJp1KnJ8PkivwSM=; h=References:In-Reply-To:From:Date:Subject:To:From; b=Ala20k/XGf4B62A2bfRuQuQ+PSPfQlYKbWKl45oWBKOr9ivJfFzJdDtFpCJY3YKUy Wky9i8nMC+tL0bJDdRFDiJ0B0yaxZJb3B30hubGFVhz5su2HgzZNbnC3LqZYsSBnYF ZxnIha6b5qR23o2PwgSQKJ0GKkiafi7kwQSWldDtKfVywIwBzJJ+zKAodPUg+EWL9B DNVqOhWp548DjqGuVTMePzRwRMSAL4qCKUROCF5vR6rPh7TJmfpga1uGP55dnylF8j w32MC9AWl6YtENKzs4Ipl6fvmBJVTmNlWdAwLQAUrc1MFOZTXzoyHtpj+swGv6G2r+ SUGLyLoMh/o/Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D091D18006F for ; Sat, 17 Aug 2024 00:47:46 +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 autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 ; Sat, 17 Aug 2024 00:47:46 +0000 (UTC) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-428ec6c190eso19122585e9.1 for ; Fri, 16 Aug 2024 17:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723855558; x=1724460358; 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=b8AcBOV87/d/DFEJuJn3UFVPUpMg4Wr+s8tJg/E7EKQ=; b=CsW9rdMWxx0TAp1SVA4qDsAJb1d1gHrYwHX14Yi0mqjrU3VB/xjW0WVKEFOQQ+R6wO r5y0c3NtqwWEW6vbUiF9E2A+x1GDV53Oga4a2BtpDdu5Y9yPaQTwFCHfbHvEvTY3BUnP t1aSvcDqdSqxWeFKSUlMamOKsWXPgETQZ2IiF8flyJCR/RvpQbaftvK26Qcady2ypKQ3 6/UMR57RkiegKD3VpTJsqEFuC6gQ9Se2PtLWL6cVFjLdmcOszKhGDU1eYtwa4Db2E6b3 jTYY5aAhOI/38o4arhJaZf9Tn+LwWIJBUZVKoBzuCwnl79GPz+/PWh79bcsMwCOxu3pU NS4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723855558; x=1724460358; 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=b8AcBOV87/d/DFEJuJn3UFVPUpMg4Wr+s8tJg/E7EKQ=; b=nIt6eWL8gSBKPkt+1+NuGKVtdphLS9mS0YjVLmrdz/YGKoJ/S6vYf54aN8nhkIJ2dt 47wKcKvnnikDDK+t393PB0A6e3L+cIsiMkWF2RoS3XcicLwDTVKR+Na3pFSrdwIuo4qu b/72IFhu/l1y4j1aKnkH1rtTUrK+3qJuGP6IvocYa0e42mvsIoloQscreZWj5IJQeJsT /4xt/4oPswX84pPlGqKwmAXpT3RzAlQTTGWTwai9EoUn014WlXIWqx9C4CFBf0vgQ6Qm UOLlHC0pH7ytfYO7y/BYQh/dpl1e1J48bsP9BoxEtRuylVOUoSB3wPIDyJ8yVz2ixQ6W 0/7w== X-Gm-Message-State: AOJu0YxFY6fnbzp7oRB4VO0cTIfv2sFw50eGL2jfs7nkLl9HWB2ZBwmn m6S3FpLFN+jFvG+tTK1c3nTLD0xiPhdxEPeV1CojKFmFpL5utDY3kZAni4se14a1TpUthxL0Pkk yapjFevTJJhptOfo3RNlPlsmrMCLDDe0= X-Google-Smtp-Source: AGHT+IHnJRtfps/JtWlHF3pMRQPdqTrJFFNqDPorvZxBze2EZBG5Xos3ZJa8OLg/dEGHqaARebh0XsXmjKrz7GYgkYE= X-Received: by 2002:a5d:68c4:0:b0:36b:a3f1:6333 with SMTP id ffacd0b85a97d-371a73eabbfmr586066f8f.24.1723855557487; Fri, 16 Aug 2024 17:45:57 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <1AFE8300-D363-43D8-A989-15D001B9879C@newclarity.net> <270D6057-626D-4720-B44A-3CB7A7B9320B@newclarity.net> <37013714-371C-4871-9E15-FE91657A662B@newclarity.net> <177155F3-8D62-4F5A-A908-0D0F717DFF1B@newclarity.net> In-Reply-To: <177155F3-8D62-4F5A-A908-0D0F717DFF1B@newclarity.net> Date: Sat, 17 Aug 2024 09:45:45 +0900 Message-ID: Subject: Re: [PHP-DEV][Discussion] Should All String Functions Become Multi-Byte Safe? 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=B48=E6=9C=8817=E6=97=A5(=E5=9C=9F) 9:17 Mike Schinkel : > > > On Aug 16, 2024, at 8:02 PM, Rowan Tommins [IMSoP] wrote: > > On 17 August 2024 00:25:13 BST, Mike Schinkel wro= te: > >> I am not sure I agree with you that adding Unicode support is the wron= g angle, per se. > >> > >> A strong argument could be made that Unicode support is a necessary bu= t not sufficient building block for "internationalization support." IOW, i= f you want to get to the latter it is probably a lot easier to start with t= he former as the scope of the latter is by-nature larger. After all, perfec= t is the enemy of the good and waiting for a full-press effort for internat= ionalization support could well push off Unicode support long down the road= . > > > > Again, that's not really what I intended to say, but I'm probably not e= xpressing myself clearly. > > > > I was thinking about the way we frame the conversation, the words we fo= cus on, and how that shapes the conversation. > > > > The example that keeps coming to mind is password_hash/password_verify.= It seems to me that for years, the conversation was framed around "cryptog= raphically safe hashing functions", and teaching users why and how to use p= owerful but confusing functions like hash() and crypt(). Then it got refram= ed from the point of view of a web developer wanting to implement logins, a= nd we ended up with fantastically easy to use functions. > > > > In the same way, I think "Unicode support" should be the awkward backgr= ound work that we do *because we're trying to solve specific problems invol= ving text*. > > > > In the case of this thread, I think the actual user story is "I want to= allow users to enter a wide range of characters, but restrict them in cont= extually appropriate ways to ensure various types of safety and security". = The implementation of that involves a lot of technicalities about how Unico= de works, but ideally we want to find meaningful abstractions of those tech= nicalities, not just require every user to understand them. > > We are in no real disagreement there. > > -Mike > > P.S. I do think we could reach the same end-goal by taking either directi= on since Unicode support is a building block of solving specific problems i= nvolving text, and thus needs to happen either way. > > But, as I implied earlier, whichever road takes us there works for me so = no need for me to further bikeshed it, as long as the road we take will not= result in a dead-end. Hi, internals I added `grapheme_str_split` in PHP 8.4. I added this because I thought the function of grapheme function was missin= g. I think grapheme functions is still lacks functionality. I would like to add grapheme function. PHP's Unicode support is still not sufficient. I would like to strengthen PHP's Unicode support. After a while, I have plans I would like add RFC for Unicode functions. Regards Yuya --=20 --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------