diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 577b4b9b03a88de..d097a98488e0dac 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -411,8 +411,6 @@ def append(self, mailbox, flags, date_time, message): else: date_time = None literal = MapCRLF.sub(CRLF, message) - if self.utf8_enabled: - literal = b'UTF8 (' + literal + b')' self.literal = literal return self._simple_command(name, mailbox, flags, date_time) diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index 60f5b671b1da485..8de6ea90250a995 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -324,7 +324,7 @@ def cmd_APPEND(self, tag, args): typ, data = client.append(None, None, None, msg_string.encode('utf-8')) self.assertEqual(typ, 'OK') self.assertEqual(server.response, - ('UTF8 (%s)\r\n' % msg_string).encode('utf-8')) + ('%s\r\n' % msg_string).encode('utf-8')) def test_search_disallows_charset_in_utf8_mode(self): class UTF8Server(SimpleIMAPHandler): @@ -775,7 +775,7 @@ def cmd_APPEND(self, tag, args): self.assertEqual(typ, 'OK') self.assertEqual( server.response, - ('UTF8 (%s)\r\n' % msg_string).encode('utf-8') + ('%s\r\n' % msg_string).encode('utf-8') ) # XXX also need a test that makes sure that the Literal and Untagged_status