data-import icon indicating copy to clipboard operation
data-import copied to clipboard

CsvReader detecting new lines

Open kuzmamar opened this issue 9 years ago • 2 comments

Directive ini_set('auto_detect_line_endings', true); in CsvReader constructor does not work. The directive should be used before creation of \SplFileObject otherwise it detects nothing. I found this when trying to read a file with '\r' as a new line.

kuzmamar avatar Sep 22 '15 16:09 kuzmamar

I also have issue with this also. My current solution is, to put code below before \SplFileObject initialized

ini_set('auto_detect_line_endings', true);
$file = new \SplFileObject($yourFilePath);

rimantoro avatar Nov 05 '15 03:11 rimantoro

@kuzmamar - could you perhaps open a PR for your suggested change?

kyleobrien91 avatar Jun 07 '16 01:06 kyleobrien91