[issue2131] "codecs" module on Windows uses incorrect end-of-line, wiriting broken Unicode (UTF-8) files

Antoine Pitrou report at bugs.python.org
Sun Feb 17 00:15:13 CET 2008


Antoine Pitrou added the comment:

As stated in the codecs.open() docstring: """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 certainly means
you have to insert "\r\n" yourself (instead of just "\n") if you want
the file contents to respect the end-of-line convention under Windows...

----------
nosy: +pitrou

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2131>
__________________________________


More information about the Python-bugs-list mailing list