python encode utf-8 command write code example
Example 1: python open encoding utf-8
from io import open
f = open("test", mode="r", encoding="utf-8")
Example 2: python write txt utf8
import codecs
file = codecs.open("lol", "w", "utf-8")
file.write(u'\ufeff')
file.close()