From: brabuhr@... Date: 2011-01-26T13:11:44+09:00 Subject: Re: Obtain data from .csv On Tue, Jan 25, 2011 at 10:38 PM, Kamarulnizam Rahim wrote: > Yes im using the same file. And it worked!!! after changing into 'rb'. > Its quite inconvenient to know that different platform requires > different format. That is related to the traditional difference in line-endings between Unix (\n) and DOS (\r\n). On Windows, Ruby translates the "\r\n" to "\n"; sometimes this helps and sometimes it may hinder: http://www.ruby-doc.org/core/classes/IO.html "b" | Binary file mode (may appear with | any of the key letters listed above). | Suppresses EOL <-> CRLF conversion on Windows. And | sets external encoding to ASCII-8BIT unless explicitly | specified. http://en.wikipedia.org/wiki/Newline#Representations