From: "Jan E." Date: 2012-06-28T06:49:30+09:00 Subject: Re: CSV.open problem, help please Bartosz DziewoƄski wrote in post #1066424: > Windows uses \r\n for newlines. Linux uses \n. Ruby's CSV apparently > doesn't support \r\n, only \n. > > Opening files in "r" mode performs some conversion on the input, for > example encoding conversion or *drum roll* newline conversion. "rb" > (binary) mode suppresses them and yields precisely the same bytes as > present in the file. Well, but then you would expect the problem to occur in "rb" mode and not in "r" mode. Because when all CRLF are converted into LF, they should be just as good as "original" Linux newlines. But it's actually the other way round: While "rb" works, "r" doesn't. And it also seems to depend on the Ruby version (or version of the CSV parser). -- Posted via http://www.ruby-forum.com/.