Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53461 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84761 invoked from network); 21 Jun 2011 08:07:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2011 08:07:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=robert@xarg.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=robert@xarg.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain xarg.org from 209.85.212.42 cause and error) X-PHP-List-Original-Sender: robert@xarg.org X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:44600] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 16/00-18727-F41500E4 for ; Tue, 21 Jun 2011 04:07:44 -0400 Received: by vwl1 with SMTP id 1so1844150vwl.29 for ; Tue, 21 Jun 2011 01:07:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.189.13 with SMTP id dc13mr2129499vcb.169.1308643660977; Tue, 21 Jun 2011 01:07:40 -0700 (PDT) Received: by 10.220.100.146 with HTTP; Tue, 21 Jun 2011 01:07:40 -0700 (PDT) X-Originating-IP: [92.229.220.78] In-Reply-To: <1308605224.7135.2.camel@guybrush> References: <1308584208.6296.9.camel@guybrush> <1308586150.6296.13.camel@guybrush> <1308589044.8394.27.camel@inspiron> <4DFF7E2A.50506@sugarcrm.com> <1308591260.8394.47.camel@inspiron> <1308605224.7135.2.camel@guybrush> Date: Tue, 21 Jun 2011 10:07:40 +0200 Message-ID: To: =?ISO-8859-1?Q?Johannes_Schl=FCter?= Cc: Todd Ruth , Stas Malyshev , internals@lists.php.net Content-Type: multipart/alternative; boundary=90e6ba4fc3ae8cd87804a634585e Subject: Re: [PHP-DEV] Re: foreach() for strings From: robert@xarg.org (Robert Eisele) --90e6ba4fc3ae8cd87804a634585e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable And what actually failed? The idea seams straightforward. Robert 2011/6/20 Johannes Schl=FCter > On Mon, 2011-06-20 at 20:38 +0200, Robert Eisele wrote: > > I really like the ideas shared here. It's a thing of consideration that > > array-functions should also work with strings. Maybe this would be the > way > > to go, but I'm more excited about the OOP implementation of TextIterato= r > and > > ByteIterator, which solves the whole problem at once (and is easier to > > implement, as mentioned by Stas). As Jonathan said, Database results > with a > > certain encoding could get iterated, too. The only way to workaround th= e > > Text/Byte problem would be, offsetting >EVERY< string with 1-2 byte > > "string-type" information or an additional type flag in the > zval-strcuture. > > Handling everything with zval's instead of objects would have the > advantage, > > that database-layers like mysqlnd could write the database-encoding > directly > > into the zval and the user had no need to decide what encoding is used. > > Welcome back to the failed PHP 6 Unicode project. ;-) > (while we didn't store the original encoding but converted to Utf-16, > which prevents random/strange conversions in other places when mixing > encodings) > > johannes > > > --90e6ba4fc3ae8cd87804a634585e--