• Login
Community
  • Login

Notepad++ file format looks different when opened in Windows Notepad

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 1.3k 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.
  • M
    milton
    last edited by Jun 29, 2023, 7:08 AM

    A text file opened in Windows 7 Notepad looks like a continuous line without end of lines i.e. no Word Wrap. However, when I open the file in Notepad++, all contents are in separated lines.

    For example:
    In Window 7 Notepad:
    clientproto udpdev tundh dh2048.pemca

    In Notepad++:
    client
    proto udp
    dev tun
    dh dh2048.pem
    ca

    How can I save the file format in Notepad++ style?
    Now if I save the file in Notepad++, but when I open the same file in Windows 7 Notepad, it’s in continuous line no “Word Wrap” or EOL style.

    Thanks,
    Milton

    P 1 Reply Last reply Jun 29, 2023, 1:02 PM Reply Quote 0
    • P
      PeterJones @milton
      last edited by Jun 29, 2023, 1:02 PM

      @milton ,

      My guess is that the file is using “unix”-style newlines (LF) rather than Windows newlines (CR LF), so MS Notepad doesn’t show them on separate lines. You can tell, because when you load in Notepad++, it will show “Unix (LF)” on the status bar, instead of “Windows (CR LF)”.

      If that’s what Notepad++ you want to save the file in a way that other applications (like your Win7 MS Notepad) will recognize the line endings, you can either right click on the “Unix (LF)” and change it to “Windows (CR LF)” then save, or use Edit > EOL Conversion > Windows (CR LF)

      (When I tried to replicate in Win 10 22H2 19045, MS Notepad was able to see the LF or even ancient-mac-style CR newlines and still show as separate lines, but since Win7 is a decade out of date, it wouldn’t surprise me if it was lacking that feature.)

      M 1 Reply Last reply Jun 30, 2023, 4:45 AM Reply Quote 3
      • M
        milton @PeterJones
        last edited by Jun 30, 2023, 4:45 AM

        @PeterJones

        Yes, you are correct.
        Thank you so much for the clarification and instruction.

        The issue is solved. Thank you

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