[issue6788] codecs.open on Win32 does not force binary mode

2009-08-27 Thread Ryan McGuire
Ryan McGuire python@enigmacurry.com added the comment: Uploading a doctest for this. The tests are successful on Linux using Python 2.6 They fail on Win32 with Python 2.6 -- Added file: http://bugs.python.org/file14788/codecs_bug.py ___ Python

[issue6788] codecs.open on Win32 does not force binary mode

2009-08-26 Thread Ryan McGuire
New submission from Ryan McGuire python@enigmacurry.com: Opening a UTF-8 encoded file with unix newlines (\n) on Win32: codecs.open(whatever.txt,r,utf-8).read() replaces the newlines (\n) with CR+LF (\r\n). The docs specifically say that : Files are always opened in binary mode, even