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 fenner
Recipients fenner
Date 2007-11-28.05:15:16
SpamBayes Score 0.09418285
Marked as misclassified No
Message-id <1196226917.03.0.0879630569127.issue1511@psf.upfronthosting.co.za>
In-reply-to
Content
When a field has internal line breaks, e.g.,

foo,"bar
baz
biff",boo

that is actually 3 lines, but one csv-file row.  csv.reader() converts 
this to ['foo', 'bar\nbaz\nbiff', 'boo'].  This is a reasonable 
behavior.

Unfortunately, csv.writer() does not use the dialect's lineterminator 
setting for values with such internal linebreaks.  This means that the 
resulting file will have a mix of line-termination styles:

foo,"bar\n
baz\n
biff",boo\r\n

If the reading csv implementation is strict about its line termination, 
these line breaks will not be read properly.
History
Date User Action Args
2007-11-28 05:15:17fennersetspambayes_score: 0.0941828 -> 0.09418285
recipients: + fenner
2007-11-28 05:15:17fennersetspambayes_score: 0.0941828 -> 0.0941828
messageid: <1196226917.03.0.0879630569127.issue1511@psf.upfronthosting.co.za>
2007-11-28 05:15:16fennerlinkissue1511 messages
2007-11-28 05:15:16fennercreate