1. Tim Golden
  2. CherryPy


Robert Brewer  committed ad9b5a8

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

  • Participants
  • Parent commits 800ebb8
  • Branches default

Comments (0)

Files changed (2)

File cherrypy/lib/encoding.py

View file
 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

View file
         # Make sure that encoded utf8 gets parsed correctly
-        self.assertBody(r"{'q': '\xc2\xa3'}")
+        self.assertBody(r"{'q': u'\xa3'}")
     def testEncoding(self):
         # Default encoding should be utf-8