Force UTF-8 output in PowerShell

This commit is contained in:
Anthony Rose 2024-01-17 08:02:51 +00:00
parent 2a43a3898b
commit 73c8dfeadc

View file

@ -72,6 +72,9 @@ if ($IsWindows -or ($env:OS -eq "Windows_NT")) {
$env:__COMPAT_LAYER = "RunAsInvoker" $env:__COMPAT_LAYER = "RunAsInvoker"
} }
# Force UTF-8 output.
$OutputEncoding = [System.Text.Encoding]::UTF8
Set-PSReadlineOption -BellStyle None Set-PSReadlineOption -BellStyle None
Set-PSReadlineOption -EditMode Emacs Set-PSReadlineOption -EditMode Emacs
Set-PSReadlineKeyHandler -Key Tab -Function Complete Set-PSReadlineKeyHandler -Key Tab -Function Complete