Terry Reedy tjreedy at udel.edu
Mon Dec 17 23:03:21 CET 2012

On 12/17/2012 3:00 PM, Anatoli Hristov wrote:
>> I fixed the print, I changed the setting of the terminal and also on
>> the sshconfig, so now when I print I'm able to print out without
>> problems, but when I tried to run the script I've made it gives me
>> again the same error :
>> ""Unexpected error: exceptions.UnicodeEncodeError
>> """
>> Maybe I will try to update to 2.7
> Upgraded to python 27 and still it gives Unexpected error:
> exceptions.UnicodeEncodeError. Damn encoders I don'y know what to
> do...

If you are working with unicode, and you can upgrade to 3.3, you will 
probably we happier if you do. This does not solve all problems, but the 
python side is definitely better. (IE, there are unicode bugs in 2.7 
whose fix *is* to upgrade to 3.3.)

That said, retrieving


with Firefox on Win 7 returns a page containing

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

so I presume the http encoding is also utf-8

Also: printing to the screen in IDLE may work better than with the 
standard interactive console (especially the awful Windows version). I 
have the font set to Lucida Sans Unicode (this may be windows specific) 
which seems to works for all BMP (Basic Multilingual Plane) chars.

Terry Jan Reedy

More information about the Python-list mailing list