Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44789 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41364 invoked from network); 7 Jul 2009 20:05:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jul 2009 20:05:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=brianlmoon@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=brianlmoon@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 72.5.90.27 as permitted sender) X-PHP-List-Original-Sender: brianlmoon@php.net X-Host-Fingerprint: 72.5.90.27 smtp.dealnews.com Linux 2.5 (sometimes 2.4) (4) Received: from [72.5.90.27] ([72.5.90.27:39675] helo=smtp.dealnews.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6C/B0-37453-C8AA35A4 for ; Tue, 07 Jul 2009 16:05:33 -0400 Received: (qmail 1649 invoked from network); 7 Jul 2009 19:22:58 -0000 Received: from unknown (HELO mail.dealnews.com) (10.1.10.7) by -H with ESMTPS (DHE-RSA-AES256-SHA encrypted); 7 Jul 2009 19:22:58 -0000 Received: (qmail 32161 invoked from network); 7 Jul 2009 19:22:58 -0000 Received: from 17.2.1.10.in-addr.arpa (brianm@10.1.2.17) by -H with ESMTPA; 7 Jul 2009 19:22:58 -0000 Message-ID: <4A53A091.8090708@php.net> Date: Tue, 07 Jul 2009 14:22:57 -0500 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: jani.taskinen@iki.fi CC: John Mertic , internals@lists.php.net References: <2a9adcf0810221003i70f37558ob5777b5603865cdf@mail.gmail.com> <1224696974.17075.1.camel@localhost> <2a9adcf0810221135h1e6ed4ecub55318cfb26b3e7e@mail.gmail.com> <370571A4-8A89-412C-A8CD-1D7439C761F1@prohost.org> <2a9adcf0810221428v29a612a1i5425cbce95acf4a@mail.gmail.com> <2a9adcf0811060552u7486262bua509bde4d9807ff9@mail.gmail.com> <2a9adcf0907071046i5cec8c63gec0a1888fa3151ed@mail.gmail.com> <4A539391.6040700@sci.fi> In-Reply-To: <4A539391.6040700@sci.fi> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] Bug #46367 - fputcsv does not add the correct newline character on Windows From: brianlmoon@php.net (Brian Moon) On 7/7/09 1:27 PM, Jani Taskinen wrote: > John Mertic kirjoitti: >> Hi All, >> >> Bringing this one back once more; let me know what everyone thinks >> about it. If it's safe to commit than if someone could ( or give me >> the karma to do so ) that would be great. If not, let me know what >> should be done about it instead. > > Is \r\n okay on Mac? Is \r okay on Windows? etc. > > Short: Shouldn't this be always \r\n? Or better yet, default to \r\n and > add extra option for fputcsv with which you can set it to anything you > like.. :) > > --Jani The only program I know of in existence that has issues is Notepad on Windows. All the mac programs I use will deal with whatever. Having said that, it should be just as flexible for creating CSV files as fgetcsv is for reading them. Of course, a good ol' fputs does a fine job of making a CSV file too. -- Brian. -------- http://brian.moonspot.net/