Get document as normal text and not as binary data
mail at markus-franz.de
Tue Mar 29 20:13:47 CEST 2005
Kent Johnson wrote:
> My guess is the html is utf-8 encoded - your sample looks like
> utf-8-interpreted-as-latin-1. Try
> contents = f.read().decode('utf-8')
YES! That helped!
I used the following:
contents = f.read().decode('utf-8')
contents = contents.encode('iso-8859-15')
That was the perfect solution for my problem! Thanks a lot!
More information about the Python-list