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 pitrou
Recipients georg.brandl, jaywalker, jdwhitley, pitrou, sjmachin, skip.montanaro, vstinner
Date 2009-03-09.10:39:32
SpamBayes Score 1.9296344e-07
Marked as misclassified No
Message-id <1236595224.8096.6.camel@fsol>
In-reply-to <1236581351.09.0.0878535306965.issue4847@psf.upfronthosting.co.za>
Content
> Not good. It should preserve ALL characters in the field.

Please look at the doc for open() and io.TextIOWrapper. The `newline`
parameter defaults to None, which means universal newlines with newline
translation. Setting to '' (yes, the empty string) enables universal
newlines but disables newline translation (that it, it will split lines
on all of ['\n', '\r', '\r\n'], but will leave these newlines intact
rather than convert them to '\n').

However, I think csv should accept files opened in binary mode and be
able to deal with line endings itself. How am I supposed to know the
encoding of a CSV file? Surely Excel uses a defined, default encoding
when exporting to CSV... that knowledge should be embedded in the csv
module.
History
Date User Action Args
2009-03-09 10:39:36pitrousetrecipients: + pitrou, skip.montanaro, georg.brandl, sjmachin, vstinner, jaywalker, jdwhitley
2009-03-09 10:39:33pitroulinkissue4847 messages
2009-03-09 10:39:32pitroucreate