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 jmer...@gmail.com | http://jmertic.wordpress.com On Tue, Jul 7, 2009 at 3:22 PM, Brian Moon<brianlm...@php.net> 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. 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/ > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php