durusmail: quixote-users: urllib.quote() change in 2.4.2
urllib.quote() change in 2.4.2
2006-01-16
2006-01-17
2006-01-17
2006-01-17
urllib.quote() and cgi.escape()
2006-01-17
2006-01-19
2006-01-20
2006-01-20
2006-01-23
2006-01-24
2006-01-26
2006-01-26
2006-01-27
2006-01-17
urllib.quote() change in 2.4.2
Oleg Broytmann
2006-01-17
On Mon, Jan 16, 2006 at 06:02:12PM -0500, David Binger wrote:
> We just noticed that, in Python 2.4.2,
> urllib.quote(u'\xe9') raises a KeyError.
>
> In Python 2.4.1, the exception is not raised,
> and the result is '%E9'.

   In any case you should not try to quote unicode strings. It's
meaningless. Always .encode() it to the client encoding.

Oleg.
--
     Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.
reply