Commits

Robert Brewer  committed ad9b5a8

Fix for #832 (Failure in test_encoding). I'm reasonably sure this is what we want.

  • Participants
  • Parent commits 800ebb8

Comments (0)

Files changed (2)

File cherrypy/lib/encoding.py

 
 
 def decode(encoding=None, default_encoding='utf-8'):
-    """Decode cherrypy.request.params."""
+    """Decode cherrypy.request.params from str to unicode objects."""
     if not encoding:
         ct = cherrypy.request.headers.elements("Content-Type")
         if ct:

File cherrypy/test/test_encoding.py

         
         # Make sure that encoded utf8 gets parsed correctly
         self.getPage("/reqparams?q=%C2%A3")
-        self.assertBody(r"{'q': '\xc2\xa3'}")
+        self.assertBody(r"{'q': u'\xa3'}")
     
     def testEncoding(self):
         # Default encoding should be utf-8