Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78273 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86033 invoked from network); 23 Oct 2014 13:52:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Oct 2014 13:52:47 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:58704] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/57-41150-E2809445 for ; Thu, 23 Oct 2014 09:52:47 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 5E54F2400D1; Thu, 23 Oct 2014 09:52:44 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mgnxpgMjiOYJ; Thu, 23 Oct 2014 09:52:44 -0400 (EDT) Received: from oa-res-26-28.wireless.abdn.ac.uk (oa-res-26-28.wireless.abdn.ac.uk [137.50.26.28]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id BB22424005D; Thu, 23 Oct 2014 09:52:43 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) In-Reply-To: <5449064E.5020303@gmail.com> Date: Thu, 23 Oct 2014 14:52:41 +0100 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <17F21E0F-2D33-4290-806A-70159E529F15@ajf.me> References: <1413875212.2624.3.camel@localhost.localdomain> <5449064E.5020303@gmail.com> To: Rowan Collins X-Mailer: Apple Mail (2.1990.1) Subject: Re: [PHP-DEV] [RFC] UString From: ajf@ajf.me (Andrea Faulds) > On 23 Oct 2014, at 14:44, Rowan Collins = wrote: >=20 > Dmitry Stogov wrote on 21/10/2014 10:01: >> The "right" approach, would be extending zend_string with "encoding" = and >> then adopting near all functions working with zend_string to take >> "encoding" into account. But, of course, this is going to lead to = much more >> complicated solution (with some slowdown). >=20 > Isn't that kind of what ext/mbstring does? >=20 > I think that treating Unicode as nothing more than an encoding, and = trying to hide all its complexity from the user, is not particularly = wise. Unicode isn't just "ASCII, but bigger", so keeping the same API = but making the implementation "work" with more characters isn't really = "Unicode support=E2=80=9D. I=E2=80=99m inclined to agree here. Having an encoding-aware zend_string = vs. having a Unicode-aware string aren=E2=80=99t quite the same. Certain = string operations are only possible for certain encodings, and by = supporting any encoding we risk making things confusing. I=E2=80=99d = rather we convert everything to Unicode. -- Andrea Faulds http://ajf.me/