Skip to content

Commit

Permalink
Merge pull request #61 from wrabit/use_engine_charset
Browse files Browse the repository at this point in the history
set charset from engine default
  • Loading branch information
wrabit authored Jul 17, 2024
2 parents 6abd7a8 + 8cca876 commit 64e9f31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_cotton/cotton_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_template_from_string(self, template_string):

def _get_template_string(self, template_name):
try:
with open(template_name, "r") as f:
with open(template_name, "r", encoding=self.engine.file_charset) as f:
return f.read()
except FileNotFoundError:
raise TemplateDoesNotExist(template_name)
Expand Down

0 comments on commit 64e9f31

Please sign in to comment.