Notepad LF / CR display

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
beuvema
Junior Member
Junior Member
Posts: 16
Joined: 2004-03-06, 00:23 UTC

Notepad LF / CR display

Post by *beuvema »

When editing text files with notepad, I get a very confusing display because linefeeds (LF) and "Carriage Returns (CR)" are displayed faulty.


Anyone with a clue :oops:
Thx beuvema
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Re: Notepad LF / CR display

Post by *Sheepdog »

beuvema wrote:When editing text files with notepad, I get a very confusing display because linefeeds (LF) and "Carriage Returns (CR)" are displayed faulty.


Anyone with a clue :oops:
Thx beuvema
maybe your editing unix text files?

These files use for the line end only line feed while M$ uses always linfeed plus Carriage return i. e. $0a $0d. View the file in lister and press [3] to view in hex-mode. Are there at the end of the line the values $0d $0a ?

If not you can open the file in the editor from DOS prompt and without changing anything save it. the appropriate CR/LF are set.


sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
beuvema
Junior Member
Junior Member
Posts: 16
Joined: 2004-03-06, 00:23 UTC

Post by *beuvema »

When using Lister the file is displayed properly.

At the end of every line I see "0A" "20" "2A" "20" everytime.

Edit in DOS works indeed!!!

Thx beuvema :D
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

So the Carriage return is missing. And after edit in DOS once the missed CR should be added so you could use notepad then.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
beuvema
Junior Member
Junior Member
Posts: 16
Joined: 2004-03-06, 00:23 UTC

Post by *beuvema »

Are files submitted this way on purpose?

:?

Text corrected submitted is the corect word
Last edited by beuvema on 2004-10-13, 22:56 UTC, edited 1 time in total.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

beuvema wrote:Are files subitted this way on purpose?

:?
Don't know what subit means. But if you open the files in DOS Editor and save them DOS editor adds before the linefeed ($0A) a Carriage return ($0D).

At least in my testfile it happened like this. You may try it as described above: Open one of these files in DOS editor, choose 'save file' and close without editing. Afterwards try to open in notepad.
On my PC after that the missing Cariiage Returns were inserted.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
CoolWater
Power Member
Power Member
Posts: 744
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

i guess submitted was meant ;)
User avatar
Leif
Senior Member
Senior Member
Posts: 328
Joined: 2003-02-05, 15:44 UTC
Location: Umeå, Sweden

Post by *Leif »

Or use TextPad - http://www.textpad.com
Post Reply