Web2py is on Ubuntu 10.4
I have windows 7 (so, there is cp1251)

So, if i check cyrillic value in app/controller/function/args/other
like:
(r'/\xd1\x80\xd0\xb8\xd0\xbb\xd1\x8d\xd0\xb9\xd0\xbd\.
\xd1\x80\xd1\x84', r'/myapp/default/index')
it works fine

But if I check it in domain, like
(r'.*://\xd1\x80\xd0\xb8\xd0\xbb\xd1\x8d\xd0\xb9\xd0\xbd\.
\xd1\x80\xd1\x84:.* /?', r'/myapp/default/index')

it doesn't work.

I type in view {{=request.env.http_host}}
and the result is:
xn--h1acfjl4f.xn--p1ai

Also if I try to pass some cyrillic string as args, it rises invalid
request.
So, it seems, that web2py can't work with cyrillic symbols in url for
now :(

On 17 апр, 21:58, Massimo Di Pierro <[email protected]>
wrote:
> what is the encoding? What is the os?
>
> I do not think a domain may contain chars that are not expressible in
> utf8 but I may be wrong.
>
> On Apr 17, 10:51 am, LightOfMooN <[email protected]> wrote:
>
>
>
>
>
>
>
> > request.env.http_host>> 'xn--h1acfjl4f.xn--p1ai'
>
> > So, domain not in utf-8
> > How to route it?
>
> > On 17 апр, 21:47, LightOfMooN <[email protected]> wrote:
>
> > > It's s strange
> > > There is 2 rules
>
> > > 1)
> > > (r'.*://\xd1\x80\xd0\xb8\xd0\xbb\xd1\x8d\xd0\xb9\xd0\xbd\.
> > > \xd1\x80\xd1\x84:.* /?', r'/myapp/default/index'),
>
> > > 2)
> > > (r'/\xd1\x80\xd0\xb8\xd0\xbb\xd1\x8d\xd0\xb9\xd0\xbd\.
> > > \xd1\x80\xd1\x84', r'/myapp/default/index'),
>
> > > 2nd works fine, but not 1st. I can't understand, why.

Reply via email to