Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #4792 File_CSV: Last column keeps line breaks
Submitted: 2005-07-11 21:31 UTC
From: razzari at gmail dot com Assigned: dufuz
Status: Closed Package: File
PHP Version: 4.3.11 OS: Linux
Roadmaps: 1.3.0a1    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2007-03-22 21:58 UTC
Package:
Bug Type:
Summary:
From: razzari at gmail dot com
New email:
PHP Version: Package Version: OS:

 

 [2005-07-11 21:31 UTC] razzari at gmail dot com
Description: ------------ When reading a delimited text-file with File_CSV, the last column keeps the line break, and because of that I have to trim it. It happens with both Unix and Windows line breaks. Please see the reproduced code at the URL below. Reproduce code: --------------- http://dev.mkti.com.ar/cvam/MAIL/_test/file_csv_testcase_trim_last_line.php Expected result: ---------------- All the fields in the row return a string with no line breaks, as there is no line break other than the line separator. However the last field for each row keeps the line break after it, therefore forcing me to post-process the data. This seems an obvious issue, so I must admit I'm inclined to think I've done something wrong. Actual result: -------------- A string with no line break at the end.

Comments

 [2005-08-09 08:13 UTC] dufuz
Just to give you heads up, this will be taken care of when we release 1.2.2 of File. Thanks for the test case :-)
 [2007-03-22 21:58 UTC] dufuz (Helgi Þormar)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I can confirm this was a problem in 1.2.2, fixed in CVS, thanks for the tests, I turned them into official tests with a little tweak :)