[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Why does Lua not want to write 13 to binary files on Windows?
- From: Sean Conner <sean@...>
- Date: Wed, 15 Feb 2023 13:23:23 -0500
It was thus said that the Great Michal Kottman once stated:
> On Wed, Feb 15, 2023, 12:10 Johann ''Myrkraverk'' Oskarsson <
> email@example.com> wrote:
> > I know the number 13 is supposed to be unlucky, but this is a bit
> > ridiculous. Why is it special?
> Just to provide context, what you are experiencing is the concept of "line
> feed" (LF) and "carriage return" (CR) and "newline" and how they are
> represented in different operating systems (Windows, Linux, ...) and
> runtimes (e.g. fopen with text/binary modes):
Nope. Johann is opening the file in binary mode, not text mode. What you
are describing doesn't apply for files open in binary mode.