Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

filzrev
Copy link
Contributor

@filzrev filzrev commented Aug 24, 2023

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
Copy link

codecov bot commented Aug 24, 2023

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

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
Copy link
Contributor Author

filzrev commented Aug 24, 2023

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

Copy link
Contributor

@yufeih yufeih left a comment

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