Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120370 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 27463 invoked from network); 20 May 2023 15:13:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 May 2023 15:13:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8CCBE180505 for ; Sat, 20 May 2023 08:13:04 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-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,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=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 20 May 2023 08:13:04 -0700 (PDT) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-30644c18072so2769185f8f.2 for ; Sat, 20 May 2023 08:13:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684595583; x=1687187583; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=+8GuNuQMw7rdCKNFEg5A9MeUOWjPwLuyG6HbQEaa9Zk=; b=YfD2X8izRX56CwQvg7eQSvp13RNlL0IvB7kTpkE10NIJBse3zgvsFBUEUMsBeP+kjz pBXvVzwvrrTEtwG/ZoRg9VS87fDzla1x1Ha+R87RzJ1mPsTKKNcFwy5ASJb8CAk43A7y l1WtCLbROlZFWf/R4MCgl/6P58eE4Ls32LvisN9e0gGP+4Dg07fQZVEVUyLnDkcxQHDX +AxdMt3Ph2syy0G54Hh/tkXmW3fvzojFfjhtyvBxmLm16e17aqsGJuiGNPs7+UQZpH6k 8nT6mmId+1141q7MnQtZ/H95BEaal6GmuvrmvRPhk7H+W/4yo1+1ZLSVDKbjGdzURFxb aL/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684595583; x=1687187583; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+8GuNuQMw7rdCKNFEg5A9MeUOWjPwLuyG6HbQEaa9Zk=; b=S9iOcIJ3cXiye1RvuF1H1UvAaScm/KsG7Lx1zDLApZ8Db4+3/smWDXK5LKDyv0KaPP BF5bSS/vkN20aMIUIxa0Z3NVTVZDvmcT1v1E/VNAj3SSYwG9JkbytPSb3MnqryrC3LvP 04GBVGYdB6oY5BLfGqndQ2yFbF6wi9MlqZb/3dHuzjI92tRWMfqRjDHBl5n/J+/51/u9 MTVCfid8ST96txmNGWKf1FW/2jzexcwtWg/KQV6RVYrxQ9vbaH7D0BJx4uSMy7OzRNaz cg9HXYrYpOCcYtMzw2pfXzIP1vExXqWmI8ILB0y93ySRmMGNWXHbKmGXo1nmqLpsfEns Xpcw== X-Gm-Message-State: AC+VfDwxKCceEZPEFSpSXrVX7CTQyXnBnycQqCzcbpw3x+yflpIHTUr2 ddZhEUTRrTn1qNpyyvkg17Ej3126gZI= X-Google-Smtp-Source: ACHHUZ6qUz8D0o/kHpKSG8k74PS3Cd2I1FKv1NkaD9kvj62HZoel1bscUm/CZi+hTkJNyWGb8NYbRQ== X-Received: by 2002:a5d:594a:0:b0:2f7:c224:cd32 with SMTP id e10-20020a5d594a000000b002f7c224cd32mr3821658wri.10.1684595582832; Sat, 20 May 2023 08:13:02 -0700 (PDT) Received: from [127.0.0.1] (cpc83311-brig21-2-0-cust191.3-3.cable.virginm.net. [86.20.40.192]) by smtp.gmail.com with ESMTPSA id n7-20020a7bcbc7000000b003f318be9442sm5756472wmi.40.2023.05.20.08.13.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 May 2023 08:13:02 -0700 (PDT) Date: Sat, 20 May 2023 16:13:00 +0100 To: internals@lists.php.net User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC [Discussion]: mb_str_pad From: rowan.collins@gmail.com (Rowan Tommins) On 20 May 2023 13:53:20 BST, Niels Dossche wr= ote: >RFC: https://wiki=2Ephp=2Enet/rfc/mb_str_pad Hi Niels, This seems like a reasonable addition=2E My only hesitation is that it wil= l share with other mbstring functions the slightly dubious definition of "c= haracter" as "code point", rather than "grapheme", when dealing with Unicod= e strings=2E This is most easily demonstrated using combining diacritics, e=2Eg=2E "Fra= nc\u{0327}ais" is 9 code points long, but visually identical to the 8 code = point "Fran\u{00E7}ais" used in your examples=2E Unicode defines "graphemes= " or "grapheme clusters" to better match the common intuition of what a "ch= aracter" means=2E Perhaps we should instead, or also, add a "grapheme_strpad" function to ex= t/intl? Regards, --=20 Rowan Tommins [IMSoP]