Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Lib/imaplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_imaplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down