From: Gary Wright Date: 2009-02-17T00:44:34+09:00 Subject: Re: invalid byte sequence in US-ASCII (ArgumentError) On Feb 16, 2009, at 10:33 AM, Tom Link wrote: > Actually, this is a point I have never quite understood. Why does only > the windows version convert line endings? Because at the operating system level Windows distinguishes between text and binary files and Unix doesn't. The "b" option has been part of the standard C library for decades and Windows is not the only operating system that distinguishes between text and binary files. Proper handling of line termination requires the library to know if it is working with a binary or text file. On Unix it doesn't matter if you fail to give the library correct information (i.e. omit the b flag for binary files) but your code becomes non-portable. It will fail on systems that treat text and binary files differently. Gary Wright