2008/10/1 Graham Dumpleton <[EMAIL PROTECTED]>: > 2008/10/1 Toshio Kuratomi <[EMAIL PROTECTED]>: >> >> >> >> On Sep 30, 4:32 am, "Clodoaldo Pinto Neto" <[EMAIL PROTECTED]> >> wrote: >>> >>> I tested that url with Firefox and Opera in Linux utf-8 and what >>> happens is that Firefox does what Brian says. But testing Firefox in >>> Windows XP it substitutes € for %80 and IE6 changes € to %e2%82%ac. >>> >> You have to look at what's going on on the server, I'm afraid because >> the various clients you use are going to perform various >> transformations that may or may not have anything to do with what's >> being sent between the wsgi server and the wsgi app. > > Can some clearly just tell me what you want me to test. > > For Python 3.0, if I use a URL: > > /wsgi/scripts/echo3000.py/%E2%82%AC.html > > in Safari, where: > > /wsgi/scripts/echo3000.py > > just echos back WSGI environment, the following happen. > > 1. Once submit request Safari changes that symbol in URL bar to a Euro symbol. > > 2. In Apache access logs I get: > > ::1 - - [01/Oct/2008:16:34:57 +1000] "GET > /wsgi/scripts/echo3000.py/%E2%82%AC.html HTTP/1.1" 200 1858 > > 3. In response to browser, relevant values from WSGI environment are: > > PATH_INFO: '/â\x82¬.html' > PATH_TRANSLATED: '/usr/local/apache-2.2.4/htdocs/â\x82¬.html' > QUERY_STRING: '' > REQUEST_METHOD: 'GET' > REQUEST_URI: '/wsgi/scripts/echo3000.py/%E2%82%AC.html' > SCRIPT_FILENAME: '/usr/local/wsgi/scripts/echo3000.py' > SCRIPT_NAME: '/wsgi/scripts/echo3000.py' > > Remember that this is what Apache passes and all mod_wsgi is doing is > converting them to Unicode string as latin-1. > > For Python 2.3 get: > > 1. Safari does same obviously. > > 2. In Apache access logs, also same: > > ::1 - - [01/Oct/2008:16:41:29 +1000] "GET > /wsgi/scripts/echo.py/%E2%82%AC.html HTTP/1.1" 200 7118 > > 3. In echoed response get: > > PATH_INFO: '/\xe2\x82\xac.html' > PATH_TRANSLATED: '/usr/local/apache-2.2.4/htdocs/\xe2\x82\xac.html' > QUERY_STRING: '' > REQUEST_METHOD: 'GET' > REQUEST_URI: '/wsgi/scripts/echo.py/%E2%82%AC.html' > SCRIPT_FILENAME: '/usr/local/wsgi/scripts/echo.py' > SCRIPT_NAME: '/wsgi/scripts/echo.py' > > The difference here obviously being that in Python 2.3 they aren't > Unicode strings byte Python 2.X byte strings (ie. conventional > string). > > I'll try and update my script to put a link onto itself so can check > what referrer says on click though.
Better still, someone construct a small WSGI application etc which does what you want to test various cases and I'll run it under Python 2.3 and 3.0. If script is for Python 2.X, I can convert it to Python 3.0 if need be. Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to modwsgi@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~----------~----~----~----~------~----~------~--~---