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

2010-04-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

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

2009-08-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I think your test is invalid: it creates the file in "w" mode, so \n are written as two bytes \r\n on the disk. codecs.open just reads them back. -- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> pending __

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

2009-08-27 Thread Ryan McGuire
Ryan McGuire 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 tracker

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

2009-08-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ryan McGuire wrote: > > New submission from Ryan McGuire : > > 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 specifi

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

2009-08-26 Thread Ryan McGuire
New submission from Ryan McGuire : 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 if no binary mode