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

CLI CSV and web interface start gobbling lines when there is one escaped double quote in a row. #187

Open
Gailbear opened this issue Jul 15, 2016 · 1 comment

Comments

@Gailbear
Copy link

Gailbear commented Jul 15, 2016

col1, col2, col3
1,"this is fine",2
3,"this is not \"fine",4
5,"this will still be part of the previous line",6
7,"this will end the line started at \"3",8
9,"this will cause a \"stray quote\" error",10

There should probably be different behavior for escaped quotes. Probably ignoring them. This causes some interesting problems when dealing with 30,000 line files where there are precisely 2 single instances of escaped quotes about 10k lines apart.

Also I'm not sure if escaped quotes qualify as stray quotes. My solution was to remove the 2 that didn't have matches, and replace all escaped quotes with single quotes, but it wasn't a graceful solution.

this is the validation that failed interestingly: http://csvlint.io/validation/5789206163737627b90004bb

@Floppy
Copy link
Member

Floppy commented Jul 16, 2016

Oh, nice catch. We'll chase it down - could be CSVlint or possibly could be deeper down in the Ruby CSV library.

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

3 participants