[issue691291] codecs.open(filename, 'U', 'UTF-16') corrupts text
flox
report at bugs.python.org
Tue Dec 1 09:00:32 CET 2009
flox <laxyf at yahoo.fr> added the comment:
Proposed patch following suggestion of And Clover.
Compliant with documentation:
«Files are always opened in binary mode, even if no binary mode was
specified. This is done to avoid data loss due to encodings using 8-bit
values. This means that no automatic conversion of '\n' is done on
reading and writing.»
----------
keywords: +patch
nosy: +flox
Added file: http://bugs.python.org/file15422/issue691291.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue691291>
_______________________________________
More information about the Python-bugs-list
mailing list