mercurial/hgweb/hgwebdir_mod.py
changeset 3889 57b797601b61
parent 3879 9c8488490724
parent 3886 abaee83ce0a6
child 4051 022056263354
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -60,7 +60,8 @@ class hgwebdir(object):
 
     def run_wsgi(self, req):
         def header(**map):
-            header_file = cStringIO.StringIO(''.join(tmpl("header", **map)))
+            header_file = cStringIO.StringIO(
+                ''.join(tmpl("header", encoding=util._encoding, **map)))
             msg = mimetools.Message(header_file, 0)
             req.header(msg.items())
             yield header_file.read()