Skip to content

docs: use explicit utf-8 encoding in redirects script#7750

Open
wkd09 wants to merge 1 commit into
microsoft:mainfrom
wkd09:docs/redirects-explicit-utf8
Open

docs: use explicit utf-8 encoding in redirects script#7750
wkd09 wants to merge 1 commit into
microsoft:mainfrom
wkd09:docs/redirects-explicit-utf8

Conversation

@wkd09
Copy link
Copy Markdown

@wkd09 wkd09 commented May 25, 2026

Why are these changes needed?

This PR updates the docs redirect generation script to use explicit UTF-8 encoding when reading and writing text files.

Currently, python/docs/redirects/redirects.py relies on Python's default system encoding when:

  • reading redirect_template.html
  • reading redirect_urls.txt
  • writing generated redirect index.html files

This can be less portable on environments where the default encoding is not UTF-8, such as some Windows locales.

Related issue number

Closes #7749

Checks

Local check:

python -m py_compile python/docs/redirects/redirects.py```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: use explicit UTF-8 encoding in redirect generation script

1 participant