Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26736 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82219 invoked by uid 1010); 29 Nov 2006 15:45:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82203 invoked from network); 29 Nov 2006 15:45:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2006 15:45:37 -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:51476] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/A7-33708-CFAAD654 for ; Wed, 29 Nov 2006 10:45:36 -0500 Received: from [192.168.0.3] ([71.31.200.76]) (authenticated bits=0) by lerdorf.com (8.13.8/8.13.8/Debian-2) with ESMTP id kATFivZb030735; Wed, 29 Nov 2006 07:44:57 -0800 In-Reply-To: <007501c713ad$a71aa640$0201a8c0@pc1> References: <00f001c7048a$b2967030$0201a8c0@pc1> <434F5AED-4D0B-40EF-9817-A16A2844C5FF@gravitonic.com> <007501c713ad$a71aa640$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: Cc: Content-Transfer-Encoding: 7bit Date: Wed, 29 Nov 2006 09:44:59 -0600 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) We should use whatever trim() uses, I think. -Andrei On Nov 29, 2006, at 5:58 AM, Matt Wilmas wrote: > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php