On Tuesday, May 24, 2016 at 1:49:30 PM UTC-7, Ivan Gazzola wrote:
>
> I've tried an URI like this "app/controller/function/1%C2%B0%20Classe" for
> sending the "1° Classe" value
>
> If in my function i call
>
> request.args(0)
>
> I get "1__Classe"
>
> If I call
>
> request.url.split('/')[-1]
>
> I get "1° Classe"
>
> Why? I've tried to find the source code for args assignment but I can't
> find it :(
>
> Thx
>
> Ivan
>
request.args is a list (of strings), so I'd expect the request.args[0]
syntax, and indeed that seems to be the most common, but appadmin.py does
have request.args(0) in a few places, request.args(2) in one, and
request.args(1,
cast=int) in another. The book seems to use both syntaxes, also.
The request.args list is generated by "the equivalent of
request.env.path_info.split('/')[3:].", but that doesn't say there isn't
special handling of escaped multibyte characters
/dps
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.