Hi,

On Thu, Jan 19, 2017 at 5:51 PM, dmccunney <dennis.mccun...@gmail.com> wrote:
>
> At one point, I had to insert a step in a *nix script that generated
> and emailed nightly reports.  The recipients would get them as
> attachments on Windows machines, and double click them to read them,
> which by default invoked Notepad to display plain text files.  Notepad
> was *stupid*.  It saw the LF, so it advanced a line, but it *didn't*
> see the CR, so it didn't home the cursor before displaying the next
> line, and the result was a stair step effect.when the file was viewed.
> I had to call a Unix2DOS utility to adjust the file to CRLF line ends
> before emailing it.

In fairness, most people don't use Notepad. Or at least I never do.
It's very simplistic, so it's not what I'd call "programmer friendly".
Almost anything is better except in a pinch. (Remember the old Win9x
days when it wouldn't even handle bigger than 64 kb?) Honestly, I
think Notepad was originally just a demo of the (then-new) Win 3.x UI
(or thereabouts).

> *nix was actually more of a problem than Windows.  Most things in *nix
> treated a CR as a white space character and didn't care about them,
> but a few things had issues.  The problems on either OS tended to be
> things that displayed/edited files.  Notepad on Windows had the
> problem noted above.  *nix tools displayed ^M wherever a CR was
> encountered, which was annoying.

Under vi, you can obviously do ":%s" and then "^V^M" or such.

> It's probably a good idea to sanitize FreeDOS text files to have CRLF
> consistently, but under DOS and Windows I installed editors and file
> viewers that understood LF as EOL char and did the right thing so I
> didn't have to care, and deliberately saved text files with LF as EOL
> character so I could move them to *nix without caring.

There's all kinds of caveats and quirks in many tools.

Even MS-DOS EDIT would almost always forcibly convert tabs to spaces
or some such behavior. Which is only bad with the Makes that can't
handle whitespace instead (which ironically is very few, yet the whole
tab issue persists anyways).

Even some files didn't end in a linefeed at all, so that too would
confuse some tools. The fix, at least on *nix, was "echo wq | ed
myfile.txt".

> How many things available as part of FreeDOS *do* have problems with
> LF only EOL markers in text files?

AFAIK, anything compiled by Turbo Pascal (unless the programmer
manually went out of his/her way to adjust accordingly). Various other
old tools too (e.g. FST Modula-2, maybe TC 2.01 too), but most good
and popular ones don't care, e.g. DJGPP or Free Pascal.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to