From 2f754921f5b58450fe901a179cc9b313ce083a1b Mon Sep 17 00:00:00 2001 From: Prafull Bhosale Date: Thu, 5 Oct 2017 15:38:15 -0700 Subject: [PATCH] Set output encoding to UTF8 --- src/Shared/General/ConsoleLogger.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Shared/General/ConsoleLogger.cs b/src/Shared/General/ConsoleLogger.cs index ae2d0b3f5..64898c246 100644 --- a/src/Shared/General/ConsoleLogger.cs +++ b/src/Shared/General/ConsoleLogger.cs @@ -1,7 +1,8 @@ // 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; +using System.Text; namespace Microsoft.VisualStudio.Web.CodeGeneration { @@ -12,6 +13,11 @@ public class ConsoleLogger : ILogger public bool IsTracing => isTrace; + public ConsoleLogger() + { + Console.OutputEncoding = Encoding.UTF8; + } + public void LogMessage(string message) { LogMessage(message, LogMessageLevel.Information);