Why Windows notepad put all the code line on a single line when I open a file created using Notepad++?

AndreaNobili picture AndreaNobili · Nov 7, 2013 · Viewed 18.1k times · Source

I have the following problem: I use Nodepad++ editor to write some text\code and I save my file into it, if later I open this file using the Windows notepad this lost the text format and put all the code line on a single line.

Why? Can this thing being a problem?

Tnx

Andrea

Answer

baochan picture baochan · Nov 7, 2013

CBroe's link: https://superuser.com/questions/362087/notepad-ignoring-linebreaks has a good description of the problem, if the file is in Unix or Mac format it treats line endings differently and Windows Notepad won't recognize them.

In Notepad++ you can change the End-Of-Line encodings through Edit > EOL Conversion > Windows Format, then save the file.