Windows Notepad Finally Supports Unix, Mac OS Line Endings (theregister.co.uk)
Microsoft's text editing app, Notepad, which has been shipping with Windows since version 1.0 in 1985, now supports line endings in text files created on Linux, Unix, Mac OS, and macOS devices. "This has been a major annoyance for developers, IT Pros, administrators, and end users throughout the community," Microsoft said in a blog post today. The Register reports: Notepad previously recognized only the Windows End of Line (EOL) characters, specifically Carriage Return (CR, \r, 0x0d) and Line Feed (LF, \n, 0x0a) together. For old-school Mac OS, the EOL character is just Carriage Return (CR, \r, 0x0d) and for Linux/Unix it's just Line Feed (LF, \n, 0x0a). Modern macOS, since Mac OS X, follows the Unix convention. Opening a file written on macOS, Mac OS, Linux, or Unix-flavored computers in Windows Notepad therefore looked like a long wall of text with no separation between paragraphs and lines. Relief arrives in the current Windows 10 Insider Build.
Notepad will continue to output CRLF as its EOL character by default. It's not changing its stripes entirely. But it will retain the formatting of the files it opens so users will be able to view, edit and print text files with non-Windows line ends. Microsoft has thoughtfully provided an out for Windows users counting on the app's past inflexibility: the new behavior can be undone with a registry key change.
Notepad will continue to output CRLF as its EOL character by default. It's not changing its stripes entirely. But it will retain the formatting of the files it opens so users will be able to view, edit and print text files with non-Windows line ends. Microsoft has thoughtfully provided an out for Windows users counting on the app's past inflexibility: the new behavior can be undone with a registry key change.
who cares?
All users caring about line endings had probably migrated to Notepad++ 10 years ago, right ?
Wow. How are they different?
http://michaelsmith.id.au
I mean, great; but odd. I guess it is to go along with the Linux Subsytem.
It is just odd that they would leave this out forever on purpose and then suddenly fix it. It has been literal decades, and the absence was obviously malicious.
Anyway, great!
For years I've used notepad just for this reason: remove and drop all unix lineendings. That way I knew I never ended up with a mixed-line ending document.
Through and through.
Notepad is a small simple text editor that exists because occasionally you might need to edit some text files (typically for config files or something). These will be in a Windows friendly text format. It doesn't pretend to do anything remotely sophisticated.
If you want to do something more complex then download a non-minimal text editor. There are loads available for free.
You want the carriage to return and the paper moved up by one line, not print over the last line (CR only) or continue at the current position one line down (LF only). Imagine that, Microsoft doing something correctly.
Or will this be backported to Windows 7?
Like if notepad was used by those uses! It's more than dead for them for quite a few decades. Relief would mean they use it and have to deal with the pain regularly. Microsoft is optimistic as hell if it thinks this is the case.
This is a small sign of how Microsoft is embracing OS-independent software development and deployment. No, seriously! They finally got around to adding those several lines of code to properly support other end of line conventions. The code to do this is trivial and has been left out until now on principle alone.
Call me again when they drop that stupid BOM at the start of UTF-8.
Yeah, I know that the Unicode consortium accepts that, but I'm sure this is a Microsoft misdeed. It looks like Microsoft, smells like Microsoft and quacks like Microsoft. This alone kills one of the nicest properties of UTF-8, namely that when you only have codepoints 0..127, it is equivalent to ASCII.
Somehow they manage to fat-finger most nice standards by stuffing the standard commitees with (incompetent? malicious? pick your poison) people.
I always have to think of that bastard child of Hanlon's razor and Clarke's third law: "Any sufficiently advanced malice is indistinguishable from incompetence"
Meanwhile, for years, the internet has been routing around the damage via Notepad++, Notetab, Eclipse (...) or even vi on MinGW (gasp).
Microsoft:
Today, we’re excited to announce that we have fixed this issue!
Really? They fix something that obviously should have been fixed decades ago and that is so hard that just about everybody else has had no trouble doing it right in their products and they get excited? I know it's marketing speak, but don't they realise they make themselves sound incompetent?
'Microsoft's text editing app, Notepad, which has been shipping with Windows since version 1.0 in 1985, now supports line endings in text files created on Linux, Unix, Mac OS, and macOS devices. "This has been a major annoyance for developers, IT Pros, administrators, and end users throughout the community,"'
You cannot be serious, what professional developer in his right mind would use Notepad?
Funny enough to be just sad.
I don't know whether it handles Mac OS files, but Unix text files open just fine in Wordpad (which like Notepad is part of every Windows installation).
see this is what pisses me off..
in the near future when you search for linux/linux issues, up pops M$ and linux related articles. FFFFFFFFFFFFFFUCK THAT.
and I don't give a shit what you think
This is geared at people working with mixed deployment systems on Azure. And it's great. Honestly, this has been my most wished for feature in Windows for a long, long time.
Drop the negativity - a good and useful thing has just happened. Thanks.
MS write (or.. wordpad?) always supported it and came with windows free so it was never a big deal.
Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
Carriage Return (CR) + Line Feed (LF) was initiated since MS-DOS, later Windows.
Is that edit.exe -- the console-based editor that came out with DOS 5.0 -- *did* support UNIX EOL. Go figger.
I use WinVI as a replacement for notepad. Standalone, small, starts immediately. Works like Notepad, but you can press escape to go into VI mode. And the handling of LF/CR is superb.
It always perplexed me why MS didn't just buy Notepad++ out for (relative to them) some pittance ages ago and bundle it standard with Windows. To me one of the apps an OS should most definitely include bundled is a solid text editor.
Of course I also say I don't know why they continue to push Edge and didn't just license Chrome and/or Firefox for inclusion by default. It would earn them a load of goodwill and get regulators off their back in a lot of ways and save them a load of money and obviously the whole approach of use the browser to promote OS market share failed.
Wake me up when windows can read EXT4 filesystems, I mean it has only been around for 15 years, is an open standard which could easily have been coded for, and it would be just common sense to do so. Meanwhile linux has been able to read NTFS/FAT/FAT32 for 20+ years.
But oh yay, linebreaks, lookit all that progress..
For the few who don't know, or can't immediately figure it out, LF would change the line AT the current column (position) which was good for (among other things) rapidly positioning print head (or what ever) when you wanted it to not waste the time to return to the far left (I don't know what happened with bi-directional typing devices). CR would return the print head to the left which would allow double-strike making underlining possible (especially automatically) and also allowing two characters to occupy the same space (ie strike-thru, etc.). At one point there were games/contests for inventing 'symbols' made up of two or more characters. Of course this makes more sense when the print head (or key or whatever) is physically fixed in terms of what it can impress onto the page. So, in the context of not assuming a new line necessarily was always what was wanted after you got to the end of a line, having two characters makes some sense.
this app can break
What about UTF8 ? Anyway Ive been using Akelpad much better.
Keep up the good work. Eyes waiting for "not trying to format any non-win partition on a drive"
...in after-hours trading.
Now let's fix the friggin Windows console(s).
Being able to handle large files by NOT trying to load a huge file into ram and only noticing after two minutes or 10 that it fails will probably take another 40 years.
We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
suddenly it got really cold down here for a moment
"vi -b" to see the ^M end of line character and ^Z end of file characters of windows text files under *nix.
>/dev/null 2>&1
It still needs a lisp interpreter.
This is like announcing that the 2 star hotel across town finally got rid of its cockroach problem. Good news, but it doesn't make me want to stay there unless I had to.
I see Microsoft is continuing their breathtaking pace of innovation, and implementing features they should have done over a decade ago.
So glad to see Microsoft is still a pioneer of the tech industry, instead of some stale old one-trick pony trying to remain relevant in the world as they increasingly decide what their customers want is irrelevant.
Nosirree, no turning into another IBM for Microsoft. They're innovating.
I mean,everyone who ever edits files in a secured folder has switched to notepad++, but UAC's been around for what, 10 years?
Either my clock is broken, or I'm a time traveller. Whichever: WTF year is this?
*not*
F-U M-S
Why does this need to be disabled ever? How is it ever better to ignore obvious line breaks?
Mac OS 1 through 9 use the same newline as ProDOS on the Apple IIe: $0D.
Mac OS X 10.0 through 10.11 and macOS 10.12 to present use the same newline as UNIX: $0A.
Traditionally, MS-DOS and Windows have used the same newline as Digital Research's CP/M: $0D $0A.
The $0D $0A sequence dates back to the Teletype Model 33 terminal, one of the first terminals to use ASCII. It could process a carriage return ($0D) and a line feed ($0A) in parallel, but because a return took longer than a line feed, computers sent the return first, then the line feed, then a split second of pausing before the next character so that it wouldn't get smeared across the page during the return. If your Model 33 had the optional ASR paper tape drive, you might have had to use the delete key to insert the pauses yourself.
UNIX relied on terminal drivers to convert a newline to whatever sequence a particular terminal needed. CP/M just encoded what the terminal expected directly into an application. MS-DOS was originally a clone of CP/M (and DR-DOS was forked from authentic CP/M), and Windows was originally a GUI shell around MS-DOS. Though MS-DOS 2 was sophisticated enough to use these sorts of drivers, it had to remain compatible with applications designed for the much more CP/M-like MS-DOS 1.
I just heard that Windows notepad tried to replace MS-DOS edline (line editor https://en.wikipedia.org/wiki/...), but failed as edline is still in Windows 10 !?
Microsoft could easily have made Notepad less bare-bones if they wanted. I think it was deliberately made minimal in order to push users with low computer literacy away from text files towards Word files as far as possible.
Unlike most text editors, Notepad provides ways to make text bold or underlined and change the font type and size. Use any of these functions and you'll be told to save to an RTF file to keep the formatting. The RTF file will then open in Wordpad. Open an RTF in Wordpad and save it, and you'll be encouraged to switch to Word format. So you end up using Word for everything.
Also, try to open a large file in Notepad and you get told to use Wordpad instead (although I think maybe they fixed this? not sure). There's no reason a text editor shouldn't be able to open large files, and certainly no reason why they should work fine in Wordpad but not in Notepad. Again, you are pushed towards RTF and Word files.
Viewed from this perspective, not handling Unix and Mac OS text files cleanly is a feature, not a bug. A naive user sent a Unix file that displays incorrecly will assume that there's a problem with the file, not with Notepad, and will trust text files less.
But nowadays this attempt to push the user to proprietary formats is old-fashioned. Normal users share text mostly using email software, messaging apps or maybe web interfaces, and only programmers really make any use of text files any more. So Notepad's crankiness no longer serves any useful purpose.
A fraction in ratio notation, such as 1/2, is assumed to be exact unless specified otherwise. A decimal, on the other hand, often represents an interval of real numbers based on significant figure conventions. For example, 0.5 means "anything that rounds to 0.5", namely the interval 0.450 to 0.550, and 0.50 means "anything that rounds to 0.50", namely the interval 0.495 to 0.505.
Unix is not a text editor.
A UNIX system includes the vi application, which is a screen-oriented text editor. The standard specifies its behavior.
I gave up on convincing people of things.
I will simply state something repeatedly... like "csv files are not Excel files. They are text files with comma separated values." Just because nearly EVERYONE uses Excel to view them, sometimes with terrible results because then they SAVE them in Excel which can change the data, doesn't make them Excel files.
It's kind scary how things like that just become the de-facto standard. Then you get someone - a developer - trying to open and edit a 2MM row csv with Excel. While the developer was waiting minutes for the file to open in Excel... I opened it in vim, made the edits, zipped it up, and emailed it back to him. And people still think I am backwards for using the command line.
My beliefs do not require that you agree with them.
GPL means they would need need to pay for it, but they would probably want to get the developers on board (not necessarily employed).
There are many other free utilities that they could add. WinDirStat is one. 7zip another. Very cheap ways to add value to the base O/S with minimal effort or risk.
LF must come after the CR because it takes more than 100ms to return the carriage. The LF can happen while the carriage is returning. But if it is beyond about column 40 then 200ms is still not enough, so you need to add a NULL.
Those machines really flew at ten characters per second. Marvelous engineering.
Auto backup in case the system crashes/restarts.
Objective-Notepad :-)
I haven't been able to get a page of text to print correctly on unix in 30 years... Now I finally know why!
No, it's a joke.
The truth is that, on UNIX, CR is translated to a CR + LF in the terminal and/or printer driver. MS-DOS was such a toy that couldn't afford to have a terminal driver.
It's sad that it's newsworthy the Microsoft finally makes a small improvement to a 30 year old piece of shit app. Fuck you Microsoft.
WordPad has always been able, and available.
How is this a slashdot-worthy notice?
Self-importance and self-indulgence is the root of ALL evil.
The NIH syndrome is finally gone. Bill Gates and Ballmer's evil influence is wiped out. We can trust Microsoft now.
(Actually who cares. No one uses that POS anyway.)