From 3968fc5e92ebc2e4a2d97df0105000af2ec7eb82 Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Tue, 5 Sep 2023 09:10:18 +0800 Subject: [PATCH] Revert "chore: Change output html file encoding to UTF-8 (No BOM) (#9131)" This reverts commit 505f7cf87e9b30a9b53395be97e5536d3b2f8f41. Fixes #9171 --- src/Docfx.Build.Engine/PostProcessors/HtmlPostProcessor.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Docfx.Build.Engine/PostProcessors/HtmlPostProcessor.cs b/src/Docfx.Build.Engine/PostProcessors/HtmlPostProcessor.cs index 831206da353..3480936ba77 100644 --- a/src/Docfx.Build.Engine/PostProcessors/HtmlPostProcessor.cs +++ b/src/Docfx.Build.Engine/PostProcessors/HtmlPostProcessor.cs @@ -13,8 +13,6 @@ namespace Docfx.Build.Engine; internal sealed class HtmlPostProcessor : IPostProcessor { - private static readonly UTF8Encoding Utf8EncodingWithoutBom = new(false); - public List Handlers { get; } = new List(); private bool _handlerInitialized; @@ -81,7 +79,7 @@ where output.Key.Equals(".html", StringComparison.OrdinalIgnoreCase) } using (var stream = EnvironmentContext.FileAbstractLayer.Create(tuple.OutputFile)) { - document.Save(stream, Utf8EncodingWithoutBom); + document.Save(stream, Encoding.UTF8); } } foreach (var handler in Handlers)