my project want web2py support non-ascii char URL, example:

http://127.0.0.1:8000/welcome/default/index/中国

because the URL have chinese's char , so web2py will report : Invalid
request

resolve:

edit gluon/main.py file, diff output:

39c39
< regex_url=re.compile('(?:^$)|(?:^\w+/?$)|(?:^\w+/\w+/?$)|(?:^(\w+/)
{2}\w+/?$)|(?:^(\w+/){2}\w+(/[\w\-]+(\.[\w\-]+)*)+$)|(?:^(\w+)/static(/
[\w\-]+(\.[\w\-]+)*)+$)')
---
> regex_url=re.compile('(?:^$)|(?:^\w+/?$)|(?:^\w+/\w+/?$)|(?:^(\w+/){2}\w+/?$)|(?:^(\w+/){2}\w+(/[\w\-]+(\.[\w\-]+)*)+$)|(?:^(\w+)/static(/[\w\-]+(\.[\w\-]+)*)+$)',re.U)
127a128
>             path = unicode(path, "utf8")
130a132,136
>             temp = []
>             for i in items:
>                 i = i.encode("utf8")
>                 temp.append(i)
>             items = temp


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to