On 10/25/05, Pit Capitain <pit / capitain.de> wrote: > Sean O'Halpin schrieb: > > On 10/25/05, Pit Capitain <pit / capitain.de> wrote: > > > >>I haven't heard of anyone using non-binmode on Windows. > > > > Possibly because it ~is~ the default. If you changed the default to > > binmode, I reckon you'd be hearing a lot more about 'non-binmode'! ;) > > Yes, I thought of that, too. But I really doubt that there are many Ruby > programs depending on non-binary mode. Maybe I should write a RCR so > that others could vote on this. > > Regards, > Pit Hi Pit, 'Non-binary' mode (or 'text mode') comes from the underlying C library. It's part of ANSI C and is what makes C and Ruby on Windows work like C and Ruby on Unix for all text file processing out of the box. It turns those horrible CRLFs (\r\n) into nice LFs (\n) only so programmers see a uniform interface. YMMV but I do a heck of a lot more text file processing than binary file processing in Ruby and my (admittedly non-scientific) hunch is that most Ruby users on both Unix and Windows do the same (e.g. Rails). Would you want to have to set textmode on to make all your text processing scripts portable? Yikes! But as I said, YMMV. Regards, Sean