Not Saving line terminating charcaters
Latest version of Notepad++
When I save a file and then load in say notepad, there are no end of line characters.
I have tried saving as windows and Unix. End system will be Unix.
I can’t find any setting to help me.
Notepad does not recognize any non-Windows Line Endings. If you have Unix-Style endings, Notepad will ignore them.
What do you mean by “Saving as Windows/Unix”? In NPP you need to go to “Edit->EOL Conversions->Unix (LF)”, then save your file as usual. If you want it back to Windows, go to “Edit->EOL Conversions->Windows (CR/LF)” and save again.
NPP will show the current Line Ending Format in the status bar. You may also activate “View->Show Symbol->Show end of line”.
I was talking about Settings->Preferences->New Documents->Format (Line Ending) an choosing either Windows or Unix.
I have gone View->Show Symbol->Show End of Line and that changes from LF-CR/LF-LF when I choose Edit->EOL Conversion->Unix or Windows or back to Unix.
In my case a PHP file that reads:
and PHP spits a runtime error saying invalid for $error to be on line 1.
And another oddity, if I edit the file in notepad and then open in notepad++ I am getting double line spacing!
As I said before, Notepad does not recognize non-Windows Line Endings. It simply treats them as invisible characters. If you start editing in Notepad you will create a mix of Windows and Unix Line Endings. Since NPP recognizes ALL Line Endings, it displays both Unix and Windows Line Endings.