Antoine Pitrou <pit...@free.fr> added the comment: > 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. ---------- message_count: 12.0 -> 13.0 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4847> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com