From ede3aec52ea87715880617c93fab963280e87658 Mon Sep 17 00:00:00 2001 From: Chunqing Chen Date: Wed, 16 Aug 2017 08:41:49 +0800 Subject: [PATCH] Redefine the unicode output condition for nanoserver/IoT for more function (#4074) --- src/System.Management.Automation/engine/InitialSessionState.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs index 9f6783793..96be7766f 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -5329,7 +5329,7 @@ end internal const string DefaultMoreFunctionText = @" param([string[]]$paths) # Nano needs to use Unicode, but Windows and Linux need the default -$OutputEncoding = if ($IsWindows -and $IsCoreCLR) { +$OutputEncoding = if ([System.Management.Automation.Platform]::IsNanoServer -or [System.Management.Automation.Platform]::IsIoT) { [System.Text.Encoding]::Unicode } else { [System.Console]::OutputEncoding