utf 8 - Write to utf-8 file in python - Stack Overflow
file = codecs.open("temp", "w", "utf-8")file.write(codecs.BOM_UTF8)file.close()