Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119175 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11942 invoked from network); 16 Dec 2022 15:21:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Dec 2022 15:21:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EDA6B180503 for ; Fri, 16 Dec 2022 07:21:49 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 16 Dec 2022 07:21:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1671204107; bh=tBppB0s6vmmBeCHMq6G9tzfLMmxH8B/kXzvx4dvRoik=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=MghD/10XJMdzGMFFhpbBWsksJLtkfCb32Pla2pX+7YJBmKEYp+YDc0tnRxIvxu53E XbkKeFzjqPwNnzQbJiVS73YBlxnvgRi8/5SnShGvheV/0nVpSz29mcuWHl6EwR55+E MOYE1td3ygvXr2Rkk+I2v3g9c8HOordRc3L+i7YgcY8BqfvqujkKmV+QtSN6i5P7+x kElgE/7aNrHAeigoF4mXjPzzTkgQCqoZ3RShPI5lI/2UUYyAEix2Haxre0Zpltl1xe QSTnkOsWqWU28duM6uMlIFfOaoAecC8I2pwPGNK2mZhilXgrMFEPpGO69VqgjUWSu1 u28Pdt8xrEnzA== Message-ID: <24ba312e-5965-8b8c-2506-2db9767aa3d5@bastelstu.be> Date: Fri, 16 Dec 2022 16:21:46 +0100 MIME-Version: 1.0 Content-Language: en-US To: Derick Rethans , Sara Golemon Cc: PHP Developers Mailing List References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Unicode Text Processing From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) Hi On 12/16/22 14:28, Derick Rethans wrote: >> Question 2 is that class. I know folks have been clammoring for a >> `String` class for some time and this actually fills that niche quite >> well. A part of me wonders if we can overload it a little to provide >> a psuedo locale of "binary" so that users can, optionally, treat it >> like a more generalized String class in specific cases, storing a >> normal `char*` zend_string under the hood in that case. Possibly as a >> specialzation tree. > > An alternative could be to just have this as an implementation detail, > in case the associated locale/collation is C/root. Then nobody needs to > worry about it, *but* it would mean implementing everything twice. Which > I am not too keen on, especially because we have such a wide array of > operations on strings already. > I rather not see this either, because if a 'Text' object may contain binary data, the type safety is lost and users cannot rely on "'Text' implies valid UTF-8" (see sibling thread). Best regards Tim Düsterhus