EOL, LF, no CR in accompanying TXT files
Moderators: fgagnon, nikos, Site Mods
EOL, LF, no CR in accompanying TXT files
Has this been discussed before?
Apart from changes.txt, the other four TXT files that come with x2:
Editor2.txt
licence.txt
registry.txt
x2tips.txt
only have LF for EOL, and they do not display correctly in Notepad.
The same goes for the readme.txt that comes with narayan’s PDF.
Why is this?
Apart from changes.txt, the other four TXT files that come with x2:
Editor2.txt
licence.txt
registry.txt
x2tips.txt
only have LF for EOL, and they do not display correctly in Notepad.
The same goes for the readme.txt that comes with narayan’s PDF.
Why is this?
Those files were probably created in a non-windoze-specific environment, CP/M-Unix-Linux-Mac-etc or another app where the extra CR is not used for a new line. Rather in those more advanced apps&OS's the CR often signified a new paragraph. I think early Wordstar and/or Wordperfect also did this when they were little more than glorified text editors with a relatively few printer control characters imbedded in the otherwise text data stream.
Notepad is, unfortunately, rooted in the past where both LineFeed [0A] and CarriageReturn [0D] were required in the data stream to control the teletype units which were used for printing the output 50 or more years ago.
LF by itself would just advance the paper, but leave the printhead at current horizontal location. CR was needed to return the printhead to the left margin, and without LF the TTY would type the next line over the prior one.
Bottom line is: don't use notepad. It's as obsolete as TTY.
Notepad is, unfortunately, rooted in the past where both LineFeed [0A] and CarriageReturn [0D] were required in the data stream to control the teletype units which were used for printing the output 50 or more years ago.
LF by itself would just advance the paper, but leave the printhead at current horizontal location. CR was needed to return the printhead to the left margin, and without LF the TTY would type the next line over the prior one.
Bottom line is: don't use notepad. It's as obsolete as TTY.
Hm, fact is, that notepad is the default text-editor / viewer in any Windows system, and - if you like it or not - defaults are mostly the actual settings in the majority of all pc's, so they should be respected. I think so, although I am happy with editor2, that I have set as the standard-text-program in my machine.fgagnon wrote:Bottom line is: don't use notepad. It's as obsolete as TTY.
AFAIR, there's no choice of default text editor: both get installed and Notepad is always a default handler for TXT files.
So, I think all these files should be reformatted for Notepad to be able to show their contents without any additional friction.
So, I think all these files should be reformatted for Notepad to be able to show their contents without any additional friction.
I'm using Xplorer2 - the only file manager that does not suck. Actually, it rocks!
Well, I only tried to address why it happened;
but I acknowledge the issue in general (even while deprecating M$ for being troglodytic in the matter).
nikos,
Even though it doesn't affect me, I add my vote to the above two users request for compatibility with the aforementioned notepad limitation.
If you agree, I'll even redo the files & send them to you for distribution with the next edition if you would prefer to not bother with it yourself.
-Fred-
but I acknowledge the issue in general (even while deprecating M$ for being troglodytic in the matter).
nikos,
Even though it doesn't affect me, I add my vote to the above two users request for compatibility with the aforementioned notepad limitation.
If you agree, I'll even redo the files & send them to you for distribution with the next edition if you would prefer to not bother with it yourself.
-Fred-
BTW - the ORDER of CR & LF is important -
Why that is evolved from the TTY machine mechanical response time properties.
Because it took the TTY longer to return the printhead to the left margin than to advance the platen one line, CR always preceded LF in to give the machine an extra tenth of a second to respond before the next typing character was received and printed.
-- The rate was typically 5 or 10 characters per second. :shock: --
True to its ancient heritage, even today, troglodytic notepad messes up if CR doesn't precede LF.
So --- the fix for the files in question is to use a hex editor to replace every instance of [0A] with [0D][0A].
Why that is evolved from the TTY machine mechanical response time properties.
Because it took the TTY longer to return the printhead to the left margin than to advance the platen one line, CR always preceded LF in to give the machine an extra tenth of a second to respond before the next typing character was received and printed.
-- The rate was typically 5 or 10 characters per second. :shock: --
True to its ancient heritage, even today, troglodytic notepad messes up if CR doesn't precede LF.
So --- the fix for the files in question is to use a hex editor to replace every instance of [0A] with [0D][0A].
- FrizzleFry
- Platinum Member
- Posts: 1241
- Joined: 2005 Oct 16, 19:09
Most editors that are not simply trying to be notepad replacements include text conversion features: EditPad Lite, Notepad++, PSPAD for example.
There are also many unix to dos command line conversion utilities that can be used to automate the conversion to that these text files are in the right format in the install package. Google for "tofrodos" for a version compiled for win32.
There are also many unix to dos command line conversion utilities that can be used to automate the conversion to that these text files are in the right format in the install package. Google for "tofrodos" for a version compiled for win32.