Skip to content

Space around the delimiter in readdlm breaks the functionality of the quotes option #6

Open
@yakir12

Description

In readdlm (and readcsv), the quotes option allows for columns that are enclosed within double-quote (”) characters to contain new lines and column delimiters. But if there is a space before/after the delimiter, then readdlm either errors (unexpected character ' ' after quoted field) or doesn't parse the file as intended (number of rows is wrong), respectively:

a,b
c,"d, e"

results in a 2×2 Array{String,2}, good!

a,b
c, "d, e"

results in a 2×3 Array{String,2}, bad...

Because csv files are human-readable and humans usually put a space after a comma, maybe readdlm (or at least readcsv) should ignore spaces around delimiters?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions