From 60acc0d77cc33900458e52fda7741a37c1f58b37 Mon Sep 17 00:00:00 2001 From: Chunqing Chen Date: Tue, 15 Aug 2017 10:56:22 -0700 Subject: [PATCH] Redefine the unicode output condition for nanoserver for more function --- 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 9f6783793ff..96be7766fbb 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -5329,7 +5329,7 @@ internal static SessionStateAliasEntry[] BuiltInAliases 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