Skip to content

Commit

Permalink
Revert "chore: Change output html file encoding to UTF-8 (No BOM) (#9131
Browse files Browse the repository at this point in the history
)"

This reverts commit 505f7cf.

Fixes #9171
  • Loading branch information
yufeih committed Sep 5, 2023
1 parent 25918c8 commit 3968fc5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Docfx.Build.Engine/PostProcessors/HtmlPostProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ namespace Docfx.Build.Engine;

internal sealed class HtmlPostProcessor : IPostProcessor
{
private static readonly UTF8Encoding Utf8EncodingWithoutBom = new(false);

public List<IHtmlDocumentHandler> Handlers { get; } = new List<IHtmlDocumentHandler>();

private bool _handlerInitialized;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3968fc5

Please sign in to comment.