autogen icon indicating copy to clipboard operation
autogen copied to clipboard

docs: use explicit utf-8 encoding in redirects script

Open wkd09 opened this issue 6 months ago • 0 comments

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```

wkd09 avatar May 25 '26 15:05 wkd09