New submission from Árni Már Jónsson: There is a utf-7 decoding error when decoding strings which have a shift sequence at a certain place. To reproduce run the attached program on a file containing the string: "0123456789012345678901234567890123456789012345678901234567890123456789X+-".
The shift sequence starts at character 72. The culprit seems to be in codecs.py: StreamReader.read. The input is split on the 72 character boundary, and the first decode call raises an exception since the shift sequence is not terminated. The second one falls back 1 character, raises no exception, but the previous exception is raised since there is no newline in the output (?). The lines I don't understand are, and are the ones raising the exception. if len(lines)<=1: raise ---------- files: utf7.py messages: 57629 nosy: arnimar severity: normal status: open title: codecs utf7 decoding error type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file8773/utf7.py __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1460> __________________________________
utf7.py
Description: Binary data
_______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com