3 ms·
PowerShell and Notepad both use UTF-16, but will read/write UTF-8 to files (filenames are UTF-16). It's a bit complex, mainly due to hysterical raisins ^W^W hi
by p_l 6y ago
PowerShell and Notepad both use UTF-16, but will read/write UTF-8 to files (filenames are UTF-16).
It's a bit complex, mainly due to hysterical raisins ^W^W historical reasons.
- BlueTemplar 6y ago'Member how "Bush hid the facts" ? ---- https://docs.microsoft.com/en-us/powershell/scripting/dev-cross-plat/vscode/understanding-file-encoding?view=powershell-7.1#configuring-powershell https://docs.microsoft.com/en-us/powershell/scripting/dev-cr... > In PowerShell 6+, the default encoding is UTF-8 without BOM on all platforms.
- p_l 6y agoYeah, that's external IO, but nice that they made it more default. I got used to reading UTF-16 text rendered as ASCII when dealing with NT :)