Skip to content

Commit f8e6991

Browse files
author
Abdullah Aljelamneh
committed
🐛 Read email templates as UTF-8 to fix UnicodeDecodeError on Windows
1 parent f27b472 commit f8e6991

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎backend/app/utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class EmailData:
2525
def render_email_template(*, template_name: str, context: dict[str, Any]) -> str:
2626
template_str = (
2727
Path(__file__).parent / "email-templates" / template_name
28-
).read_text()
28+
).read_text(encoding="utf-8")
2929
template: Template = Template(template_str)
3030
html_content = template.render(context)
3131
return html_content

0 commit comments

Comments
 (0)