Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26734 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21878 invoked by uid 1010); 29 Nov 2006 11:58:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 21862 invoked from network); 29 Nov 2006 11:58:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2006 11:58:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 209.142.136.132 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.142.136.132 msa2-mx.centurytel.net Linux 2.4/2.6 Received: from [209.142.136.132] ([209.142.136.132:52621] helo=msa2-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 96/F0-14475-AD57D654 for ; Wed, 29 Nov 2006 06:58:53 -0500 Received: from pc1 (dsl-194-211.jax.centurytel.net [69.179.194.211]) by msa2-mx.centurytel.net (8.13.6/8.13.6) with SMTP id kATBwEc8024647; Wed, 29 Nov 2006 05:58:14 -0600 Message-ID: <007501c713ad$a71aa640$0201a8c0@pc1> To: , "Andrei Zmievski" References: <00f001c7048a$b2967030$0201a8c0@pc1> <434F5AED-4D0B-40EF-9817-A16A2844C5FF@gravitonic.com> Date: Wed, 29 Nov 2006 05:58:14 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Subject: Re: [PHP-DEV] Unicode chars allowed in numbers? From: php_lists@realplain.com ("Matt Wilmas") Hi Andrei, One more related question: What about for any leading whitespace with numeric strings, like in zend_u_strtol()? Is u_isspace() needed, or are only the ASCII-equivalents (0x20, 9-13 [\t, \n, \v, \f, \r]) allowed? Thanks again, Matt ----- Original Message ----- From: "Andrei Zmievski" Sent: Friday, November 10, 2006 > > 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