From 73c8dfeadc032da341a7f8d5a2f3da6c135ff472 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Wed, 17 Jan 2024 08:02:51 +0000 Subject: [PATCH] Force UTF-8 output in PowerShell --- roles/home-cli/files/Microsoft.PowerShell_profile.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 b/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 index a298830..f4af96d 100644 --- a/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 +++ b/roles/home-cli/files/Microsoft.PowerShell_profile.ps1 @@ -72,6 +72,9 @@ if ($IsWindows -or ($env:OS -eq "Windows_NT")) { $env:__COMPAT_LAYER = "RunAsInvoker" } +# Force UTF-8 output. +$OutputEncoding = [System.Text.Encoding]::UTF8 + Set-PSReadlineOption -BellStyle None Set-PSReadlineOption -EditMode Emacs Set-PSReadlineKeyHandler -Key Tab -Function Complete