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

change \r\n as default for eol #4

Open
close2 opened this issue Feb 5, 2016 · 2 comments
Open

change \r\n as default for eol #4

close2 opened this issue Feb 5, 2016 · 2 comments
Assignees

Comments

@close2
Copy link
Owner

close2 commented Feb 5, 2016

Far too many documents use the system eol encoding.

It shouldn't be a problem to accept both.

@close2 close2 self-assigned this Feb 5, 2016
@Zectbumo
Copy link

I'm having a huge issue with eol and this library. I was with you on sticking with the RFC eol as CRLF but I am having 0% success rate. I am on a Mac and I have downloaded csv files from census.org, github, linkedin, and created my own and all of them were LF (except one was CR – weird). So I think the RFC is wrong on this one. Please either make it default to system or auto-detect. "It shouldn't be a problem to accept both." You mean, accept all three? I did run into a CR file today. I thought these files went extinct. If you don't do CR I won't blame you ;)

@Zectbumo
Copy link

I was reading PEP 278 how Python ran into a similar issue. When I think of something good that accepts all EOLs I think of Python Universal Newlines. The PEP referenced the issue and I looked at the diff. Something that I thought was interesting was the PEP mentions universal newlines only work for input files. So if the Dart CSV lib is going to output a csv file then I think the default should be system eol. Reading a csv file should be universal newlines by default. From the looks of the diff it seems that the whole file is scanned and all EOLs used in the file are gathered into a list. I'm not sure this is going to be useful to an end user of this Dart CSV lib but keeping a list of all line endings for the lib users might be something worth considering.

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

No branches or pull requests

2 participants