Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53491 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73515 invoked from network); 21 Jun 2011 16:53:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2011 16:53:21 -0000 Authentication-Results: pb1.pair.com header.from=johncrenshaw@priacta.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=johncrenshaw@priacta.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain priacta.com designates 64.95.72.238 as permitted sender) X-PHP-List-Original-Sender: johncrenshaw@priacta.com X-Host-Fingerprint: 64.95.72.238 mx1.myoutlookonline.com Received: from [64.95.72.238] ([64.95.72.238:37985] helo=mx1.myoutlookonline.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/A0-03418-08CC00E4 for ; Tue, 21 Jun 2011 12:53:20 -0400 Received: from mx1.myoutlookonline.com (localhost [127.0.0.1]) by mx1.myoutlookonline.com (Postfix) with ESMTP id AFE008BE94C; Tue, 21 Jun 2011 12:53:17 -0400 (EDT) X-Virus-Scanned: by SpamTitan at mail.lan Received: from HUB024.mail.lan (unknown [10.110.2.1]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.myoutlookonline.com (Postfix) with ESMTPS id 5A5FF8BE8ED; Tue, 21 Jun 2011 12:53:17 -0400 (EDT) Received: from MAILR001.mail.lan ([10.110.18.27]) by HUB024.mail.lan ([10.110.17.24]) with mapi; Tue, 21 Jun 2011 12:52:16 -0400 To: Pierre Joye CC: "internals@lists.php.net" Date: Tue, 21 Jun 2011 12:53:13 -0400 Thread-Topic: [PHP-DEV] foreach() for strings Thread-Index: AcwwJZjOEKvKAK9XTcKynsfp0Q9kxAADSY0Q Message-ID: References: <4DFF7A12.8060808@sugarcrm.com> <4E00818C.7040201@lsces.co.uk> <4E008EA3.4000403@lsces.co.uk> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: [PHP-DEV] foreach() for strings From: johncrenshaw@priacta.com (John Crenshaw) > From: Pierre Joye [mailto:pierre.php@gmail.com]=20 > > On Tue, Jun 21, 2011 at 4:38 PM, John Crenshaw wrote: >=20 > > This mindset is fundamentally broken. You can call it a byte array all = you want, but the truth is that 99.999% of the time, when a developer is us= ing a string they need it for characters, not for bytes >=20 > Let me rephrase: >=20 > For backward compatibility reasons we cannot change this behavior. >=20 > Any serious text processing should be done using intl, mbstring, > transliterator (pecl) or other similar solutions. >=20 > Cheers, > -- > Pierre Right, I totally agree. We can't fix the multibyte string issue today; I'm = just saying that we *can* (and should) avoid making it much worse. John Crenshaw Priacta, Inc.