From: Sean O'Halpin Date: 2005-10-26T06:36:55+09:00 Subject: Re: ruby gives different answer for checksum of files on windows and FreeBSD? On 10/25/05, daz wrote: > C's "fopen" seems to have missed this fact (??) It's part of ANSI C for stdio to open files by default in text mode. This does nothing on Unix but it converts CRLF (\r\n) to LF (\n) on Windows. This means you can write portable text processing programs in C (and in Ruby). If you're handling binary, you have to know what you're doing to write portable programs - binmode is the least of it. Changing to binmode by default would cause a lot more confusion for newbies and casual programmers on Windows. There'd be a lot of "how do I get rid of this \r character?" posts for a start. I reckon a lot more than binmode causes. Regards, Sean