| 917 | eq(msg['content-transfer-encoding'], 'quoted-printable') |
| 918 | |
| 919 | def test_encode7or8bit(self): |
| 920 | # Make sure a charset whose input character set is 8bit but |
| 921 | # whose output character set is 7bit gets a transfer-encoding |
| 922 | # of 7bit. |
| 923 | eq = self.assertEqual |
| 924 | msg = MIMEText('文\n', _charset='euc-jp') |
| 925 | eq(msg['content-transfer-encoding'], '7bit') |
| 926 | eq(msg.as_string(), textwrap.dedent("""\ |
| 927 | MIME-Version: 1.0 |
| 928 | Content-Type: text/plain; charset="iso-2022-jp" |
| 929 | Content-Transfer-Encoding: 7bit |
| 930 | |
| 931 | \x1b$BJ8\x1b(B |
| 932 | """)) |
| 933 | |
| 934 | def test_qp_encode_latin1(self): |
| 935 | msg = MIMEText('\xe1\xf6\n', 'text', 'ISO-8859-1') |