Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Not Saving line terminating charcaters

    Help wanted · · · – – – · · ·
    2
    5
    2767
    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.
    • Ken Cole
      Ken Cole last edited by

      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
      • gerdb42
        gerdb42 last edited by

        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
        • Ken Cole
          Ken Cole last edited by

          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
          • Ken Cole
            Ken Cole last edited by

            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
            • gerdb42
              gerdb42 last edited by

              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
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors