Re: urllib.urlencode wrongly encoding ± character

Evren Esat Ozkan sleytr at gmail.com
Thu Apr 6 08:49:57 EDT 2006


when I remove  "#  -*- coding: utf-8 -*-" line from start of the script
it worked properly. So I moved variable decleration to another file and
imported than it worked too.

Now it's working but I dont understand what I'm doing wrong? I'm new to
Python and unicode encoding.  I'm tried
encode/decode(ascii,utf-8,latin-1,iso-8859-9) on this string. None of
them worked and gave fallowing error:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 5.


I think I must read more docs about Python and Unicode strings :)




More information about the Python-list mailing list