Newline format

English main discussion
Post Reply
  • Author
  • Message
KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Newline format

Post by KDJ »

Why AkelPad treats "\r\r\n" as a single symbol of new line?
Other editors (NP++, Notepad2, PSPad, RJTextEd, EditPad) interprets it as two new lines - "\r" and "\r\n".
In effect, the same file (containing only "\r\r\n") opened in AkelPad has 2 lines, and opened in another editor has 1 line.
In addition, AkelPad detects the newline format as Windows, other editors as Mac.

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

KDJ

Code: Select all

cmd /c ipconfig>C:\ipconfig.txt
Open in MS Notepad.
In effect, the same file (containing only "\r\r\n") opened in AkelPad has 2 lines, and opened in another editor has 1 line.
You probably meen 1 line in AkelPad and 2 lines in mentioned editors.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

Instructor wrote:
In effect, the same file (containing only "\r\r\n") opened in AkelPad has 2 lines, and opened in another editor has 1 line.
You probably meen 1 line in AkelPad and 2 lines in mentioned editors.
Yes of course, I wanted to write:
"In effect, the same file (containing only "\r\r\n") opened in AkelPad has 1 line, and opened in another editor has 2 lines."
Probably because of the heat I made a mistake. The weather is tropical.

OK, Ipconfig command generates a new line in format "\r\r\n", but Dir command generates "\r\n".
Is this a bug in Windows? Whether it was intentional? For what purpose?

Offline
Posts: 1862
Joined: Mon Aug 06, 2007 1:07 pm
Contact:

Post by Infocatcher »

Instructor wrote:

Code: Select all

cmd /c ipconfig>C:\ipconfig.txt
Windows XP: \r\r\n
Windows 7: \r\n
:)

So looks like a fixed bug.
Post Reply