Commits

mitsuhiko  committed 41fc4b1

Fixed an example.

  • Participants
  • Parent commits 0c89b5d

Comments (0)

Files changed (1)

File pep-XXXX.txt

 value is then stored in ``'wsgi.uri_encoding'``.  The application MUST use this
 value to decode the ``'QUERY_STRING'`` as well.
 
-Example implementation (this assumes that `path_info` and `script_name`
-are bytes)::
+Example implementation (this assumes that `path_info_bytes` and
+`script_name_bytes` are bytes)::
 
     try:
-        path_info = path_info.decode('utf-8')
-        script_name = script_name.decode('utf-8')
+        path_info = path_info_bytes.decode('utf-8')
+        script_name = script_name_bytes.decode('utf-8')
         uri_encoding = 'utf-8'
     except UnicodeError:
-        path_info = path_info.decode('iso-8859-1')
-        script_name = script_name.decode('iso-8859-1')
+        path_info = path_info_bytes.decode('iso-8859-1')
+        script_name = script_name_bytes.decode('iso-8859-1')
         uri_encoding = 'iso-8859-1'
 
     environ['PATH_INFO'] = path_info