WarningCSV · .csv
CSV UTF-8 BOM — Invisible Bytes Breaking Headers
A CSV file starting with a UTF-8 Byte Order Mark (EF BB BF) that causes the first column header to be misread or include invisible characters.
Why It Fails
The UTF-8 BOM is 3 invisible bytes (0xEF 0xBB 0xBF) prepended to the file. Many parsers don't strip it, causing the first header to become \ufeffname instead of name. This breaks column lookups and key matching.
Hex Signature
EF BB BF 6E 61 6D 65 2C 61 67 65Expected Error Behavior
First column header contains invisible BOM character. df['name'] fails with KeyError in pandas. SQL COPY imports BOM as part of data.
Affected Software
Python csv modulepandasNode.js csv-parsePostgreSQL COPYMySQL LOAD DATA
How to Fix
Open the file with encoding='utf-8-sig' in Python. Strip BOM bytes before parsing. Save files as UTF-8 without BOM.