Re: Problem: neither urllib2.quote nor urllib.quote encode the unicode strings arguments

2008-10-05 Thread Miki
Hello, things like urllib.quote(uпиво Müller ) fail with error message: type 'exceptions.KeyError': u'\u043f' Similarly with urllib2. Anyone got a hint?? I need it to form the URI containing non-ascii chars . n = uпиво Müller print urllib.quote(n.encode(utf-8)) -

Re: Problem: neither urllib2.quote nor urllib.quote encode the unicode strings arguments

2008-10-04 Thread Rou Bao
On 10月4日, 上午5时38分, Valery Khamenya [EMAIL PROTECTED] wrote: Hi all things like urllib.quote(uпиво Müller ) fail with error message: type 'exceptions.KeyError': u'\u043f' Similarly with urllib2. Anyone got a hint?? I need it to form the URI containing non-ascii chars. thanks in advance,

Problem: neither urllib2.quote nor urllib.quote encode the unicode strings arguments

2008-10-03 Thread Valery Khamenya
Hi all things like urllib.quote(uпиво Müller ) fail with error message: type 'exceptions.KeyError': u'\u043f' Similarly with urllib2. Anyone got a hint?? I need it to form the URI containing non-ascii chars. thanks in advance, best regards -- Valery --

Re: Problem: neither urllib2.quote nor urllib.quote encode the unicode strings arguments

2008-10-03 Thread Jerry Hill
On Fri, Oct 3, 2008 at 5:38 PM, Valery Khamenya [EMAIL PROTECTED] wrote: Hi all things like urllib.quote(uпиво Müller ) fail with error message: type 'exceptions.KeyError': u'\u043f' Similarly with urllib2. Anyone got a hint?? I need it to form the URI containing non-ascii chars. Do you know

Re: Problem: neither urllib2.quote nor urllib.quote encode the unicode strings arguments

2008-10-03 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Valery Khamenya wrote: things like urllib.quote(uпиво Müller ) fail with error message: type 'exceptions.KeyError': u'\u043f' Did you try encoding it as UTF-8 first? -- http://mail.python.org/mailman/listinfo/python-list