Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26455 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87873 invoked by uid 1010); 10 Nov 2006 10:10:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87858 invoked from network); 10 Nov 2006 10:10:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2006 10:10:13 -0000 Authentication-Results: pb1.pair.com header.from=andrei@gravitonic.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=andrei@gravitonic.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain gravitonic.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: andrei@gravitonic.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from [204.11.219.139] ([204.11.219.139:58641] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/50-16675-30054554 for ; Fri, 10 Nov 2006 05:10:12 -0500 Received: from [192.168.0.140] (AMontsouris-151-1-85-247.w86-212.abo.wanadoo.fr [86.212.37.247]) (authenticated bits=0) by lerdorf.com (8.13.8/8.13.8/Debian-2) with ESMTP id kAAAA3ZH017061; Fri, 10 Nov 2006 02:10:05 -0800 In-Reply-To: <00f001c7048a$b2967030$0201a8c0@pc1> References: <00f001c7048a$b2967030$0201a8c0@pc1> Mime-Version: 1.0 (Apple Message framework v752.2) X-Priority: 3 Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <434F5AED-4D0B-40EF-9817-A16A2844C5FF@gravitonic.com> Cc: , "Andrei Zmievski" Content-Transfer-Encoding: 7bit Date: Fri, 10 Nov 2006 11:10:22 +0100 To: Matt Wilmas X-Mailer: Apple Mail (2.752.2) Subject: Re: [PHP-DEV] Unicode chars allowed in numbers? From: andrei@gravitonic.com (Andrei Zmievski) > Hi Andrei, et al., > > I was just looking at README.UNICODE, regarding interpretation of > numbers: > "we restrict numbers to consist only of ASCII digits," and "Numeric > strings > are supposed to adhere to the same rules." Is it correct to take > that to > mean only UChar's with values from '0'-'9'/0x30-0x39 (and 'a'-'z' > equivalents for bases > 10)? Correct. > I ask because in zend_u_strtol(), HANDLE_U_NUMERIC() for array > keys, etc., > the u_digit() function is used, which also allows non-ASCII, higher- > value > digit characters, doesn't it? But then in is_numeric_unicode(), when > checking for hex numbers, the ASCII values '0' and 'x' are used, > which is > what I'd expect after reading README.UNICODE. You're correct here again, u_digit() should not be used there. -Andrei