Index: Lib/email/test/test_email.py =================================================================== --- Lib/email/test/test_email.py (revision 71122) +++ Lib/email/test/test_email.py (working copy) @@ -1560,6 +1560,11 @@ ('rg', None), ('\xe5', 'iso-8859-1'), ('sbord', None)]) + def test_rfc2047_with_special(self): + s = '=?utf-8?q?=E2=98=BA?=(unicode white smiling face)' + dh = decode_header(s) + self.assertEqual(dh, [('\xe2\x98\xba', 'utf-8'), + ('(unicode white smiling face)', None)]) # Test the MIMEMessage class