Re: urlib.quote gives KeyError in Python 2.4.4 but workin 2.3.5

2007-01-07 Thread Duncan Booth
"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

Re: urlib.quote gives KeyError in Python 2.4.4 but workin 2.3.5

2007-01-07 Thread Gabriel Genellina
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

Re: urlib.quote gives KeyError in Python 2.4.4 but workin 2.3.5

2007-01-07 Thread nyenyec
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")

urlib.quote gives KeyError in Python 2.4.4 but workin 2.3.5

2007-01-07 Thread nyenyec
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