Skip to content

chore: Change output html file encoding to UTF-8 (No BOM)#9131

Merged
yufeih merged 1 commit into
dotnet:mainfrom
filzrev:chore-change-output-html-encoding
Aug 25, 2023
Merged

chore: Change output html file encoding to UTF-8 (No BOM)#9131
yufeih merged 1 commit into
dotnet:mainfrom
filzrev:chore-change-output-html-encoding

Conversation

@filzrev

@filzrev filzrev commented Aug 24, 2023

Copy link
Copy Markdown
Collaborator

What's included in this PR

  • Change output HTML encoding from UTF-8(BOM) to UTF-8 (No BOM).

Background
Currently docfx output HTML files using UTF-8 (with BOM) encoding.
And other non-HTML files are using UTF-8 (No BOM).

Currently docfx output HTML with following meta tag. so it seems BOM is not required.

If there is any reason to use UTF-8(BOM) close this PR.
(For example. Snapshot tests library requires BOM)

@codecov

codecov Bot commented Aug 24, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (277aa86) 77.58% compared to head (652594f) 77.58%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9131   +/-   ##
=======================================
  Coverage   77.58%   77.58%           
=======================================
  Files         591      591           
  Lines       24567    24568    +1     
=======================================
+ Hits        19060    19061    +1     
  Misses       5507     5507           
Files Changed Coverage Δ
...x.Build.Engine/PostProcessors/HtmlPostProcessor.cs 90.24% <100.00%> (+0.24%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KalleOlaviNiemitalo

Copy link
Copy Markdown

Currently docfx output HTML with following meta tag. so it seems BOM is not required.

What's the meta tag? I don't see it in the description.

@filzrev

filzrev commented Aug 24, 2023

Copy link
Copy Markdown
Collaborator Author

What's the meta tag? I don't see it in the description.

Sorry it indicate <meta charset="utf-8"> (It's contains HTML tags so it's not rendered when using quote syntax)

default template
https://github.com/dotnet/docfx/blob/main/templates/default/partials/head.tmpl.partial#L4

modern template
https://github.com/dotnet/docfx/blob/main/templates/modern/layout/_master.tmpl#L9

@yufeih yufeih left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@yufeih
yufeih merged commit 505f7cf into dotnet:main Aug 25, 2023
@yufeih yufeih added the bug-fix Makes the pull request to appear in "Bug Fixes" section of the next release note label Aug 25, 2023
yufeih added a commit that referenced this pull request Sep 5, 2023
p-kostov pushed a commit to ErpNetDocs/docfx that referenced this pull request Jun 28, 2024
chore: change output html file encoding to UTF-8 (No BOM)
p-kostov pushed a commit to ErpNetDocs/docfx that referenced this pull request Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Makes the pull request to appear in "Bug Fixes" section of the next release note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants