From: 7stud -- Date: 2008-02-01T23:56:36+09:00 Subject: Re: is this a complex encoding problem? 7stud -- wrote: > Tim Perrett wrote: >> Or >> that the carriage returns are correct. >> If the file is going to be used on windows, you need to write \r\n at the end of the lines. If the file is going to be used on a Mac, you need to write \n. If you program is going to be used on different os's to generate that file, then can get the newline for the system from the global variable $/, or to avoid using such cryptic variable names in your code, you can require 'english' and use $INPUT_RECORD_SEPARATOR. -- Posted via http://www.ruby-forum.com/.