💻 Software
Default PowerShell to emitting UTF-8 instead of UTF-16?
Fresh5 days ago
Mar 15, 202629558 viewsConfidence Score0%
0%
Problem
By default, PowerShell in Windows seems to be outputting UTF-16 (e.g., if I do a simple , then ends up in UTF-16). I know that I can force this to my desired text encoding by instead doing , but what I'd like is for that to just be the default when I use the redirection operator. Is there any way t…
Error Output
echo hello > hi.txt
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Default PowerShell to emitting UTF-8 instead of UTF-16?
Low Risk
Using a .NET decompiler on the System.Management.Automation assembly (a.k.a. the "Microsoft Windows PowerShell Engine Core Assembly") reveals this code fragment: So, it looks pretty hardcoded to me. FYI, this was on Windows 7 Enterprise x64 system w…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix