[issue4847] csv fails when file is opened in binary mode

Skip Montanaro report at bugs.python.org
Mon Mar 9 16:22:16 CET 2009


Skip Montanaro <skip at pobox.com> added the comment:

me> What should be the default?

Scratch that.  If the iterator passed to csv.reader is in a mode which will
cause it to emit bytes instead of unicode objects the caller must give an
encoding.  The csv.reader code will then perform the necessary
bytes-to-unicode conversion.  If bytes are returned by the iterator but no
encoding was given it should raise an exception (something standard?
something new?).

Skip

----------
message_count: 20.0 -> 21.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4847>
_______________________________________


More information about the Python-bugs-list mailing list