>
> Probably it is all correct (not checked), but for me it looks like
> PATH_INFO was decoded twice.


It is encoded as Latin1, but your data is utf-8.

PEP3333 explicitly says that unicode/string must use the latin1 as encoding

You have to use something like this:

bytes(e['PATH_INFO'], 'latin1').decode('utf-8')

I am a big utf-8 fan, so i am agree with you that working with REQUEST_URI
is probably better/safer (even if it cannot be portable to other WSGI
servers)

For the WSGI2/PEP444 standard, ORIG_SCRIPT_NAME and ORIG_PATH_INFO has
been proposed. They should solve this very annoying problem.
-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to