File tree Expand file tree Collapse file tree
Microsoft.TestPlatform.CoreUtilities/FeatureFlag Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ private FeatureFlag() { }
5757 // Disable the SerialTestRunDecorator
5858 public const string DISABLE_SERIALTESTRUN_DECORATOR = VSTEST_ + nameof ( DISABLE_SERIALTESTRUN_DECORATOR ) ;
5959
60+ // Disable setting UTF8 encoding in console.
61+ public const string DISABLE_UTF8_CONSOLE_ENCODING = VSTEST_ + nameof ( DISABLE_UTF8_CONSOLE_ENCODING ) ;
62+
6063 [ Obsolete ( "Only use this in tests." ) ]
6164 internal static void Reset ( )
6265 {
Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
4+ using System . Text ;
5+ using System ;
6+
47using Microsoft . VisualStudio . TestPlatform . Execution ;
58using Microsoft . VisualStudio . TestPlatform . Utilities ;
69
@@ -20,6 +23,10 @@ public static class Program
2023
2124 internal static int Run ( string [ ] ? args , UiLanguageOverride uiLanguageOverride )
2225 {
26+ if ( ! FeatureFlag . Instance . IsSet ( FeatureFlag . DISABLE_UTF8_CONSOLE_ENCODING ) )
27+ {
28+ Console . OutputEncoding = Encoding . UTF8 ;
29+ }
2330 uiLanguageOverride . SetCultureSpecifiedByUser ( ) ;
2431 return new Executor ( ConsoleOutput . Instance ) . Execute ( args ) ;
2532 }
You can’t perform that action at this time.
0 commit comments