Comment

Comment by simula67

RFC 4180 [1] Section 2.6 says:

"Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes."

If the DMS output isn’t quoting fields that contain commas, that’s technically invalid CSV.

A small normalization step before COPY (or ensuring the writer emits RFC-compliant CSV in the first place) would make the pipeline robust without renaming countries or changing delimiters.

That way, if/when the DMS output is fixed upstream, nothing downstream needs to change.

[1] https://www.rfc-editor.org/rfc/rfc4180.html

parent simula67 8 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton