Disable Unix Line Endings Support in Windows Notepad

Windows Notepad Icon

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.

  1. Open the Registry Editor app.
  2. Go to the following Registry key.
    HKEY_CURRENT_USER\Software\Microsoft\Notepad

    See how to go to a Registry key with one click. If this key doesn't exist, you should create it manually.

  3. 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.
  4. On the right, create a new 32-Bit DWORD value fPasteOriginalEOL. Leave its value data as 0.
  5. To make the changes done by the Registry tweak take effect, you need to sign out and sign in to your user account.

The 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.

The 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

Source: Microsoft

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.