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.
Regards
Ken
-
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.
if I look at the file in windows notepad after I save it in notepad++ it looks like a minified javascript or css file. if line wrap is off in notepad it shows as 1 big long line.
In my case a PHP file that reads:
<?php$error=“”;
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login