Skip to content

Commit

Permalink
Add explicit encoding to read_text.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Feb 10, 2024
1 parent 3c50423 commit f03b225
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/towncrier/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ def __main(
click.echo("Loading template...", err=to_err)
if isinstance(config.template, tuple):
template = (
resources.files(config.template[0]).joinpath(config.template[1]).read_text()
resources.files(config.template[0])
.joinpath(config.template[1])
.read_text(encoding="utf-8")
)
else:
with open(config.template, encoding="utf-8") as tmpl:
Expand Down
1 change: 1 addition & 0 deletions src/towncrier/newsfragments/+c903f19e.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add explicit encoding to read_text.

0 comments on commit f03b225

Please sign in to comment.