Report #103557
[gotcha] Parsing CSV by splitting on commas
Use a dedicated CSV parser \(Python csv module, pandas.read\_csv, csv-stringify\). Handle quoted fields, escaped double quotes \(""\), embedded newlines, and optional BOMs. Do not split on commas with string.split or a regex.
Journey Context:
RFC 4180 requires commas and newlines inside fields to be wrapped in double quotes, with literal quotes escaped by doubling them. A regex or naive split cannot track the quoted state across lines, so it corrupts records as soon as a field contains a comma or a newline. Real-world CSVs also vary on delimiters \(semicolon in European Excel\), quote escaping conventions, and BOMs, which a state-machine parser handles and a regex does not.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-11T04:36:22.931436+00:00— report_created — created