After decades of mangling text files coming from other operating systems. Microsoft’s venerable Notepad.exe, which has been included in every version of Windows since the first, is finally getting support for Unix and macOS line endings.
Notepad, being a Windows application, has always demanded the CRLF pair. When faced with Unix files – quite common for source code and similar things – it sees the bare-naked LFs and prints them as black squares. Because it doesn’t start a new line when faced with a naked LF, it shows the entire contents of the file as a single lengthy line, which makes it hard to read, much less edit.
But in the next update to Windows (likely to arrive in October or thereabouts), Notepad will handle Unix and classic MacOS line endings in addition to the Windows kind. This will make the editor much more useful than it currently is.
Support is somewhat limited – while it will correctly open files with alternate line endings, and will save the files correctly in their original format, you cannot create new text files and save them with Unix or MacOS line endings – Notepad will always save new files with the CRLF style used in Windows.
And, in true Microsoft function, Notepad provides a registry switch if you want to disable the new functionality for compatibility reasons, which only confirms the idea that there is an XKCD comic for everything.
Microsoft Products are opening themselves to a wider world. This world will be dominated by Windows/Linux and haiku/fuchsia in desktop. MacOS suchs…
Browser: Mozilla/5.0 (Linux; Android 7.0; PRA-LX1 Build/HUAWEIPRA-LX1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36
I have trouble seeing Haiku dominating. It will be interesting to see what happens with fuchsia; but if you are going to insult an OS without any explanation you should at least spell the word correctly
From https://blogs.msdn.microsoft.com/commandline/2018/05/08/extended-eol…
> This has been a major annoyance for developers, IT Pro’s, administrators, and end users throughout the community.
And they knew it for years, for decades…
Why? Wordpad. Open in Wordpad, save as plain text with MSDOS line endings.This is what I always did.
Maybe in blogs.msdn.microsoft.com wrote that… because you have to be aware of the problem and so you have to use Wordpad, because Wordpad treats UTF-8 characters badly (Notepad doesn’t seem to do the same), etc.
Depends on what you are trying to achieve. Mostly, for me, I’d be opening a readme file from source code and the content was not so important that I readily cared about Unicode encoding. When it comes to source code, it’s pretty rare until fairly recently for unicode to matter.
Well, you wrote:
And you were answered why. I’m not going to lose time answering the same or viewing this same thread.
And yet…. you did. 😉
Because aside from this specific issue of dealing with Unix-formatted files, Wordpad is actually worse than Notepad when it comes to viewing and editing large text files? It’s a minimalist word-processor, not a text editor, and really doesn’t suit that use case…
Agreed. This is why the process is “open files in wordpad, save in MSDOS line endings”. You can then open in notepad and continue.
Sure it’s a workaround, but it will get you a workable file. If the encoding is screwed, sure you can use something else. But on a vanilla Windows install with no internet access, it works like a charm for all but the most heavily unicoded file.
Because there were quite a few cases where converting the file was not what was desired or, even worse, made the file incompatible with the target software in an obscure way. Thankfully this doesn’t happen so much now, but I can remember an incident where I edited the file in wordpad and saved it back then uploaded it to a shared project server, and gcc refused to compile it until it was converted back to UNIX-style. It wasn’t easy to trace either thanks to GCC’s cryptic “parse error” messages which was all it would give. Weirder yet was the fact that GCC normally didn’t bitch about such things, but it seemed that it demanded the project files all be in the same format.
Sure, this is why I said “workaround” and noted that you might find it does screw with the file in another comment.
But if on Windows, you want to open a random file from some random source, and it is encoded in a UNIX format, the fastest way to open it an view it in a readable format is to use Wordpad, then something else if that is destroying the file content in some way. at least 80% of the time it’s fine. Personally, I would do this:
* copy the file to a new folder
* add the suffix “.wri” to the name
* double click it
* opens in workpad
* read it, if I wanted the text to be retained, I’d save the file in MSDOS format, otherwise I’d leave it.
changing the file extension means that it loads every time with Word pad, and saves me having to deal with working out the specifics of the file encoding.
If I was seriously using the file for something, I’d probably use visual studio code these days, as this is my text editor of choice (and if on every platform I use.)
Uhhhh…who uses the default crap in Windows? If you are enough of an IT guy to need Unix line endings you probably replaced the lousy Notepad five seconds after loading it up for the first time.
There are so many really good replacements for Notepad, many of which can trivially replace Notepad as the default text file editor. I use Metapad but there is Notepad ++, Editpad, PSPad,TED Notepad, Docpad, etc and they all have features that make Notepad look like what it is, a lousy Windows default.
The default tools in Windows? Yeah…no, just no. The default tools are made to be VERY simple and “grandma friendly” and have always been pretty feature poor, its just silly to expect a Windows default to be anything more than the most basic of tools.
Sometimes I just want a real light-weight editor to work in. Normally it is notepad++, but I really like writing JavaScript in Notepad. Nothing really gets in my way.
I didn’t say you couldn’t find SOME use of a grandma tool, just that those that have need for complex tools or complex functions (like needing Unix line breaks for coding) aren’t gonna be using the default Windows crap.
I mean has anybody here recommended using Windows Backup as a real backup solution? Anybody here recommending MS Paint for real photo work or creating art? Anybody? Beuller?
The default Windows tools are made to be bland, simple, and the most basic they can possibly be so they don’t hear more screams of “antitrust!”. Hell look at MS Defender, they got sued over that thing and its about the most primitive useless thing I’ve ever seen when it comes to stopping browser based bugs which is like 99% of the bugs you see today!
Its like that old joke “Internet Explorer, the browser you use for downloading Firefox”, you use the Windows default just long enough to chunk its crusty crap with some real quality third party programs which is all anybody uses Windows for anyway. After all if you aren’t using third party software then why are you still on Windows?
I use mostly the “default crap” Notepad. Mostly for… ~notes. It’s good for what it is.
Next step? Implement “vi mode” to make Stallman double pissed (vi + proprietary software).
Nah, they’d have to implement emacs mode for that to happen. He must not know about MacOS’s basic support for emacs commands in standard text controls (mostly navigation, but c-q works to insert a ctrl character too). Wait until Microsoft does the same and publishes it, then we can see him have a seizure.
So I guess now that they’ve done this, I can finally stop using Notepad++, right?
/s
Of course,
You can start to use Sublime Text now then.
probably took them this long to figure out the two line change to fix this…
Why can’t they just integrate Notepad++ into the default system distribution and remove some 30 year old crapware from dinosaur times ?
Aside from the fact that Notepad++ is third party and open source?
As much as people hate to admit it, Notepad does have it’s uses. It’s tiny, it doesn’t screw around with formatting at all, and most of its problems aren’t actually a problem when dealing with text files used by the Windows system itself (which is what it was designed for after all).