Message170352
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. |
|
Date |
User |
Action |
Args |
2012-09-12 04:49:50 | kalaxy | set | recipients:
+ kalaxy |
2012-09-12 04:49:50 | kalaxy | set | messageid: <1347425390.54.0.862014726204.issue15927@psf.upfronthosting.co.za> |
2012-09-12 04:49:29 | kalaxy | link | issue15927 messages |
2012-09-12 04:49:28 | kalaxy | create | |
|