Jump to content

Introducing extended line endings support in Notepad


tao

Recommended Posts

For many years, Windows Notepad only supported text documents containing Windows End of Line (EOL) characters - Carriage Return (CR) & Line Feed (LF). This means that Notepad was unable to correctly display the contents of text files created in Unix, Linux and macOS.

 

For example, here’s a screenshot of Notepad trying to display the contents of a Linux .bashrc text file, which only contains Unix LF EOL characters:

 

Before

 

As you can see, Notepad is incorrectly displaying the file’s contents, making the file look garbled. This has been a major annoyance for developers, IT Pros, administrators, and end users throughout the community.

 

Today, we’re excited to announce that we have fixed this issue!

 

Starting with the current Windows 10 Insider build, Notepad will support Unix/Linux line endings (LF), Macintosh line endings (CR), and Windows Line endings (CRLF) as usual. New files created within Notepad will use Windows line ending (CRLF) by default, but it will now be possible to view, edit, and print existing files, correctly maintaining the file’s current line ending format.

 

Here’s a screenshot of the newly updated Notepad displaying the contents of the same Unix/Linux .bashrc file we saw earlier:

 

After

 

Also note that the status bar indicates the detected EOL format of the currently open file.

 

As with any change to a long-established tool, there’s a chance that this new behavior may not work for your scenarios, or you may prefer to disable this new behavior and return to Notepad’s original behavior. To do this, you can change the following registry keys in the following location to tweak how Notepad handles pasting of text, and which EOL character to use when Enter/Return is hit:

[HKEY_CURRENT_USER\Software\Microsoft\Notepad]

 

Registry

 

< Here >

Link to comment
Share on other sites


  • Replies 3
  • Views 957
  • Created
  • Last Reply
  • Administrator

Topic moved to Software News as it's software related.

 

I needed this feature a lot. For the time I did not know about the above, I had lost a bit of my data, only then I came to know about such simple thing about different OSes storing text files in a different way.

 

So it's good to see they are implementing this.

 

Yes, we do have other good editors, but for simple work this is quite useful I think.

Link to comment
Share on other sites


straycat19

So now the question is, will the notepad.exe file from the new version work in previous versions or even better still previous versions of windows such as 7 and 8.1.  

Link to comment
Share on other sites


  • Administrator
5 hours ago, straycat19 said:

So now the question is, will the notepad.exe file from the new version work in previous versions or even better still previous versions of windows such as 7 and 8.1.  

 

Well, indeed that's a good question. Has it ever worked in that way. If it did, then likely it will also do now, but might not work properly though.

Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...