Linked by Drumhellar on Thu 10th May 2018 22:29 UTC
Windows

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.

Order by: Score:
No more taboo
by step on Fri 11th May 2018 03:32 UTC
step
Member since:
2018-05-03

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

Reply Score: 0

RE: No more taboo
by jockm on Fri 11th May 2018 23:36 UTC in reply to "No more taboo"
jockm Member since:
2012-12-22

Microsoft Products are opening themselves to a wider world. This world will be dominated by Windows/Linux and haiku/fuchsia in desktop. MacOS suchs...


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 ;)

Reply Score: 5

Comment by Nth_Man
by Nth_Man on Fri 11th May 2018 06:06 UTC
Nth_Man
Member since:
2010-05-16

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...

Reply Score: 4

RE: Comment by Nth_Man
by henderson101 on Fri 11th May 2018 09:33 UTC in reply to "Comment by Nth_Man"
henderson101 Member since:
2006-05-30

This has been a major annoyance for developers, IT Pro’s, administrators, and end users throughout the community.


Why? Wordpad. Open in Wordpad, save as plain text with MSDOS line endings.This is what I always did.

Reply Score: 3

RE[2]: Comment by Nth_Man
by Nth_Man on Fri 11th May 2018 09:59 UTC in reply to "RE: Comment by Nth_Man"
Nth_Man Member since:
2010-05-16

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.

Reply Score: 1

RE[3]: Comment by Nth_Man
by henderson101 on Fri 11th May 2018 11:31 UTC in reply to "RE[2]: Comment by Nth_Man"
henderson101 Member since:
2006-05-30

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.

Reply Score: 3

RE[4]: Comment by Nth_Man
by Nth_Man on Fri 11th May 2018 12:21 UTC in reply to "RE[3]: Comment by Nth_Man"
Nth_Man Member since:
2010-05-16

Well, you wrote:


> Maybe in blogs.msdn.microsoft.com wrote that...
> This has been a major annoyance for developers, IT
> Pro’s, administrators, and end users throughout the
> community.

Why? Wordpad. Open in Wordpad, save as plain text with MSDOS line endings.This is what I always did.

And you were answered why. I'm not going to lose time answering the same or viewing this same thread.

Reply Score: 1

RE[5]: Comment by Nth_Man
by henderson101 on Fri 11th May 2018 15:27 UTC in reply to "RE[4]: Comment by Nth_Man"
henderson101 Member since:
2006-05-30

And you were answered why.


Not really. I was given an opinion based on a premise that was not necessarily correct. Many text editors on Windows also destroy unicode characters. Wordpad (and Write before it) was a way to read the file without having to use another tool. You realise you can save a copy, right? You don't destroy the original file in any way doing that. As I said, it depends on what you are trying to achieve.

I'm not going to lose time answering the same or viewing this same thread.


And yet.... you did. ;-)

Reply Score: 4

RE[2]: Comment by Nth_Man
by Delgarde on Fri 11th May 2018 11:00 UTC in reply to "RE: Comment by Nth_Man"
Delgarde Member since:
2008-08-19

Why? Wordpad. Open in Wordpad, save as plain text with MSDOS line endings.This is what I always 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...

Reply Score: 3

RE[3]: Comment by Nth_Man
by henderson101 on Fri 11th May 2018 11:34 UTC in reply to "RE[2]: Comment by Nth_Man"
henderson101 Member since:
2006-05-30

Because aside from this specific issue of dealing with Unix-formatted files, Wordpad is actually worse than Notepad


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.

Reply Score: 3

RE[2]: Comment by Nth_Man
by darknexus on Fri 11th May 2018 11:36 UTC in reply to "RE: Comment by Nth_Man"
darknexus Member since:
2008-07-15

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.

Reply Score: 0

RE[3]: Comment by Nth_Man
by henderson101 on Fri 11th May 2018 15:35 UTC in reply to "RE[2]: Comment by Nth_Man"
henderson101 Member since:
2006-05-30

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.)

Reply Score: 3

RE: Comment by Nth_Man
by bassbeast on Fri 11th May 2018 16:26 UTC in reply to "Comment by Nth_Man"
bassbeast Member since:
2007-11-11

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.

Reply Score: 1

RE[2]: Comment by Nth_Man
by coherence on Sat 12th May 2018 11:07 UTC in reply to "RE: Comment by Nth_Man"
coherence Member since:
2018-02-04

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.

Reply Score: 2

RE[3]: Comment by Nth_Man
by bassbeast on Sun 13th May 2018 08:45 UTC in reply to "RE[2]: Comment by Nth_Man"
bassbeast Member since:
2007-11-11

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?

Reply Score: 2

RE[2]: Comment by Nth_Man
by zima on Sun 13th May 2018 20:18 UTC in reply to "RE: Comment by Nth_Man"
zima Member since:
2005-07-06

Uhhhh...who uses the default crap in Windows?

I use mostly the "default crap" Notepad. ;) Mostly for... ~notes. It's good for what it is.

Reply Score: 2

v :wq
by Risthel on Fri 11th May 2018 10:39 UTC
RE: :wq
by darknexus on Fri 11th May 2018 11:40 UTC in reply to ":wq"
darknexus Member since:
2008-07-15

Next step? Implement "vi mode" to make Stallman double pissed

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. ;)

Reply Score: 0

So then, Notepad++ is now redundant?
by spudley99 on Fri 11th May 2018 11:30 UTC
spudley99
Member since:
2009-03-25

So I guess now that they've done this, I can finally stop using Notepad++, right?

/s

Reply Score: 0

ebasconp Member since:
2006-05-09

Of course,

You can start to use Sublime Text now then.

Reply Score: 2

v Comment by lpotter
by lpotter on Sun 13th May 2018 08:21 UTC
Notepad++
by agentj on Sun 13th May 2018 16:37 UTC
agentj
Member since:
2005-08-19

Why can't they just integrate Notepad++ into the default system distribution and remove some 30 year old crapware from dinosaur times ?

Reply Score: 0

RE: Notepad++
by ahferroin7 on Mon 14th May 2018 11:20 UTC in reply to "Notepad++"
ahferroin7 Member since:
2015-10-30

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).

Reply Score: 2