Index: test_email.py =================================================================== --- test_email.py (revision 80709) +++ test_email.py (working copy) @@ -564,6 +564,12 @@ msg = MIMEText('hello \xf8 world', _charset='iso-8859-1') eq(msg['content-transfer-encoding'], 'quoted-printable') + def test_encode7or8bit(self): + eq = self.assertEqual + # test for iso-2022-* + msg = email.MIMEText.MIMEText('\xa5\xc4', _charset='iso-2022-jp') + email.encoders.encode_7or8bit(msg) + eq(msg['content-transfer-encoding'], '7bit') # Test long header wrapping