Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

#30097 [Opn->Csd]: fgetcsv() does not recognize Mac EOL character (\r) as the EOL marker
ID:               30097
Updated by:       aidan@php.net
Reported By:      dbeckham at dealnews dot com
-Status:           Open
+Status:           Closed
Bug Type:         Documentation problem
Operating System: Mac OS X 10.3.5
PHP Version:      5.0.1
New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.




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

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

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.

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

[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] iliaa@php.net

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

Report this thread to moderator Post Follow-up to this message
Old Post
aidan@php.net
09-26-04 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Documentation archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:22 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.