Skip to content

Commas inside quotes sometimes not ignored #42

@BorisVSchmid

Description

@BorisVSchmid

Issue #36 is closed, saying that commas inside quotes are ignored, but in the below example that is not always the case.

Only difference between the three lines below is no space, a space after the first, or a space after the second comma.

(->> "1367-1369,\"[Bailliages of Arras, Avesnes, Aubigny and Quiéry]\",[Artois],"
    (csv/parse-csv))

(->> "1367-1369, \"[Bailliages of Arras, Avesnes, Aubigny and Quiéry]\",[Artois],"
    (csv/parse-csv))

(->> "1367-1369,\"[Bailliages of Arras, Avesnes, Aubigny and Quiéry]\" ,[Artois],"
    (csv/parse-csv))

The first line produces the expected results.

(["1367-1369" "[Bailliages of Arras, Avesnes, Aubigny and Quiéry]" "[Artois]" ""])

But the other two lines seems to have issues. Either some overzealous splitting that didn't respect the double-quoted string, or just swallowing a whole entry.

(["1367-1369" " \"[Bailliages of Arras" " Avesnes" " Aubigny and Quiéry]\"" "[Artois]" ""])

(["1367-1369" " " "[Artois]" ""])

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