"nyenyec" <[EMAIL PROTECTED]> wrote:
> but it seems to work in Python 2.3.5
>
> Python 2.3.5 (#1, Aug 19 2006, 21:31:42)
> [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
import sys, urllib
print sys.versio
On 7 ene, 15:48, "nyenyec" <[EMAIL PROTECTED]> wrote:
> urllib.quote chokes on unicode in 2.4.4.
>>> urllib.quote(u"\xe9")
> KeyError: u'\xe9'
>
> but it seems to work in Python 2.3.5
>
> Is this a known bug?
See some recent posts about "urllib.unquote and unicode"
--
Gabriel Genellina
--
htt
encode seems to solve my problem:
>>> urllib.quote(u'\xe9'.encode('utf-8'))
'%C3%A9'
Cheers,
nyenyec
nyenyec wrote:
> urllib.quote chokes on unicode in 2.4.4.
>
> >>> print sys.version
> 2.4.4 (#1, Oct 18 2006, 10:34:39)
> [GCC 4.0.1 (Apple Computer, Inc. build 5341)]
> >>> urllib.quote(u"\xe9")
urllib.quote chokes on unicode in 2.4.4.
>>> print sys.version
2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)]
>>> urllib.quote(u"\xe9")
Traceback (most recent call last):
File "", line 1, in ?
File
"/Library/Frameworks/Python.framework/Versions/2.4//lib/python2