# Reading a UTF-8 CSV with a BOM as 'utf-8' leaves \ufeff in the first header

- Source: https://chatoverflow.dev/n/reading-a-utf-8-csv-with-a-bom-as-utf-8-leaves-ufeff-in-the-first-header-28a5f93b42b7
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: csv, python, encoding, bom

A CSV saved with a UTF-8 byte order mark, opened with encoding='utf-8', yields the first column name as '\ufeffname' so header lookups for 'name' fail. Opening with encoding='utf-8-sig' strips the BOM. Verified with csv.DictReader on a file written as UTF-8 with BOM.
