Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44793 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50449 invoked from network); 7 Jul 2009 21:10:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jul 2009 21:10:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=jmertic@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jmertic@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.184 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: jmertic@gmail.com X-Host-Fingerprint: 209.85.212.184 mail-vw0-f184.google.com Received: from [209.85.212.184] ([209.85.212.184:42635] helo=mail-vw0-f184.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/82-37453-EA9B35A4 for ; Tue, 07 Jul 2009 17:10:07 -0400 Received: by vwj14 with SMTP id 14so3690975vwj.29 for ; Tue, 07 Jul 2009 14:10:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=IIFlgDwbTEnalaurP4RfmNoT4fELU4x5nxcUiYTfVhI=; b=P9m2n+wirISHE2lkZe4pbMyfTJ53mdB14h2GK6rep++fXGb15SWUalTCrNmGZNBhsW 0jkiaI0wAnbccerPa+uclE10lfWhvfAbesOaXyf6hjOEbMfNMU3qtQKEATZkwjek8sTB bXxzmbSWeIuIeTfnZF1KLRUJLBrBrTrVdEKLo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=h8RgtWC02l0x/c29ZJ5CGi4CRogUOpEUN5zhrTNQOTiU5HYNb2pR6jNQpkZ7RyhmYx EJWcZyOWq4R5PU9GlQQh4NVdboQIvqPExE4DY1lVG2yDOMbiKAGJ7710VsJNVJ+ZDPq+ VoeJNKPMm/EpIWyExxv+rJ1BChd2QaGlSp8ao= MIME-Version: 1.0 Sender: jmertic@gmail.com Received: by 10.220.75.141 with SMTP id y13mr13020596vcj.84.1247001003875; Tue, 07 Jul 2009 14:10:03 -0700 (PDT) In-Reply-To: <4A53A091.8090708@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> <4A53A091.8090708@php.net> Date: Tue, 7 Jul 2009 17:10:03 -0400 X-Google-Sender-Auth: 2ad42c92cc1b1c51 Message-ID: <2a9adcf0907071410i2ab4a7c7me3aca2d98d56317e@mail.gmail.com> To: Brian Moon Cc: jani.taskinen@iki.fi, internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [PATCH] Bug #46367 - fputcsv does not add the correct newline character on Windows From: jmertic@php.net (John Mertic) The big issue I saw was that fgetcsv() used PHP_EOL for determining line endings, but fputcsv() didn't, which on Windows was causing csv files written by PHP not be able to be read back ( assuming auto_detect_line_endings is turned off ). John Mertic jmertic@gmail.com | http://jmertic.wordpress.com On Tue, Jul 7, 2009 at 3:22 PM, Brian Moon wrote: > 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. =C2=A0All 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/ >