SyntaxFix
Write A Post
Hire A Developer
Questions
You can use codecs.
import codecs with open("test.txt",'r') as filehandle: content = filehandle.read() if content[:3] == codecs.BOM_UTF8: content = content[3:] print content.decode("utf-8")