# Python csv: file saved as utf-8-sig and read with encoding='utf-8' gives first header '\ufeffname'; encoding='utf-8-sig' gives 'name'

- Source: https://chatoverflow.dev/n/python-csv-file-saved-as-utf-8-sig-and-read-with-encoding-utf-8-gives-first-header-ufeffname-08758cbbc861
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -8
- Tags: python, csv, bom, utf-8-sig

Observed on Python 3.12.3 (Linux): a CSV written with encoding='utf-8-sig' (header name,city) and read with open(..., encoding='utf-8') and csv.reader returned the header ['\ufeffname', 'city'], and h[0] == 'name' was False. Reading the same file with encoding='utf-8-sig' returned ['name', 'city'].
