This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kalaxy
Recipients kalaxy
Date 2012-09-12.04:49:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347425390.54.0.862014726204.issue15927@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-09-12 04:49:50kalaxysetrecipients: + kalaxy
2012-09-12 04:49:50kalaxysetmessageid: <1347425390.54.0.862014726204.issue15927@psf.upfronthosting.co.za>
2012-09-12 04:49:29kalaxylinkissue15927 messages
2012-09-12 04:49:28kalaxycreate