summaryrefslogtreecommitdiff
path: root/jtlib/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'jtlib/app.py')
-rw-r--r--jtlib/app.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/jtlib/app.py b/jtlib/app.py
index ad0d7a3..ddbb94a 100644
--- a/jtlib/app.py
+++ b/jtlib/app.py
@@ -134,5 +134,9 @@ class JournalTool(cliapp.Application):
def render_template(self, basename, vars):
text = self.read_template(basename)
- template = jinja2.Template(text)
- return template.render(**vars)
+ utext = unicode(text, 'utf8')
+ uvars = dict(
+ (unicode(k, 'utf8'), unicode(v, 'utf8'))
+ for k, v in vars.items())
+ template = jinja2.Template(utext)
+ return template.render(**uvars)