Menu

#3 Text files should not be read as binary

open
nobody
None
5
2006-06-08
2006-06-08
No

Text files should not be read as binary; this causes
problems with interoperability. It has caused me some
headaches in the file reading/writing code. It also
hides some bugs in the engine itself -- notably in
the handling of logon.data and newaccount.data.

These two files are saved in \r\n format, and this is
crucial, because they are written out exactly as they
appear in the file. If a user edits the file and
saves it with only \n at the end of lines, the telnet
output is all garbled. Telnet output must have \r\n
line endings.

The correct behavior is to read all text files as
text, not binary. logon.data and newaccount.data
should simply be adjusted after loading them up -- \n
becomes \r\n.

Discussion


Log in to post a comment.

Auth0 Logo