lua-users home
lua-l archive

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


On Tue, Nov 10, 2020 at 2:27 PM Oliver Kroth <oliver.kroth@nec-i.de> wrote:

> This is neither a Lua nor a C thing.

This is a C (standard library) thing, because this is documented in
the C language standards.

> It is actually a peculiarity of > CP/M / MSDOS / Windows, which have two modes for reading files:

Neither MS-DOS nor Windows have two file modes that would be similar
to the C "binary" and "text" "streams" (with reference to, e.g., ISO
C99 Standard 7.19.2). MS-DOS and Windows API expose files as bytes
streams (or possibly sequences of fixed-size blocks of bytes), and
they most certainly do not do any kind of translation.

Cheers,
V.