Skip to content

Allow escaping the delimiter #232

Open
@leaty

Description

@leaty

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions