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 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.
Source: WalkingCat
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:
That’s great news. As a developer, I find myself having to view source code files from GitHub and such in another editor. What I usually do is open the file in wordPad (which seems to support those already (probably by converting them to crlf format) for some reason), and then just copy the text from there over to notepad.
If anyone has this insider build, could they provide the new notepad (would an executable be enough?), so that people who aren’t on the insider program (including me) can take advantage of this nice feature, without having to wait another ~6 months for another big update? I’d appreciate it very much.
They should’ve also made it possible to save files without a bom while they were at it. Bom tends to break some stuff like php/html pages.
Yay! Finally!!!