Set charset encoding for hgwebdir, too.
authorThomas Arendsen Hein <thomas@intevation.de>
Thu, 14 Dec 2006 16:07:29 +0100
changeset 3879 9c8488490724
parent 3875 729f354f3f09
child 3880 a04f304eeded
child 3882 daa42bac8611
Set charset encoding for hgwebdir, too. (And remove extra spaces in the corresponding place in hgweb)
mercurial/hgweb/hgweb_mod.py
mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -655,7 +655,7 @@ class hgweb(object):
     def run_wsgi(self, req):
         def header(**map):
             header_file = cStringIO.StringIO(
-                ''.join(self.t("header", encoding = util._encoding, **map)))
+                ''.join(self.t("header", encoding=util._encoding, **map)))
             msg = mimetools.Message(header_file, 0)
             req.header(msg.items())
             yield header_file.read()
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -61,7 +61,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()