"Dinesh B Vadhia" wrote in message
news:col103-ds25bb23a18e216061c32eb1a3...@phx.gbl...
Hi! I'm processing a large number of xml files that are all declared as
utf-8 encoded in the header ie.
My Python environment has been set for 'utf-8' through site.py.
It's a bad idea to change th
That was very useful - thanks! Hopefully, I'm "all Unicode" now.
From: wesley chun
Sent: Thursday, June 04, 2009 10:45 AM
To: Dinesh B Vadhia ; tutor@python.org
Subject: Re: [Tutor] unicode, utf-8 problem again
>> But, I still get this error:
>> Trace
>> But, I still get this error:
>> Traceback (most recent call last):
>> ...
>> UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in
>> position 76: ordinal not in range(128)
>> What am I missing?
>
> Take a read through http://evanjones.ca/python-utf8.html which will give you
>
Okay, I get it now ... reading/writing files with the codecs module and the
'utf-8' option fixes it. Thanks!
From: Christian Witts
Sent: Thursday, June 04, 2009 7:05 AM
To: Dinesh B Vadhia
Cc: tutor@python.org
Subject: Re: [Tutor] unicode, utf-8 problem again
Dinesh B Va
Dinesh B Vadhia wrote:
Hi! I'm processing a large number of xml files that are all declared
as utf-8 encoded in the header ie.
My Python environment has been set for 'utf-8' through site.py.
Additionally, the top of each program/module has the declaration:
# -*- coding: utf-8 -*-
But,
Hi! I'm processing a large number of xml files that are all declared as utf-8
encoded in the header ie.
My Python environment has been set for 'utf-8' through site.py. Additionally,
the top of each program/module has the declaration:
# -*- coding: utf-8 -*-
But, I still get this error:
Tr