From: Pit Capitain Date: 2005-10-26T16:04:25+09:00 Subject: Re: ruby gives different answer for checksum of files on windows and FreeBSD? Sean O'Halpin schrieb: > 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. Thanks to you and Daz for the detailed answer. So it seems that the editors you normally use make a difference whether you prefer text or binary mode. Regards, Pit