Hacker News new | ask | show | jobs
by martin-adams 3079 days ago
It's like they're trying to get a record by not doing that. For years I've been baffled why Notepad at the very least couldn't understand unix line endings.
3 comments

It's possible they lost the source code and literally can't. They've done it before:

https://www.bleepingcomputer.com/news/microsoft/microsoft-ap...

Equation Editor was developed by a third party and MS probably never had the source code in the first place: https://support.microsoft.com/en-us/help/4057882/error-when-...
Notepad is literally a window with the standard Windows Edit control inside it, so they certainly have the source code.

My guess as to why they don't care to support \n-only is that there's been very little need to; anyone who needs more advanced editing isn't going to use Notepad anyway.

As the sibling comment mentions, WordPad (which is similar but with a RichEdit control) does support \n-only.

If you want notepad-with-LF-support, ReactOS, the open-source Windows NT clone, has this.
"It's like they're trying to get a record by not doing that. For years I've been baffled why Notepad at the very least couldn't understand unix line endings."

Probably the same reason that the CMD shell is so bad, and is only now being fixed up: since Windows is proprietary, nothing can be improved unless either the Microsoft decision-makers that are responsible for the product choose to spend budget on it, or there is a directive from higher-up in the company.

It's because windows line endings are actually the technically correct one.

Ever tried raw output to terminal?

I go back and forth on this.

On the one hand, you're right in that you need both a line feed and a carriage return to actually "start a new line" (+1 to Windows). On the other, it seems wasteful to have two characters do a job that, in text files, could be just as easily done by one; editing and storing text is not the same as printing it, especially when the print incantation is a vestige of mostly-obsolete hardware (+1 to Unix).

Truthfully I have the exact view as yours (upvoted) but people rant without understanding. They are creating Tomorrow "evil" monopolies with their bandwagoning
Maybe according to the defined behavior of those characters, but that can't be why notepad doesn't support Unix line endings, as it still doesn't actually line feed when it sees a line feed character. I have never tried but I also suspect it won't do a carriage return for just a carriage return character (to be fair, that wouldn't really makes sense in a text editor anyway).