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 af8153d
Showing 1 changed file with 3 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

0 comments on commit af8153d

Please sign in to comment.