New submission from Kalon Mills: cvs.reader improperly prematurely ends row parsing when parsing a row with an escaped newline but with quoting turned off. cvs.reader properly handles quoted newlines. cvs.writer properly handles writing escaped unquoted newlines so only the reader has an issue.
Given a dialect with escapechar='\\', quoting=csv.QUOTE_NONE, lineterminator='\n': writer.writerow(['one\nelement']) will correctly write 'one\\\nelement\n' however pass that back into a reader and it will produce two rows: ['one\n'] ['element'] I would expect the reader to parse it correctly and return the original value of ['one\nelement'] I've attached a test script that exhibits the improper behavior. It uses a dialect to set an escapechar and disable quoting. ---------- components: None files: test_csv.py messages: 170352 nosy: kalaxy priority: normal severity: normal status: open title: cvs.reader does not support escaped newline when quoting=cvs.QUOTE_NONE type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file27177/test_csv.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15927> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com