lua-users home
lua-l archive

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

>> 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 [...]
> 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.

No, but it may well apply to other tools.  In particular, it would not
surprise me if the reason the hex dumper mentioned upthread didn't
display it correctly had something to do with the Windows tendency to
represent line breaks as CRLF instead of NL.  (A hex dumper _should_ be
using binary mode, or the analog for whatever language it's written in.
But it might not be, or it might have a bug that's triggered by a CR
with no preceding octet, or some such.)

No, I'll make that stronger: not just "it wouldn't surprise if it did",
but even "it would surprise me if it didn't".

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B