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)