[Chapel Merge] Update chpl2rst.py to explicitly use UTF-8 encodin

Branch: refs/heads/master
Revision: a8d5acb
Author: mppf
Log Message:

Merge pull request #16615 from mppf/chpl2rst-utf8

Update chpl2rst.py to explicitly use UTF-8 encoding

Follow-up to PR #16560 and #16608

This PR updates chpl2rst.py to open input and output files with UTF-8 encoding.

Some testing configurations are running make docs with settings
that lead Python 3 to use the ascii encoding by default.

The problem is reproducible with

LC_ALL=C PYTHONUTF8=0 make docs

and that command works after this PR.

Reviewed by @lydia-duncan - thanks!

Modified Files:
M doc/util/chpl2rst.py

Compare: https://github.com/chapel-lang/chapel/compare/c15a3a68b2ba...a8d5acbd8b79