I have html file to read parse etc, it's encode on unicode (I saw it with the notepad) but when I tried
infile = open("path", "r")
infile.read()
it fails and I had the famous error :
UnicodeEncodeError: 'charmap' codec can't encode characters in position xx: character maps to undefined
So for test I tried to copy paste the contain of the file in a new one and save it in utf-8 and then tried to open it with codecs like this :
inFile = codecs.open("path", "r", encoding="utf-8")
outputStream = inFile.read()
But I get this error message :
UnicodeEncodeError : 'charmap' codec can't encode character u'\ufeff' in position 0: charcater maps to undefined
I really don't understand because I was created this file in utf8.