diff --git a/src/dcow/base.py b/src/dcow/base.py index 4a14905..e13942c 100644 --- a/src/dcow/base.py +++ b/src/dcow/base.py @@ -30,10 +30,12 @@ class VariedResponse(milla.Response): context = {} if template is None or self.request.want == 'json': self.content_type = str('application/json') + self.charset = 'utf-8' json.dump(context, self.body_file) else: if self.request.want == 'xhtml': self.content_type = str('application/xhtml+xml') + self.charset = 'utf-8' self.render(template, context) def render(self, template, context=None):