Notepad is one of the classic Windows apps that Microsoft updates rarely. The last time it was updated was with Windows 2000, almost 20 years ago, with the ability to use hotkeys and Unicode support. Now, in Windows 10 Build 17661, Microsoft has made one silent improvement to the app. It now recognizes Unix line endings.
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.
The edit control used in Notepad now accepts new window messages. The sample code looks as follows:
SendMessageW(hwndEdit, 0x150A, 3, WindowsOnlyEOL ? 0 : 3); SendMessageW(hwndEdit, 0x150A, 4, PasteOriginalEOL ? 0 : 4);
So, if you are a WSL user, soon you'll be able to edit its configuration and other files right in Notepad without issues. Also, this change is great for all dual-boot users.
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!