Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47218 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33215 invoked from network); 13 Mar 2010 13:59:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Mar 2010 13:59:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=webmaster@keryx.se; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=webmaster@keryx.se; sender-id=pass Received-SPF: pass (pb1.pair.com: domain keryx.se designates 208.69.121.33 as permitted sender) X-PHP-List-Original-Sender: webmaster@keryx.se X-Host-Fingerprint: 208.69.121.33 supavet.nexcess.net Received: from [208.69.121.33] ([208.69.121.33:57677] helo=supavet.nexcess.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 44/22-15916-D4A9B9B4 for ; Sat, 13 Mar 2010 08:59:41 -0500 Received: (qmail 31359 invoked by uid 108); 13 Mar 2010 08:59:38 -0500 Received: from unknown (HELO z61p.keryx.se) (gunther@keryx.se@90.228.192.235) by supavet.nexcess.net with AES256-SHA encrypted SMTP; 13 Mar 2010 08:59:38 -0500 Message-ID: <4B9B9A46.8010409@keryx.se> Date: Sat, 13 Mar 2010 14:59:34 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: internals@lists.php.net References: <4B9926E8.4080202@lerdorf.com> <4B9A2849.9050806@keryx.se> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Array access for UTF-strings (Was: PHP 6 as we know it suddenly died?) From: webmaster@keryx.se (Keryx Web) 2010-03-12 18:36, Tomas Kuliavas skrev: > Keryx Web rašė: >> 2. If so, what will happen to array access in strings that are de >> facto Unicode? Will the more clunky mb_substr() be the only option? > > What will happen to array access in unicode strings, if code wants to > access them in bytes? Will some backwards incompatible binary be the > only option? > > You want unicode strings. I want backwards compatibility which goes > further than php 5.2.1. I want to write bytes in hexadecimal notation. I > need both unicode aware and byte based functions. > Yours is a power user request, mine is a concern for the newbies. PHP has gotten to where it is because it has been easy to pick up and new users will feel productive from day one. I can say with 100 % certainty that new users will be SEVERELY confused if they use array access and get individual bytes from a multibyte encoded string. Easy defaults for the newcomers and power tools for power users is a much better approach than the other way around. To all: I note that my question is still unanswered. -- Keryx Web (Lars Gunther) http://keryx.se/ http://twitter.com/itpastorn/ http://itpastorn.blogspot.com/