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

Bug: wrong processing of string that contains separator symbol #13

Closed
iamantony opened this issue Jan 21, 2016 · 4 comments
Closed

Bug: wrong processing of string that contains separator symbol #13

iamantony opened this issue Jan 21, 2016 · 4 comments

Comments

@iamantony
Copy link
Owner

Based on this comment: http://stackoverflow.com/questions/22802491/create-csv-file-in-c-in-qt/30391988?noredirect=1#comment57510719_30391988

When data string contains separator symbol, writer (and reader) will split it in two different strings.
Example:
Separator: ","
Input: "one", "two", "str with, comma"
What we want to see in file: one,two,"str with, comma"
What we get: one,two,str with, comma

Solution: check if data string contains separator symbol. If yes, then we need to add double quotes at the begining and at the end of the date string.

@iamantony
Copy link
Owner Author

Read the standard RFC 4180: http://tools.ietf.org/pdf/rfc4180.pdf

@iamantony
Copy link
Owner Author

This also may help: http://csvlint.io/about

@iamantony
Copy link
Owner Author

Fix bug for Reader: 2d4bddc

@iamantony
Copy link
Owner Author

Fix bug for Writer: 0cff93d

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

1 participant