I first tried Windows around 30 years ago…

It’s now 2020, and Windows Terminal cannot pipe text into a file without corrupting it with additional characters.

Bill Gates is a billionaire. Steve Ballmer is a billionaire. Charles Simonyi is a billionaire. Paul Allen was a billionaire.

Please, tell me again about your fucking meritocracy.

If you want to try it for yourself, here (you’ll need Node):

1. Fire up Windows Terminal
2. echo 'incompetence' > perfected
3. 'fs=require("fs"); a=fs.readFileSync("perfected", "utf-8"); console.log(a)' | node

Show thread

PS. In case anyone wants the workaround:

echo 'incompetence' | Out-File -Encoding ASCII perfected

Show thread

@aral Good marketing*, not good product.

* Good marketing here doesn't necessarily mean any respect for the customers.

@amiloradovsky @aral Yeah the meritocracy rewarded genius level strong arm tactics. Getting software onto PCs at the OEM level.

Ensuring no one knew how to use anything else (mainly with MS Office) was also important.

@ben @aral Lots of tactics. Like sending diskettes into universities for free to make the staff addicted.

@ben @amiloradovsky @aral

Depending on how you define things, it certainly is genius. Why waste effort on your product when you can just warp the market?

@aral does this get better if you use conemu?

(I basically cannot use the win10 vm thing that I have for work, or any win10, without conemu.)

You can install via chocolately... or of course via something else but I tend to use chocolatey because it's at least SOMEWHAT similar to a more sensible modern install system. SOMEWHAT. And yes all install systems suck...

Anyway am wondering if it is the abysmal thing that is the standard cmd.exe window, or if it is better with another...

oh actually you could see if it works in powershell first, that uses a different mechanism for doing console bits. It even supports truecolor. It still sucks (:

@mjd @aral judging by the comments on even if you change the encoding for redirection in #PowerShell, it will still include the #ByteOrderMark. Though it might be possible in #PowerShellCore.

Doesn't take away though that these are horrible defaults and should just work regardless of what terminal you use...

@FiXato @aral oh of course, because it's using utf16 for files, because...

I wonder if you can force it to use utf8 for files, instead of "oh, you want to use utf8! I'll make that utf16 for you."


chcp 65001

will work, but that is just... silly.

65000 is UTF7.

I'd just go for "don't use Windows" (:

And for testing under Windows, ssh from your POP!os machine to the windows machine, and run it there... and see if THAT also has the BOM.

Ugh. I'll bet we run into some goofy things with the new product because of this UTF16 garbage and the Windows program that I wish we didn't have to use... but not my choice so...

@aral you're assuming UTF-8 too, is that really it?

@aral Interesting. Probably a UTF-8 BOM, which is a stupid idea by people who don't understand Unicode, namely Microsoft.

@aral Except that reading Wikipedia page further I realise that it probably isn't even BOM in UTF-8, but in UTF-16. Which is not surprising since UTF-16 is the encoding Windows uses internally. But that doesn't mean that node is broken either. You are just trying to read UTF-16 as UTF-8.

@aral that's probably only in Powershell, right?

Doesn't seem to do that in cmd - I guess it's a powershell bug?

@aral Also, do not forget that they started Microsoft by buying an operating system someone else made and stamping their name and logo all over it, and then selling it.

I think what made Bill and Steve so popular and got them to the point they are now (or were, in the case of Steve Jobs who is now deceased) is not the fact that they were good at making computer software or hardware, which in fact they weren't. It's the fact that they were brilliant at making business.

And that has been their strategy for over 50 years now. And that's what lead us to the point we are in now.

@aral you certainly don't need me to tell you this, but --

those billionaires' ability to sell stuff was not based on what people want, or on what works correctly/elegantly, but on what people would put up with in their tools to achieve their goals.

computers are solely a means to not-computer-related ends for the vast, overwhelming majority of computer-using humanity.

i say this because many people in our industry can lose sight of that fact.

@aral Windows has been fine technically since Windows NT 4 released in 1996. It's got some problems, but so does Linux.

@aral it is little to do with meritocracy and everything to do with monopoly. The average windows user has never used the terminal at all.

@aral Meritocracy is when talented people are put into power. This here is what happens when wealthy people are put into power.

@aral the cmd.exe is still the same crap for compatibility reasons.

Try powershell

@tuxicoman @aral reading this thread, I'm starting to realize that #PowerShell was aptly named for the #PowerUser who wanted to do more than what was advertised - #TheRealHacker

Sign in to participate in the conversation
Aral’s Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!