Adding BOM (unicode signature) while saving file in python

Write it directly at the beginning of the file:

file_new.write('\ufeff')

Leave a Comment