Notepad is one of the classic Windows apps that Microsoft updates rarely. Starting in Windows 10 Build 17661, Microsoft has made one improvement to the app. It now recognizes Unix line endings, so you can view and edit Unix/Linux files with Notepad. 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. Here is how.
In Unix/Linux, line endings are quite different from what Windows uses.
In Windows, there are two symbols used for that purpose: char(10), known as the Carriage Return (CR), and char(13), known as Line Feed (LF). Linux uses only LF for line endings.
For years, Notepad supported only the CRLF scheme, making it impossible to read and edit Linux text files. Probably, thanks to integration of Windows Subsystem for Linux, Notepad in Windows 10 build 17661 can recognize Linux line endings.
Here is a screenshot of Notepad trying to display the contents of a Linux .bashrc text file, which only contains Unix LF EOL characters:
The next screenshot shows the updated Notepad app, which displays the same file properly:
The status bar indicates current line endings.It is possible to disable this behavior when required.
To disable Unix Line Endings support in Windows Notepad, do the following.
- Open the Registry Editor app.
- Go to the following Registry key.
See how to go to a Registry key with one click. If this key doesn't exist, you should create it manually.
- On the right, create a new 32-Bit DWORD value fWindowsOnlyEOL.
Note: Even if you are running 64-bit Windows you must still create a 32-bit DWORD value.
Set its value to 1.
- On the right, create a new 32-Bit DWORD value fPasteOriginalEOL. Leave its value data as 0.
- To make the changes done by the Registry tweak take effect, you need to sign out and sign in to your user account.
fWindowsOnlyEOL value works as follows:
fWindowsOnlyEOL = 0: Insert the currenly open document's detected EOL character when Return/Enter key is hit.
fWindowsOnlyEOL = 1: Force Windows CRLF line endings when Return/Enter key is hit.
fPasteOriginalEOL parameter accepts the following values.
fPasteOriginalEOL = 0: Modifies the EOL character f the text being pasted into Notepad to the EOL character of the currently open document.
fPasteOriginalEOL = 1: EOL characters in text pasted into Notepad are not modified.
Finally, Winaero Tweaker can be used to customize Unix line endings support in Notepad.
You can download Winaero Tweaker here: Download Winaero Tweaker