How can I get Notepad to accept different line endings?


  1. Posts : 33
    Arch Linux (5.11.6-arch1-1) x86_64
       #1

    How can I get Notepad to accept different line endings?


    Hi, I've been reading a bit and I found out what was causing Notepad to not show new lines and show text in one long string. Apparently Notepad in Windows 7 uses Windows (CRLF) encoding, which would have \r\n as the newline character or something like that. Whereas Unix systems use LF encoding, which I guess would be \n.

    In newer Windows versions I think Notepad can detect what newline character is being used and accept that.

    Is there a way I can get this working with a tweak to Notepad or such? I have README and log files which I find really annoying to read with this problem, having newline functionality back would be really helpful.

    If there's no real way to do this, what kind of luck would I have with just copying the Notepad executable from a newer Windows version into 7 and using that? (Or is this fix outside of notepad.exe?)
      My Computer


  2. Posts : 51,584
    Windows 11 Workstation x64
       #2

    I don't think there is anything you can do with the standard notepad it is pretty poor and has no configuration options, you would be better saving the time messing with it and swap to something that is more capable like Nopepad++
      My Computers


  3. Posts : 0
    Windows 7 Ultimate x64
       #3

    I was going to say the same thing. Once you start using Notepad ++ you'll never go back. Any kind of text file be it a read me or even an SQL database can be opened in Notepad ++ by a simple right click of the file and choosing open with Notepad ++.

    Word of advice. I, and many others have a bad habit of throwing bits of text and what not into a blank Notepad ++ tab to easily go back to. Do make sure you SAVE these tabs least you find you lost them all. LOL You'll never recover them. At least I don't know if Notepad ++ makes an on the fly backup or not. But as far as I'm aware, if you open a new tab to write things in, it's not saved unless you specifically save it somewhere.

    A little off topic, but an interesting tid-bit. I can't remember the name of it now, but several years ago government hacking tools I think from the NSA or CIA was released on the Internet. They found Notepad ++ was used as a vector to get into a computer or what ever the hell. So the Dev of Notepad ++ fixed that vulnerability in short order. And if I'm not mistaken, 7zip had its own vulnerability as well so that too was fixed in short order.

    Good for you on the research though. I never knew that myself.
      My Computer


  4. Posts : 2,798
    Windows 7 x64, Vista x64, 8.1 smartphone
       #4

    Toydotgam said:

    Is there a way I can get this working with a tweak to Notepad or such? I have README and log files which I find really annoying to read with this problem, having newline functionality back would be really helpful.

    If there's no real way to do this, what kind of luck would I have with just copying the Notepad executable from a newer Windows version into 7 and using that? (Or is this fix outside of notepad.exe?)
    How many README files from UNIX do you read on your PC? Can you open them in LINUX?

    You can have newlines in txt files. Open these txt files in notepad, and they will display correctly. Just press <Enter> everytime you want a newline. What txt files cannot store in its file format, is Page Width and Automatic Word Wrap. And Notepad has no Default Page Width setting either.

    So, to obtain those features, and view your README file differently, you ought use a different Text Editor/Word Processor, as already mentioned in this thread. Notepad++ is good. Or you can use WordPad, which is already built-in to Windows.

    The "tweak" then, is to use a different editor or word processor, as they can all open txt files, and they have customizable Page Widths, that allow Automatic Word-wrap.
      My Computer


  5. Posts : 2,497
    Windows 7 Pro 64 bit
       #5

    Windows 7 Notepad does not have the ability to handle different line endings. This ability was added in a Windows 10 update.

    Windows applications are not self contained in their executable file. Much of their capabilities, and in this case most, are in the system DLLs. Most of the functionality of notepad is in comctl32.dll and it's associated DLLs. Windows really doesn't like it when one of these are updated individually. They must be replaced as a set and that will only work with the same version of Windows. I once tried to update a DLL in Windows NT4 with a newer version of one designed for NT4. It failed to start.

    If notepad does not have the features you need there are plenty of alternatives.

    If you want to stay with the system supplied programs Wordpad will handle different line endings. I have often used it for that purpose.
      My Computer


  6. Posts : 33
    Arch Linux (5.11.6-arch1-1) x86_64
    Thread Starter
       #6

    z3r010 said:
    I don't think there is anything you can do with the standard notepad it is pretty poor and has no configuration options, you would be better saving the time messing with it and swap to something that is more capable like Notepad++
    Yeah, I've used Notepad++ before, but I stopped using it for a bit due to not needing it in generally for a while; then I started it up again and it spat out a bunch of errors. I also prefer the simplicity of Windows Notepad over Notepad++. I think I'll look into fixing it back up again and going back.
      My Computer


  7. Posts : 33
    Arch Linux (5.11.6-arch1-1) x86_64
    Thread Starter
       #7

    iko22 said:
    How many README files from UNIX do you read on your PC? Can you open them in LINUX?

    You can have newlines in txt files. Open these txt files in notepad, and they will display correctly. Just press <Enter> everytime you want a newline. What txt files cannot store in its file format, is Page Width and Automatic Word Wrap. And Notepad has no Default Page Width setting either.

    So, to obtain those features, and view your README file differently, you ought use a different Text Editor/Word Processor, as already mentioned in this thread. Notepad++ is good. Or you can use WordPad, which is already built-in to Windows.

    The "tweak" then, is to use a different editor or word processor, as they can all open txt files, and they have customizable Page Widths, that allow Automatic Word-wrap.
    I can perfectly fine open READMEs from Unix and such on my Windows 7 and Ubuntu installations; but 7 just cannot show me the newlines in Notepad. As I said just before, I think I'll take this advice from you guys and get back to Notepad++.
      My Computer


  8. Posts : 33
    Arch Linux (5.11.6-arch1-1) x86_64
    Thread Starter
       #8

    LMiller7 said:
    Windows 7 Notepad does not have the ability to handle different line endings. This ability was added in a Windows 10 update.

    Windows applications are not self contained in their executable file. Much of their capabilities, and in this case most, are in the system DLLs. Most of the functionality of notepad is in comctl32.dll and it's associated DLLs. Windows really doesn't like it when one of these are updated individually. They must be replaced as a set and that will only work with the same version of Windows. I once tried to update a DLL in Windows NT4 with a newer version of one designed for NT4. It failed to start.

    If notepad does not have the features you need there are plenty of alternatives.

    If you want to stay with the system supplied programs Wordpad will handle different line endings. I have often used it for that purpose.
    Interesting thing I never knew about Windows, thanks for telling me . WordPad is very slow [for some reason] on my PC; I'm thinking of fixing Notepad++ up again and just doing that. Thanks for the response!
      My Computer


  9. Posts : 2,472
    Windows 7 Ultimate x64
       #9

    Toydotgam said:
    I also prefer the simplicity of Windows Notepad over Notepad++
    If you want a more capable "notepad" but don't want to go the route of Notepad++, I can recommend Notepad3 instead. It has a UI similar to the built-in Notepad with a few more features, including the chance to use all standard line endings (the Windows CRLF, the Linux CR or the Mac LF).

    It certainly lacks in comparison to Notepad++, but far better than the default and enough for many things.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:43.
Find Us