DDateihafen Notes
File Formats / Reference note

CSV: make the dialect explicit

CSV is useful for tabular interchange, but delimiters, encodings and line endings vary between producers. Agree on the dialect before importing.

Quoting rules

In the common RFC 4180 convention, fields containing commas, quotes or line breaks are quoted. A quote inside a quoted field becomes two quotes.

name,note
Ada,"Contains a comma, here"
Lin,"Said ""hello"""

Use a CSV parser rather than splitting every line on commas. Quoted fields can contain line breaks. Keep row lengths consistent and tell the reader whether the first row is a header.

Types need a contract

CSV has no built-in numeric or date types. Document timezone, decimal notation, empty-field meaning and identifier handling. Spreadsheet imports can alter leading zeros; import those columns as text.

Reference: RFC 4180.

← Back to File Formats