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

Fix serialization of embedded quotes. #111

Merged
merged 3 commits into from
Aug 30, 2022
Merged

Fix serialization of embedded quotes. #111

merged 3 commits into from
Aug 30, 2022

Conversation

lardieri
Copy link
Contributor

Embedded quotes in values must be doubled, and the entire value surrounded with quotes.

Includes commit from #110 because otherwise we'd get merge conflicts in the project file.

Copy link
Contributor

@DivineDominion DivineDominion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't even know about this, to be honest. Oof!

(When #110 is merged, you should be able to rebase this branch on master and resolve the duplicated commit regarding the project fixes.)

When paging through the CSV RFC of 2005, I saw they want us to use CRLF newlines instead of just \n. https://www.rfc-editor.org/rfc/rfc4180.html -- maybe we should change the serializer to reflect that eventually. (Not in this PR)

SwiftCSVTests/URLTests.swift Show resolved Hide resolved
SwiftCSVTests/QuotedTests.swift Show resolved Hide resolved
@DivineDominion DivineDominion self-requested a review August 30, 2022 06:36
Copy link
Contributor

@DivineDominion DivineDominion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hit the wrong review button.

Just 2 nits w.r.t comments, can be merged after adding RFC link(s)

@DivineDominion
Copy link
Contributor

Sorry -- I'm bad at remembering this, but please add a CHANGELOG entry for this fix/change :)

Embedded quotes in values must be doubled, and the entire value surrounded with quotes.
@lardieri lardieri merged commit ac327b8 into swiftcsv:master Aug 30, 2022
@lardieri lardieri deleted the quotes branch August 30, 2022 08:06
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 this pull request may close these issues.

None yet

2 participants