[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: embedding zeroes
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 20 Dec 2011 09:08:58 -0200
> 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...