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

Escaped Quotes at the end of a chunk are incorrectly ignored. #45

Open
ChrisAlvares opened this issue Jan 31, 2017 · 0 comments · May be fixed by #46
Open

Escaped Quotes at the end of a chunk are incorrectly ignored. #45

ChrisAlvares opened this issue Jan 31, 2017 · 0 comments · May be fixed by #46

Comments

@ChrisAlvares
Copy link

ChrisAlvares commented Jan 31, 2017

If the last character of a chunk is a double quote and the next character at the beginning of the next chunk is also a double quote, both characters will be ignored and the output will not output any characters.

I believe this has to do with using data.charAt(i+1) and not looking at the previous field if data.charAt(i+1) is null.

Example:

test,123,"quote""d field here"

If the stream chunk ends here:

test,123,"quote""d field here"
               ^

The output value

test,123,"quoted field here

when it should read

test,123,"quote"d field here
@ChrisAlvares ChrisAlvares changed the title Escaped Quotes at the end of a chunk are ignored. Escaped Quotes at the end of a chunk are incorrectly ignored. Jan 31, 2017
ChrisAlvares added a commit to AgencyPMG/ya-csv that referenced this issue Jan 31, 2017
@ChrisAlvares ChrisAlvares linked a pull request Jan 31, 2017 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant