Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125012 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 5727E1A00BD for ; Sat, 17 Aug 2024 00:13:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1723853716; bh=OyTuU+dhx/Rrj177SPZIkrC08oGUhr8nVC/8zUBToiQ=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=YZVGTwsAubsMv1/ABv5xhqXNBv/UUsYCSayYEIuJOg7VEi9hoQ1tAc0q3lEcwCJAi jhzXglJ2jSDZMNUCBmfI6VPrP55pYQGDPo+Deg6tRETzNGYTHXw90wPvJf5AsSsdOw PBzE4TMjVnkUHvCJTpL1rBNAjjWCNfoLaoi75RHSjvNJEK/BPr2wvXE1FmdXSY9KcL Riczx35VxNbmDprlCG9qxeO/YkQ6P7F1BPNVc41RyylRDbl+jw70pN3540tcU3ADW2 4TJ5BPKxAZSMatQYMuVXG5g7+r/1WjgTgVPDRb/7tfH+Vepw7Ors3on7LvhFnGMoyB h+6+en2IDoqeQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D9D2618007C for ; Sat, 17 Aug 2024 00:15:15 +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.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (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:15:15 +0000 (UTC) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-6b3afc6cd01so5753477b3.1 for ; Fri, 16 Aug 2024 17:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20230601.gappssmtp.com; s=20230601; t=1723853607; x=1724458407; darn=lists.php.net; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Mmy7/Ib+CMnLObrSfL5iKtNtRBK/JUAB7KydWcW3yOM=; b=la+RiYgIu/clOnVX2+U4mke5+MakqO2UG8TNTGg/piStVS8cmOOmoIfLokPIqjrls5 AG05OBF5jFX7FiacYdOWI5VfxGf1Bn4DRQ3actZRRy06tug9Cq6AM+PDK9zWR72Ry/xg ZFIBIZtqYyHrpZ/eQ6I7No6NAqtUdu/n5A26bcoL9qbFk/lYi/qvbta7kAjhhXkE050C Y8PsBWCEdIIjvnb57sILR8EyOxks95mLFFEf62JNOaWg+/CdwZH6bObU00KfSmDTUeYG K18BiFLoKjiOQh5rY0W1NW14Qgblxtj4xydNNqZ2/aRMW2EXFtIu5KWfbSX269ApoAY3 8dDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723853607; x=1724458407; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mmy7/Ib+CMnLObrSfL5iKtNtRBK/JUAB7KydWcW3yOM=; b=KYT8k704llZ3sdyCiUImcCpudtSXprCyQILvIQegDZiWy7Gfm4PvSYu/vlAerdhW0S oOC5iVYoXEeOaxgIOhh1ruQNIS/wPC3Bw/6Tnj4R8UdWRfBHCmUp0F3VYwcZv3ntqwJ9 tRteCQoAieToGrWxnbLLxnw4eBJb1EvuhXrko7DXGFFKGKP9D8sSPDo08XaIEaI+kUEJ 6GvMjoANbtPMB67kpzuZ32S9idW4ZFvWjPSCWe2R46UdGyQwe5Ehl+gP3bqFVpkUncE3 NO4S2htVk0rPNJe+KWcTCfwrhgdtu6Rq49ZSSKWaW4o/xgVXYxzfaPzv3OKZbUo/6NEf zZ3Q== X-Gm-Message-State: AOJu0Yzry4Ru9Ssgpo0uMEoQQR2aWtkmHODyWxmHakTskYm4Y2bdeASz TeJ3Mf2pAiFDD7Mj012UyWSajPF2RcWPz5AQz/cHd9RhhykroFNH8xyRplJDCDAn0/41fEAyWgo pOKY= X-Google-Smtp-Source: AGHT+IFkWCzdjLKr7uJgi+Wh1GwDQZm5UnBqNGcgdU5D9+Fc3OuC6T28/553RBLNol2dUSWGNTuIpQ== X-Received: by 2002:a05:690c:2b91:b0:64a:8adc:f978 with SMTP id 00721157ae682-6b1efa2e4b7mr27204447b3.12.1723853607223; Fri, 16 Aug 2024 17:13:27 -0700 (PDT) Received: from smtpclient.apple (c-98-252-216-111.hsd1.ga.comcast.net. [98.252.216.111]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6af99506e53sm8120667b3.2.2024.08.16.17.13.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Aug 2024 17:13:26 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: [PHP-DEV][Discussion] Should All String Functions Become Multi-Byte Safe? In-Reply-To: Date: Fri, 16 Aug 2024 20:13:26 -0400 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <177155F3-8D62-4F5A-A908-0D0F717DFF1B@newclarity.net> References: <1AFE8300-D363-43D8-A989-15D001B9879C@newclarity.net> <270D6057-626D-4720-B44A-3CB7A7B9320B@newclarity.net> <37013714-371C-4871-9E15-FE91657A662B@newclarity.net> To: "Rowan Tommins [IMSoP]" X-Mailer: Apple Mail (2.3696.120.41.1.8) From: mike@newclarity.net (Mike Schinkel) > On Aug 16, 2024, at 8:02 PM, Rowan Tommins [IMSoP] = wrote: > On 17 August 2024 00:25:13 BST, Mike Schinkel = wrote: >> I am not sure I agree with you that adding Unicode support is the = wrong angle, per se.=20 >>=20 >> A strong argument could be made that Unicode support is a necessary = but not sufficient building block for "internationalization support." = IOW, if you want to get to the latter it is probably a lot easier to = start with the former as the scope of the latter is by-nature larger. = After all, perfect is the enemy of the good and waiting for a full-press = effort for internationalization support could well push off Unicode = support long down the road. >=20 > Again, that's not really what I intended to say, but I'm probably not = expressing myself clearly. >=20 > I was thinking about the way we frame the conversation, the words we = focus on, and how that shapes the conversation. >=20 > The example that keeps coming to mind is = password_hash/password_verify. It seems to me that for years, the = conversation was framed around "cryptographically safe hashing = functions", and teaching users why and how to use powerful but confusing = functions like hash() and crypt(). Then it got reframed from the point = of view of a web developer wanting to implement logins, and we ended up = with fantastically easy to use functions.=20 >=20 > In the same way, I think "Unicode support" should be the awkward = background work that we do *because we're trying to solve specific = problems involving text*.=20 >=20 > 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 = contextually appropriate ways to ensure various types of safety and = security". The implementation of that involves a lot of technicalities = about how Unicode works, but ideally we want to find meaningful = abstractions of those technicalities, 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 = direction since Unicode support is a building block of solving specific = problems involving 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.=