Unicode issue with Python v3.3
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Thu Apr 11 04:20:47 EDT 2013
On Thu, 11 Apr 2013 07:50:19 +0000, Steven D'Aprano wrote:
> On Thu, 11 Apr 2013 00:13:46 -0700, nagia.retsina wrote:
>
>> Since now we k ow the problem maybe we can tell metrites.py to open
>> index.html using utf-8 encoding rather as binary, dont you think?
>
> What makes you think it is UTF-8?
>
> Last time you tried decoding content as UTF-8, you got an error that it
> wasn't a legal UTF-8 file.
Oops, sorry, correction. It wasn't a legal UTF-8 string. It was an
environment variable that was causing the decoding error, since it
contained illegal bytes for a UTF-8 string.
> Where does index.html come from? Whatever program generates that, you
> need to find out what encoding it is using.
--
Steven
More information about the Python-list
mailing list