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 unicode('район','utf-8') from any view function and it will throw a TypeError stating decoding is not permitted or so. On Jul 27, 4:55 am, Russell Keith-Magee <freakboy3...@gmail.com> wrote: > On Sun, Jul 26, 2009 at 9:42 PM, Shivaraj<shivraj...@gmail.com> 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 unicode URLs work fine with > Django itself - if you don't believe me, create a test project that > contains a model with a CharField primary key, and create an object > that uses non-ASCII characters in that key. You'll find that you can > easily point your browser at /admin/myapp/mytest/<non-ascii-chars>/. > > Secondly, the interaction of urllib and unicode is a well known problem: > > http://www.google.com/search?&q=unicode+URL+pythonhttp://bugs.python.org/issue216716http://bugs.python.org/issue1712522 > > Yours, > Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---