Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37850 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6255 invoked from network); 24 May 2008 12:54:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2008 12:54:01 -0000 Authentication-Results: pb1.pair.com header.from=steph@zend.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=steph@zend.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain zend.com does not designate 64.97.136.175 as permitted sender) X-PHP-List-Original-Sender: steph@zend.com X-Host-Fingerprint: 64.97.136.175 smtpout0175.sc1.he.tucows.com Solaris 8 (1) Received: from [64.97.136.175] ([64.97.136.175:57917] helo=n064.sc1.he.tucows.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/D2-21790-7EF08384 for ; Sat, 24 May 2008 08:54:00 -0400 Received: from sc1-out08.emaildefenseservice.com (64.97.139.2) by n064.sc1.he.tucows.com (7.2.069.1) id 476977050155C1B4; Sat, 24 May 2008 12:53:54 +0000 X-SpamScore: 2 X-Spamcatcher-Summary: 2,0,0,e20cde9944dd7017,cfc06c81b00088e0,steph@zend.com,-,RULES_HIT:152:355:379:539:540:541:542:543:567:599:601:945:973:988:989:1155:1156:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1541:1587:1593:1594:1676:1711:1730:1747:1766:1792:2073:2075:2078:2393:2559:2562:2689:2899:3027:3352:3622:3865:3867:3868:3869:3870:3871:3872:3873:3874:4605:5007:6119:6261:7875:7903,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk, SPF:,MSBL:none,DNSBL:none,TSO:0 X-Spamcatcher-Explanation: Received: from foxbox (host86-137-246-48.range86-137.btcentralplus.com [86.137.246.48]) (Authenticated sender: steph.fox) by sc1-out08.emaildefenseservice.com (Postfix) with ESMTP; Sat, 24 May 2008 12:53:53 +0000 (UTC) Message-ID: <008f01c8bd9d$63f0cde0$4401a8c0@foxbox> Reply-To: "Steph Fox" To: "Andrei Zmievski" Cc: "Antony Dovgal" , References: <7d6e34d80805191240k64cb1ba6k3e8f7a50ddf068c@mail.gmail.com> <4831F27B.7030001@suse.de> <296949B4-D328-49FE-968B-4942B28FE869@pooteeweet.org> <7d6e34d80805191454m69614624v7a05037fa947328e@mail.gmail.com> <698DE66518E7CA45812BD18E807866CE019F60DE@us-ex1.zend.net> <34.64.28995.1BE23384@pb1.pair.com> <02e701c8bab7$19a3dd10$4401a8c0@foxbox> <4833FD5B.2010308@daylessday.org> <003f01c8bb33$81ae5030$4401a8c0@foxbox> <48346ED3.9040505@gravitonic.com> <001501c8bbf6$5702cf50$4401a8c0@foxbox> <48371131.50003@gravitonic.com> Date: Sat, 24 May 2008 13:55:03 +0100 Organization: Zend Technologies MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: [PHP-DEV] Unicode progress [Was: unicode.semantics ad infinitum] From: steph@zend.com ("Steph Fox") Hi Andrei, I see where you're coming from over the (binary)|(string) issue, just trying to find some way that would preserve a little more back compatibility. > UG(ascii_conv) is for the format string, not the arguments. The warning is > thrown by this code: > > convert_to_string_ex(argv[currentarg]); > > It should check the arg type and return with a warning if it's Unicode. OK, so there are some things that should maybe 'just happen' here, and also when 'S' is used: PHP_NAMED_FUNCTION(php_if_crc32) { char *p; int len, nr; php_uint32 crcinit = 0; register php_uint32 crc; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &p, &nr) == FAILURE) { return; } ... Warning: crc32() expects parameter 1 to be strictly a binary string, Unicode string given in ... Surely if a function's *expecting* a binary string it should do a silent conversion, and only throw a warning if the conversion fails? I don't see why the onus should always be on the user to adapt to this. - Steph