From da121e5eb4d42bb6110cc3da062734675a7872ab Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Fri, 22 Mar 2024 10:10:57 +1100 Subject: [PATCH] Specify encoding for templates in case it's not the default --- conservancy/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conservancy/views.py b/conservancy/views.py index 560eaf61..21f5b175 100644 --- a/conservancy/views.py +++ b/conservancy/views.py @@ -48,7 +48,7 @@ def index(request, *args, **kwargs): pass # These template are intentionally not in the template loader path, so # we open them directly, rather than using the template loader. - with open(full_path) as t: + with open(full_path, encoding='utf-8') as t: template = Template(t.read()) context = RequestContext(request, kwargs) return HttpResponse(template.render(context))