• Login
Community
  • Login

Not Saving line terminating charcaters

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 2 Posters 3.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    Ken Cole
    last edited by Oct 5, 2016, 3:46 AM

    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

    1 Reply Last reply Reply Quote 0
    • G
      gerdb42
      last edited by Oct 5, 2016, 7:53 AM

      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”.

      1 Reply Last reply Reply Quote 0
      • K
        Ken Cole
        last edited by Oct 5, 2016, 8:20 AM

        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.

        1 Reply Last reply Reply Quote 0
        • K
          Ken Cole
          last edited by Oct 5, 2016, 8:42 AM

          And another oddity, if I edit the file in notepad and then open in notepad++ I am getting double line spacing!

          1 Reply Last reply Reply Quote 0
          • G
            gerdb42
            last edited by Oct 5, 2016, 11:45 AM

            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.

            1 Reply Last reply Reply Quote 0
            3 out of 5
            • First post
              3/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors