lua-users home
lua-l archive

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


> why does luaL_loadfilex opens the script file in text mode?

Because scripts are supposed to be text. If your OS allows arbitrary data
in text files, that's fine.

If you're suggesting that script files should always be opened in binary
mode, this cannot be done in ANSI C unless you know what to expect from
text files in your OS. ANSI C seems to cater for strange filesystems that
have fixed-size records and so lines or blocks may have unknown padding
and other control characters such as ^Z...