Skip to content

different quoting behavior, depending on whitespace  #668

Closed
@ijlyttle

Description

@ijlyttle

Sometimes I will write out a small csv by hand - by habit I will put a space after a comma:

"foo", "bar"
"a", "b"

When I read_csv() this, it parses inconsistently.

However, if I take out the whitespace, it parses as I expect:

"foo","bar"
"a","b"

Reprex:

library("readr")

read_csv('"foo","bar"\n"a","b"\n')
#> # A tibble: 1 × 2
#>     foo   bar
#>   <chr> <chr>
#> 1     a     b

read_csv('"foo", "bar"\n"a", "b"\n')
#> # A tibble: 1 × 2
#>     foo `"bar"`
#>   <chr>   <chr>
#> 1     a     "b"

Does this rise to the level of bug? Also, may be similar to #238.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions