0

Often (but not always) when I open a text file using Windows Notepad, it does not recognize the line breaks.

If I open the file using Windows Wordpad, and then save it as a text file, and then open it with Notepad, the line breaks are recognized.

What causes this, and what is the easiest way to view/edit the file using Notepad?

user1032531
  • 1,631
  • 9
  • 26
  • 51
  • Notepad doesn't recognise carriage returns (CR), but only newlines (LF). – Jerry Mar 24 '14 at 19:27
  • 1
    Actually Windows standard line breaks are CRLF and not just CR or LF. – tumchaaditya Mar 24 '14 at 19:59
  • [Interesting description](http://blog.codinghorror.com/the-great-newline-schism/) that explains the history behind the conventions and why it causes problems. – Nattgew Mar 24 '14 at 20:29

1 Answers1

2

This is caused by this phenomenon http://en.wikipedia.org/wiki/Newline

Notepad only understands the windows newline format, so you will have to use another program. Notepad++ is quite popular on Windows (and opensource). Notepad++ is also much better at handling large files.

David
  • 2,302
  • 13
  • 26
Jasper
  • 908
  • 8
  • 17