Hi,

In message "Re: [ruby-core:18645] Re: Reading non-ascii compatible files"
    on Wed, 17 Sep 2008 12:04:21 +0900, "Michael Selig" <michael.selig / fs.c=
om.au> writes:

|> ruby -v -E UTF-16BE -e "IO.readlines('/tmp/xx', mode: "rb")"
|
|Thanks - I didn't know that.
|
|But I still do not understand what the "b" is actually doing? Why is it =20
|needed here?

=46rom historical reason, Windows/DOS automagically convert \r\n into \n
in file I/O.  "b" is a mode specifier to stop this conversion, which
break binary (or non-ASCII) file.

							matz.