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

Allow escaping the delimiter #232

Open
leaty opened this issue May 28, 2021 · 0 comments · May be fixed by #233
Open

Allow escaping the delimiter #232

leaty opened this issue May 28, 2021 · 0 comments · May be fixed by #233

Comments

@leaty
Copy link

leaty commented May 28, 2021

What version of the csv crate are you using?

1.1.6

Briefly describe the question, bug or feature request.

Allow escaping the delimiter like the python counterpart, e.g.

field1,field2,field3\, with\, commas,field4

This is to me, personally, the best format for CSV. No need for quotes or anything else, it's just a delimiter that can be escaped if used within a field. I currently have code in python that writes files like this, and I'm in need of reading them through rust. Of course this might be possible already, but I've not had any success with the ReaderBuilder options, also the escape function mentions escaped quotes only.

What is the observed behavior of the code above?

CSV error: record 19 (line: 19, byte: 5289): found record with 20 fields, but the previous record has 18 fields

I will link a PR to this issue which made it work for me, but the implementation of it is probably sub-optimal.

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