Home » File System » File » Bug #4792
File_CSV: Last column keeps line breaks
Details
| 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 |
Comments
[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.