- What are the most common CSV validation failures?
- Inconsistent column counts (rows with missing/extra delimiters), unquoted fields containing the delimiter, BOM (byte order mark) at file start causing header parse errors, and mixed line endings (CRLF vs LF). All are detected by this validator.
- Should CSV files use commas or semicolons?
- RFC 4180 specifies commas. However, European locales that use commas as decimal separators (Germany, France) commonly use semicolons as field delimiters in Excel CSV exports. Always check which convention your data source uses.
- How do I handle CSV files with quoted fields containing newlines?
- RFC 4180 allows newlines within quoted fields. Most parsers support this, but simple line-by-line processing breaks. Use a proper CSV library (Python's csv module, Papa Parse in JS) rather than splitting on newlines.