Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30482 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13605 invoked by uid 1010); 6 Jul 2007 06:23:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 13590 invoked from network); 6 Jul 2007 06:23:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jul 2007 06:23:50 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.114 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.114 unknown Windows 2000 SP4, XP SP1 Received: from [63.205.162.114] ([63.205.162.114:40538] helo=us-ex1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/F0-05511-3FFDD864 for ; Fri, 06 Jul 2007 02:23:50 -0400 Received: from [127.0.0.1] ([192.168.17.28]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 5 Jul 2007 23:23:44 -0700 Message-ID: <468DDFEB.3080404@zend.com> Date: Thu, 05 Jul 2007 23:23:39 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: ceo@l-i-e.com CC: Tomas Kuliavas , internals@lists.php.net References: <1181829227.3478.3.camel@localhost.localdomain> <7d5a202f0706141844l3c75b556hdbecbcd5a43747c9@mail.gmail.com> <4671F184.2020401@lerdorf.com> <6sof73dj69ldpspfc5ukrc58qr9ckbin2b@4ax.com> <4677E7B1.2080305@lerdorf.com> <4677F5FB.1070206@lerdorf.com> <4678252F.2050803@sci.fi> <46783212.4020900@lerdorf.com> <34654.216.230.84.67.1183064088.squirrel@www.l-i-e.com> <54557.78.61.224.253.1183098089.squirrel@avilys.eik.lt> <2159.24.1.37.132.1183693437.squirrel@www.l-i-e.com> In-Reply-To: <2159.24.1.37.132.1183693437.squirrel@www.l-i-e.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Jul 2007 06:23:44.0653 (UTC) FILETIME=[3448BBD0:01C7BF96] Subject: Re: [PHP-DEV] What is the use of "unicode.semantics" in PHP 6? From: stas@zend.com (Stanislav Malyshev) > You mean this will break: > > $mask = 0xf0; > $value = $_POST['foo'] & $mask; > ?> > > because of Unicode? I'd say it won't do what it did before. Though I'm not sure bit operations on unicode make any sense at all... The problem here is the requirement conflict - how PHP can possibly know if $_POST['foo'] is a bit field or unicode string? > But if I haven't done something new-fangled to make a string be some > new-fangled Unicode thingie, then it's just plain old ASCII, no? > > Or PHP can just assume that anyway... It can't if we want to keep UTF-16. UTF-16 unlike UTF-8 is not compatible with ascii. We could have some "smart downgrade" attempt - Python 2 currently does something like this - but it won't work in all situations. > But an old script ought to just work... Sometimes it's not possible - if you use the same variable as string and bitfield, and bit representation of the string changes, it can't just work anymore, something needs to be done to bring them together. >> Unicode code points can be defined with \u, but PHP6 breaks existing >> octal >> and hex escape sequences. I don't understand what this means... -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com