urllib.urlencode wrongly encoding ± character

Fredrik Lundh fredrik at pythonware.com
Thu Apr 6 10:45:35 EDT 2006


Evren Esat Ozkan wrote:

> 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.

the coding directive controls how *unicode* literals in the *source code*
are parsed into unicode string objects.  it has absolutely nothing to do with
how urlencode works.

if would help if you posted a short self-contained code snippet, so we
don't have to keep guessing.

</F>






More information about the Python-list mailing list