VOGONS


TEDIT v0.69 [LF/CRLF]

Topic actions

Reply 140 of 142, by aVd

User metadata
Rank Member
Rank
Member

Just tested TEDIT 0.69 with "mixed" LF+CR,LF text file. So, it reads the line break from the first line and sets it as standard for the opened file, then on save it writes line breaks according to this. Seems Ok to me.

DOS fan :: artificial "intelligence" (chat) bots - not a fan... not a fan at all :: is freeware a lie, when human freedom is a fundamental lie?

Reply 141 of 142, by DaveDDS

User metadata
Rank Oldbie
Rank
Oldbie
aVd wrote on 2026-04-05, 13:31:

... it reads the line break from the first line and sets it as standard for the opened file, then on save it writes line breaks according to this ...

Given "8086 16-bit", screenshots and lots mention of "DOS" in this thread, I've been assuming that this IS a DOS editor.

In which case I don't see a reason to set the type of line-break writtene to files.
IMHO a DOS text editor should write standard DOS text files (ie: CR,LF line-breaks)

I get that a single LF is prefferable, but DOS was written in the days where everything was oriented to what could be sent directly to a terminal or printer without all that excessive "processing" needed to make it truly printable.

I do find it annoying when I have to work with a text file from *nix with some DOS software that insists on the CR,LF and doesn't understand text files from better OSs, so you have to "convert" it.

What I do personally is my DOS editor uses newline (LF) and ignores CR when reading - so it has no trouble understanding files of either line-break type (it can even deal with files that are LF,CR - which were used in some classic OSs)

When writing the file, it used DOS standard line-breaks. So... when I get a *nix file with only LFs, I just have to load it into my editor and resave it to make it fully compatible with all DOS software.

- Dave ; https://dunfield.themindfactory.com ; "Daves Old Computers" ; SW dev addict best known:
ImageDisk: rd/wr ANY floppy PChardware can ; Micro-C: compiler for DOS+ManySmallCPU ; DDLINK: simple/small FileTrans(w/o netSW)via Lan/Lpt/Serial

Reply 142 of 142, by aVd

User metadata
Rank Member
Rank
Member

Hi, @DaveDDS,
Latest version of TEDIT "understands" perfectly fine those two standards for line break. It visualizes them correctly even in "mixed" text files. Yes, it's a DOS text editor, but modern one, and it's nice to have this conversion feature.

Let's assume, that we have a rare case of DOSBox in Linux and have to edit a *nix text file - why changing its standard by default? If we need to do so - there's a conversion option in the menu (and possibly a keyboard shortcut in the future - some Fn key for example).

P.S. Maybe "LF" is more preferable and saves some bytes, but when using DOS/windows it's not, and I don't like to see a source code for DOS/windows programs written in *nix environment with no respect for different line break standard 😀

DOS fan :: artificial "intelligence" (chat) bots - not a fan... not a fan at all :: is freeware a lie, when human freedom is a fundamental lie?