ID:               30097
 User updated by:  dbeckham at dealnews dot com
 Reported By:      dbeckham at dealnews dot com
 Status:           Open
-Bug Type:         Filesystem function related
+Bug Type:         Documentation problem
 Operating System: Mac OS X 10.3.5
 PHP Version:      5.0.1
 New Comment:

I'm changing this bug to a documentation problem.  The fgetcsv() docs
should also have the same information that fgets() and file() have
about the auto_detect_line_endings configuration option.


Previous Comments:
------------------------------------------------------------------------

[2004-09-24 14:28:40] dbeckham at dealnews dot com

Using "php -d auto_detect_line_endings=1" worked and I was able to
successfully read a csv file with \r line endings.

That said, wouldn't this config option be better named if it was called
"also_support_mac_line_endings"?  The config option isn't needed for
Unix or PC line endings, as PHP already works out of the box (so to
speak) with them.

There are only three main types of line endings, Unix, PC and Mac.  Why
are the Mac line endings singled out like this?  Why do they need a
special config option to be set, just to recognize them?  It's not as
if PHP only recognizes the line endings of the platform it's compiled
on.

------------------------------------------------------------------------

[2004-09-23 21:42:50] [EMAIL PROTECTED]

Did you try enable automatic EOL detection.

------------------------------------------------------------------------

[2004-09-15 19:17:01] dbeckham at dealnews dot com

Description:
------------
fgetcsv() does not recognize the Macintosh EOL character (\r) as a
legitimate EOL marker for a CSV file.

Reproduce code:
---------------
Read any CSV file that uses Mac EOL markers using fgetcsv().

Expected result:
----------------
fgetcsv() should recognized Mac EOL (\r) markers as the end of a CSV
record.

Actual result:
--------------
The entire file is read as if it's a single CSV record.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30097&edit=1

Reply via email to