Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9047 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52038 invoked by uid 1010); 12 Apr 2004 00:53:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 51978 invoked from network); 12 Apr 2004 00:53:11 -0000 Received: from unknown (HELO mgkyb1.nw.wakwak.com) (211.9.230.193) by pb1.pair.com with SMTP; 12 Apr 2004 00:53:11 -0000 Received: from vckyb3.nw.wakwak.com (postfix@vckyb3.nw.wakwak.com [211.9.231.144]) by mgkyb1.nw.wakwak.com (8.12.11/8.12.11/2004-03-24) with SMTP id i3C0r9EU023114; Mon, 12 Apr 2004 09:53:09 +0900 (JST) (envelope-from moriyoshi@at.wakwak.com) Received: from at.wakwak.com (at.wakwak.com [211.9.230.135]) by vckyb3.nw.wakwak.com (Postfix) with ESMTP id 0606A3FE02; Mon, 12 Apr 2004 09:53:09 +0900 (JST) Received: from [192.168.0.130] (z81.211-19-75.ppp.wakwak.ne.jp [211.19.75.81]) by at.wakwak.com (8.12.11/8.12.11/2004-03-29) with ESMTP/inet id i3C0r7xH078404; Mon, 12 Apr 2004 09:53:08 +0900 (JST) (envelope-from moriyoshi@at.wakwak.com) In-Reply-To: <40797364.1010209@sklar.com> References: <40797364.1010209@sklar.com> Mime-Version: 1.0 (Apple Message framework v613) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: Content-Transfer-Encoding: 7bit Cc: internals@lists.php.net Date: Mon, 12 Apr 2004 09:52:57 +0900 To: David Sklar X-Mailer: Apple Mail (2.613) Subject: Re: [PHP-DEV] fputcsv() From: moriyoshi@at.wakwak.com (Moriyoshi Koizumi) On 2004/04/12, at 1:33, David Sklar wrote: > Attached is a patch that implements fputcsv() as a complement to > fgetcsv(). > > There are two things that still need improvement: > > - It adds "\n" as a newline onto the end of each line. I think it > would be better to add a platform-specific line ending. > > - It is not mbstring-aware. As for writing stuff, we don't have to care about in which encoding strings are encoded as long as it is 8-bit compatible. UTF-16 / UTF-32 / UCS-2 / UCS-4 are not 8-bit compatible and I've never seen a case where one of these is utilised for CSV files, so I think your code is actually "multibyte safe" :) Moriyoshi > > Any suggestions for fixing these things (or other issues) would be > appreciated. > > Thanks, > David