From 21f0b69c2e909994d8dff29cdce67b7ca1c0faeb Mon Sep 17 00:00:00 2001 From: Tanay Parikh Date: Wed, 12 Jan 2022 21:56:12 +0000 Subject: [PATCH] UTF8->UTF8 with BOM & UTF8 Console Output Encoding --- src/BuiltInTools/dotnet-watch/DotNetWatcher.cs | 2 +- src/BuiltInTools/dotnet-watch/Filters/LaunchBrowserFilter.cs | 2 +- src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs | 2 +- .../dotnet-watch/HotReload/ScopedCssFileHandler.cs | 2 +- src/BuiltInTools/dotnet-watch/HotReload/StaticFileHandler.cs | 2 +- src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs | 2 +- src/BuiltInTools/dotnet-watch/Internal/ConsoleReporter.cs | 2 +- src/BuiltInTools/dotnet-watch/Internal/ConsoleRequester.cs | 2 +- src/BuiltInTools/dotnet-watch/Internal/NullReporter.cs | 2 +- src/BuiltInTools/dotnet-watch/Internal/PhysicalConsole.cs | 2 ++ src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs | 2 +- src/BuiltInTools/dotnet-watch/Program.cs | 2 +- src/Tests/dotnet-watch.Tests/BrowserLaunchTests.cs | 2 +- src/Tests/dotnet-watch.Tests/CommandLineOptionsTests.cs | 2 +- src/Tests/dotnet-watch.Tests/DotNetWatcherTests.cs | 2 +- src/Tests/dotnet-watch.Tests/GlobbingAppTests.cs | 2 +- src/Tests/dotnet-watch.Tests/Utilities/WatchableApp.cs | 3 ++- 17 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs b/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs index 71cd61db9d9b..638af6d0ee3b 100644 --- a/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/src/BuiltInTools/dotnet-watch/Filters/LaunchBrowserFilter.cs b/src/BuiltInTools/dotnet-watch/Filters/LaunchBrowserFilter.cs index 5430a973b18d..f5914ab63a2d 100644 --- a/src/BuiltInTools/dotnet-watch/Filters/LaunchBrowserFilter.cs +++ b/src/BuiltInTools/dotnet-watch/Filters/LaunchBrowserFilter.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs b/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs index 8d4fb84aafa6..81e8d1b09316 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. #nullable enable diff --git a/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs b/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs index a6981d0fa9cd..8361ec0e58b9 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. #nullable enable diff --git a/src/BuiltInTools/dotnet-watch/HotReload/StaticFileHandler.cs b/src/BuiltInTools/dotnet-watch/HotReload/StaticFileHandler.cs index cd7a8dd8c591..0c229f86110a 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/StaticFileHandler.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/StaticFileHandler.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; diff --git a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs index 568a417d5570..721006494f70 100644 --- a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/src/BuiltInTools/dotnet-watch/Internal/ConsoleReporter.cs b/src/BuiltInTools/dotnet-watch/Internal/ConsoleReporter.cs index 757977b994e9..7445520bd981 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/ConsoleReporter.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/ConsoleReporter.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/src/BuiltInTools/dotnet-watch/Internal/ConsoleRequester.cs b/src/BuiltInTools/dotnet-watch/Internal/ConsoleRequester.cs index 83583b6d73f4..b3c861bd7223 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/ConsoleRequester.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/ConsoleRequester.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/src/BuiltInTools/dotnet-watch/Internal/NullReporter.cs b/src/BuiltInTools/dotnet-watch/Internal/NullReporter.cs index 0be0a583f99f..bbc5cb000c6b 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/NullReporter.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/NullReporter.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.Extensions.Tools.Internal diff --git a/src/BuiltInTools/dotnet-watch/Internal/PhysicalConsole.cs b/src/BuiltInTools/dotnet-watch/Internal/PhysicalConsole.cs index 7bc2c04aed87..8ea2026e9bfc 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/PhysicalConsole.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/PhysicalConsole.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Text; using System.Threading.Tasks; namespace Microsoft.Extensions.Tools.Internal @@ -18,6 +19,7 @@ public class PhysicalConsole : IConsole private PhysicalConsole() { + Console.OutputEncoding = Encoding.UTF8; Console.CancelKeyPress += (o, e) => { CancelKeyPress?.Invoke(o, e); diff --git a/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs b/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs index 89b28e6f2a1f..c139101d77b1 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. #nullable enable diff --git a/src/BuiltInTools/dotnet-watch/Program.cs b/src/BuiltInTools/dotnet-watch/Program.cs index 64619172ccbe..69312b56c581 100644 --- a/src/BuiltInTools/dotnet-watch/Program.cs +++ b/src/BuiltInTools/dotnet-watch/Program.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/src/Tests/dotnet-watch.Tests/BrowserLaunchTests.cs b/src/Tests/dotnet-watch.Tests/BrowserLaunchTests.cs index 153d325ad358..f479dcf9dd88 100644 --- a/src/Tests/dotnet-watch.Tests/BrowserLaunchTests.cs +++ b/src/Tests/dotnet-watch.Tests/BrowserLaunchTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/src/Tests/dotnet-watch.Tests/CommandLineOptionsTests.cs b/src/Tests/dotnet-watch.Tests/CommandLineOptionsTests.cs index 0d2c3cae0804..92edfcfb717d 100644 --- a/src/Tests/dotnet-watch.Tests/CommandLineOptionsTests.cs +++ b/src/Tests/dotnet-watch.Tests/CommandLineOptionsTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.CommandLine; diff --git a/src/Tests/dotnet-watch.Tests/DotNetWatcherTests.cs b/src/Tests/dotnet-watch.Tests/DotNetWatcherTests.cs index 825434f08993..0c29b32ecb3a 100644 --- a/src/Tests/dotnet-watch.Tests/DotNetWatcherTests.cs +++ b/src/Tests/dotnet-watch.Tests/DotNetWatcherTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/src/Tests/dotnet-watch.Tests/GlobbingAppTests.cs b/src/Tests/dotnet-watch.Tests/GlobbingAppTests.cs index e8719fbdc60e..d6cbafa2db79 100644 --- a/src/Tests/dotnet-watch.Tests/GlobbingAppTests.cs +++ b/src/Tests/dotnet-watch.Tests/GlobbingAppTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/src/Tests/dotnet-watch.Tests/Utilities/WatchableApp.cs b/src/Tests/dotnet-watch.Tests/Utilities/WatchableApp.cs index 56e286919889..9a3dc306bdd8 100644 --- a/src/Tests/dotnet-watch.Tests/Utilities/WatchableApp.cs +++ b/src/Tests/dotnet-watch.Tests/Utilities/WatchableApp.cs @@ -1,10 +1,11 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; +using System.Text; using System.Threading.Tasks; using Microsoft.NET.TestFramework.Assertions; using Microsoft.NET.TestFramework.Commands;