lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 29/01/16 06:34, Dirk Laurie wrote:
> I'm developing a Lua program under Linux that may in some
> not totally unforeseeable future need to run under Windows.
> Do line endings get standardized when Lua reads a text file?

Lua seems to be pretty happy with either line ending under Windows.

The problem you might run into is Notepad.exe doesn't handle UNIX line
endings, so editing stuff on a Win machine can be awkward. Might want to
have a decent text editor to hand if you ever need to deal with that or
point a user to one.

Also a lots of MS apps insist on adding UTF8 BOMs to their files (hello
Notepad.exe, again). So be prepared to strip or skip them. A lot of
Windows stuff also uses UTF16 encoding for text files, so you might find
yourself having to convert that too.