News for hackers. Stuff that matters.
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux by tyingq on Saturday October 09, 2021 @08:42PM (#28814728)
Also BOM marks, which Powershell loves to output. Took a while for me to figure out what was putting 2 extra bytes into files.

Edit: 3 bytes, not 2 (thanks!)

Re:Part of Windows 11 is a revamped Windows Subsystem for Linux by metaphor on Sunday October 10, 2021 @05:34AM (#28817071)
If you think that's fun, just wait until you encounter the clowns who copy-paste random shit directly out of Word docs containing C1 control codes mascarading as "smart quotes" into your UTF-8 source.
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux by GordonS on Sunday October 10, 2021 @05:47AM (#28817120)
I've done that before, but copying from web pages that have randomly used smart quotes (or whatever they are actually called) in command line samples.

Very annoying!

Re:Part of Windows 11 is a revamped Windows Subsystem for Linux by ploxiln on Saturday October 09, 2021 @09:47PM (#28815064)
The useless utf-8 BOM is 3 bytes ... were you also getting utf-16 encoded text?
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux by barosl on Sunday October 10, 2021 @02:15AM (#28816199)
The UTF-8 BOM still has some uses, unfortunately. I had to convince Excel to parse a CSV file as UTF-8 and inserting a BOM at the beginning of the file was the easiest solution.
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux by ChrisSD on Sunday October 10, 2021 @04:54AM (#28816890)
Powershell has stopped doing that in that newer version. I think since 6 or 7. On Windows 10 you do have to install it separately though.