[nos-bbs] JNOS telpac fwd to WL2K - figured out the insanity ...
maiko at pcs.mb.ca
maiko at pcs.mb.ca
Mon Mar 13 00:12:23 EST 2006
Well this just makes me shake my head in grief !
The HEXDUMP utility is a wonderful little program that lets you
print out the contents of files in a binary fashion. For instance
if you use 'hexdump -C textfile', you can clearly see stuff like
the END OF LINE :-)
As expected, most (if not all) of my files have a SINGLE end of
line character, that being 0x0a (/n). Linux does stuff like that.
BUT WAIT ... To my surprise, my forward.bbs file seems to have
not one, but TWO end of line characters, yep they are 0x0d (/r)
followed immediately after by 0x0a (/n). Gee, I must have taken
the forward.bbs file from my DOS system some time ago. Arggg !
I'm willing to bet that Torsten's and Robert's forward.bbs file
is the usual single end of line (0x0a) and that's why they had
to remove that particular piece of code (see earlier posts).
In all the years that I've been programming, I still get caught
on silly little items like this. Oh well, live and learn. Here's
a summary of how end of lines are done on different systems :
Linux, like Unix, uses a single line feed character
(LF, \n, ASCII 0x0A) to indicate End of Line.
DOS and Windows uses a carriage return followed by a
line feed (CRLF, \r\n, 0x0D 0x0A), which is generally
accepted as the standard (with no lobbying on MS part).
Mac uses only a carriage return (CR, \r, 0x0D) for an
end of line.
So there you have it. I will now go and make the parsing
of the forward.bbs file a bit more bullet proof, and then
update the source on the website when I'm done.
So sorry for all the confusion. It's been fun though :-)
Maiko Langelaar / VE4KLM
More information about the nos-bbs
mailing list