Python read csv – BOM embedded into the first key
Python read csv – BOM embedded into the first key Question: I’m using Python 2.7.12. With this code snippet I’m saving a utf-8 csv file. I wrote the BOM (byte order mark) at the beginning of the file. import codecs import csv outputFile = open(“test.csv”, “wb”) outputFile.write(codecs.BOM_UTF8) fieldnames = [“a”, “b”] writer = csv.DictWriter(outputFile, fieldnames, …