From 9bcb4e5e67d173cdd3a6c9ebe86230193a321fd9 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 7 Jan 2021 12:29:12 +0100 Subject: [PATCH] Set Powershell encoding to UTF-8 --- utils/osdetail/powershell_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/osdetail/powershell_windows.go b/utils/osdetail/powershell_windows.go index a7d63a4..07c36fc 100644 --- a/utils/osdetail/powershell_windows.go +++ b/utils/osdetail/powershell_windows.go @@ -13,7 +13,7 @@ func runPowershellCmd(script string) (output string, err error) { "powershell.exe", "-NoProfile", "-NonInteractive", - script, + "[System.Console]::OutputEncoding = [System.Text.Encoding]::UTF8\n"+script, ) // Create and assign output buffers.