Raghuram Devarakonda added the comment:

Index: Lib/imaplib.py
===================================================================
--- Lib/imaplib.py      (revision 58956)
+++ Lib/imaplib.py      (working copy)
@@ -228,7 +228,7 @@
         self.port = port
         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         self.sock.connect((host, port))
-        self.file = self.sock.makefile('rb')
+        self.file = self.sock.makefile('r', encoding='ASCII', newline='')
 
 
     def read(self, size):

-------------

This patch fixes the issue but I am not entirely sure that it is
correct. I quickly looked at IMAP RFC and there does seem to be spec for
CHARSET in which case, that will have to be used instead of ASCII. It
requires more research and imap knowledge which I can't claim.

As for the tests, we need a imap server to connect to. Perhaps, google
wouldn't mind being used for this purpose?

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1210>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to