Re: Non ASCII URL characters in Django

2009-07-27 Thread Shivaraj
Sorry ,a little bit of complication which I overlooked was the issue. I escaped a URL parameter to urls.py which took some form like http://mysite?param=%u0410%u0433%u0430 and then I unquoted it and converted to unicode by param = unquote(param) result = param.replace('%u','\\u').decode('uni

Re: Non ASCII URL characters in Django

2009-07-27 Thread Russell Keith-Magee
On Mon, Jul 27, 2009 at 3:26 PM, Shivaraj wrote: > > Let me repeat the original question. > If I put a nonASCII character to urlopen / urlencode and try to open > an url in python prompt it works fine. > So it's not issue with python(2.6+) as of now. > > Now I call the same functions from Django a

Re: Non ASCII URL characters in Django

2009-07-27 Thread Shivaraj
Let me repeat the original question. If I put a nonASCII character to urlopen / urlencode and try to open an url in python prompt it works fine. So it's not issue with python(2.6+) as of now. Now I call the same functions from Django and it reports error. I will give you a simple scenario. Try un

Re: Non ASCII URL characters in Django

2009-07-26 Thread Russell Keith-Magee
On Sun, Jul 26, 2009 at 9:42 PM, Shivaraj wrote: > > Django doesn't allow urlecode or urlopen when there is a non-ASCII/ > international characters in the url. Django does no such thing. Firstly, urlencode and urlopen aren't part of Django's API, so this isn't an issue of Django's making. Full u

Non ASCII URL characters in Django

2009-07-26 Thread Shivaraj
Django doesn't allow urlecode or urlopen when there is a non-ASCII/ international characters in the url. http://www.djangosnippets.org/snippets/1048/ which uses text.encode ('utf-8') helped. Reported this in http://code.djangoproject.com/ticket/2078 . Just wanted to know if this can be included