Fixed UTF-8 with BOM encoding support #6923
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR for #6917
Changed
utf-8
toutf-8-sig
in all instanced where a file is read, that the user could've created with an external editor.Kept
utf-8
for reading files that are generated or already provided by the theme.I decided to not add comments to each changed line, as supporting BOM isn't a priority, and if someone forgets using
-sig
it won't be the end of the world.Tested by serving
mkdocs-material
documentation with this Community version of the codebase, and there was no crash.Therefore the privacy plugin wasn't tested, but those changed got tested in Insiders.
https://github.com/squidfunk/mkdocs-material-insiders/pull/82