Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CsvReader detecting new lines #264

Open
kuzmamar opened this issue Sep 22, 2015 · 2 comments
Open

CsvReader detecting new lines #264

kuzmamar opened this issue Sep 22, 2015 · 2 comments

Comments

@kuzmamar
Copy link

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.

@rimantoro
Copy link

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);

@kyleobrien91
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants