Bugs item #1098990, was opened at 2005-01-09 17:45 Message generated for change (Comment added) made by doerwalter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1098990&group_id=5470
Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Irmen de Jong (irmen) Assigned to: Nobody/Anonymous (nobody) Summary: codec readline() splits lines apart Initial Comment: It seems that the fix for bug 1076985 (Incorrect behaviour of StreamReader.readline leads to crash) has introduced a new bug. using current cvs Python on Linux, I observe faulty behavior of the readline() method on file-like objects returned from the codecs module. See the attached example.txt. The readline() breaks certain lines in half. It only happens when a certain encoding is used, so regular file objects behave as expected. Also, readlines() works fine. ---------------------------------------------------------------------- >Comment By: Walter Dörwald (doerwalter) Date: 2005-01-10 12:15 Message: Logged In: YES user_id=89016 The problem is that the first readline() reads more than the first line, returns the first line and puts back the rest for the next read. The next call to readline() discovers that there is already data there and doesn't call read() again. I'm working on a patch. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1098990&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com