Hi everyone!
I actually work on an interactive book.
For that, I use .txt file for the story.
I use this code :
1 2 3 4 5 6 | sRecup = file:read( "*l" ) while ( sRecup ~= nil ) do contents1 = contents1..sRecup.."\n" sRecup = file:read( "*l" ) end print ( string.format( '%q', contents1 ) ) |
I was having a similar problem. There is some good info on it here:
http://en.wikipedia.org/wiki/Newline#Common_problems
I found that by recreating my text files in my code editor(IntelliJ Idea) and re-saving, I could use the .txt file across both Windows and Mac.