Teach unquote() to handle unicode inputs

This commit is contained in:
Raymond Hettinger 2005-10-15 16:41:53 +00:00
parent 239322b97e
commit 4b0f20def3
2 changed files with 6 additions and 0 deletions

View file

@ -415,6 +415,10 @@ class UnquotingTests(unittest.TestCase):
self.assertEqual(expect, result,
"using unquote_plus(): %s != %s" % (expect, result))
def test_unquote_with_unicode(self):
r = urllib.unquote(u'br%C3%BCckner_sapporo_20050930.doc')
self.assertEqual(r, u'br\xc3\xbcckner_sapporo_20050930.doc')
class urlencode_Tests(unittest.TestCase):
"""Tests for urlencode()"""