Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6366 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37370 invoked by uid 1010); 12 Dec 2003 19:23:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37317 invoked from network); 12 Dec 2003 19:23:24 -0000 Received: from unknown (HELO vckyb3.nw.wakwak.com) (211.9.231.144) by pb1.pair.com with SMTP; 12 Dec 2003 19:23:24 -0000 Received: from at.wakwak.com (at.wakwak.com [211.9.230.135]) by vckyb3.nw.wakwak.com (Postfix) with ESMTP id BB9023FE7E; Sat, 13 Dec 2003 04:23:23 +0900 (JST) Received: from [192.168.0.130] (z152.218-225-128.ppp.wakwak.ne.jp [218.225.128.152]) by at.wakwak.com (8.12.10/8.12.10/2003-09-30) with ESMTP/inet id hBCJNNng069398; Sat, 13 Dec 2003 04:23:23 +0900 (JST) (envelope-from moriyoshi@at.wakwak.com) In-Reply-To: References: <25BBBBC2-2CD2-11D8-8FCC-000A95CE0C62@at.wakwak.com> <200312121407.48578.ilia@prohost.org> Mime-Version: 1.0 (Apple Message framework v606) Content-Type: text/plain; charset=SHIFT_JIS; format=flowed Message-ID: Content-Transfer-Encoding: 7bit Cc: Ilia Alshanetsky , PHP Internals Date: Sat, 13 Dec 2003 04:23:13 +0900 To: Rasmus Lerdorf X-Mailer: Apple Mail (2.606) Subject: Re: [PHP-DEV] Re: Regarding the latest patch on fgetcsv() (stable branch) From: moriyoshi@at.wakwak.com (Moriyoshi Koizumi) On 2003/12/13, at 4:02, Rasmus Lerdorf wrote: > On Fri, 12 Dec 2003, Ilia Alshanetsky wrote: >> That said, the whole space trimming behavior seems a little unusual >> since it >> will corrupt content especially if said content contains binary data. >> IMHO >> the data read by fgetcsv() should be fetched in such a manner so that >> the >> original string can be recreated. > > I agree that it would be a good idea to provide a mechanism to do that, > but at this point I don't think we should be changing the behaviour of > fgetcsv() in neither the stable branch nor the HEAD branch. I'd add a > new > binary-safe version of the function instead for this. Or an optional > arg, > but fgetcsv() already has 2 optional args. My opinion is basically the same as Ilia's. And I think it'd also be a good idea to introduce a few more option to modify the escaping behaviour. Escape characters like \ are treated specially at the moment, while the de facto specification, of Microsoft, adopts dubbed-quotes style instead of it. IMO we should be able to choose the behaviour. Then, where do we go from here? Eventually we'll need to change the spec of its arguments, or add a new function as Rasmus said... Moriyoshi