PythonistL wrote:
> Is it possible to use non English characters in URL?To explain,
> 
> in my urls.py I use
> 
> (r'^shop/(?P<shop_name>.*?)/(?P<category_name>.*?)/','shopproject.apps.shop.views.shop.IndexByCategory'),
> 
> where
> category_name
> can consist non English characters.In my view i use
> 
> def IndexByCategory(request,shop_name,category_name):
> ...
> ...
> 
> 
>  I noted  that in my browser address bar that category_name is not
> properly coded ( if consists non-English characters) and  I can not use
> F5( refresh) either.
> Anyone solved that problem?
> Thank you for help.


generally such situations are solved using a SlugField.. which is a 
textfield that can only contain alphanumeric characters + the minus-sign 
i think. so with those there are no url problems.

now back to your problem.

generally, having non-ascii characters in the URLs is problematic.

usually if they are in utf8, there's a chance that they will be displayed.

but then it also depends on the browser, for example firefox 
(intentionally) does not display them correctly...

so i would recommend you to use a SlugField, if possible.

if it's not possible, and my advice did not help, please describe to us:

- the charset you use in the URL
- which browser
- an actual example (an url that exhibits the problem)

gabor

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to