'ascii' codec can't encode character u'\xf3'

Leif K-Brooks eurleif at ecritters.biz
Mon Aug 16 19:12:35 EDT 2004


oziko wrote:
> So I do not understan why the script uses an ascii codec, Am I not using 
> Unicode coding?

The strings use Unicode, but they have to be encoded somehow to be 
outputted. The default encoding is ASCII, which doesn't support all of 
those fancy Unicode characters. Figure out what encoding your terminal 
is expecting (probably utf-8) and encode all strings in that when 
they're outputted or set a default encoding.



More information about the Python-list mailing list