From 56139a4d8ee390668a8b1789fc32265dd840dddf Mon Sep 17 00:00:00 2001 From: Saleh Ahmed Panna Date: Wed, 16 Nov 2022 14:32:50 +0600 Subject: [PATCH] Update ApplyDocumentHandler.cs #16 Saving in UTF-8 encoding --- src/DotnetDocument.Tools/Handlers/ApplyDocumentHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DotnetDocument.Tools/Handlers/ApplyDocumentHandler.cs b/src/DotnetDocument.Tools/Handlers/ApplyDocumentHandler.cs index a4fd5b3..2b8e765 100644 --- a/src/DotnetDocument.Tools/Handlers/ApplyDocumentHandler.cs +++ b/src/DotnetDocument.Tools/Handlers/ApplyDocumentHandler.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using DotnetDocument.Configuration; using DotnetDocument.Strategies.Abstractions; using DotnetDocument.Syntax; @@ -119,7 +120,7 @@ public Result Apply(string? path, bool isDryRun) _logger.LogTrace(" Writing changes of {File} to disk", file); - File.WriteAllText(file, changedSyntaxTree.ToFullString()); + File.WriteAllText(file, changedSyntaxTree.ToFullString(), Encoding.UTF8); } // Return success