Commits

Georg Brandl  committed 3366b71 Merge

merge with 1.0

  • Participants
  • Parent commits bebd499, b7ead74

Comments (0)

Files changed (3)

File sphinx/builders/html.py

             return uri
         ctx['pathto'] = pathto
         ctx['hasdoc'] = lambda name: name in self.env.all_docs
-        ctx['encoding'] = encoding = self.config.html_output_encoding
+        if self.name != 'htmlhelp':
+            ctx['encoding'] = encoding = self.config.html_output_encoding
+        else:
+            ctx['encoding'] = encoding = self.encoding
         ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw)
         self.add_sidebars(pagename, ctx)
         ctx.update(addctx)

File sphinx/builders/htmlhelp.py

             def write_index(title, refs, subitems):
                 def write_param(name, value):
                     item = '    <param name="%s" value="%s">\n' % (name, value)
-                    f.write(item.encode('ascii', 'xmlcharrefreplace')
-                            .decode('ascii'))
+                    f.write(item.encode(self.encoding, 'xmlcharrefreplace')
+                            .decode(self.encoding))
                 title = cgi.escape(title)
                 f.write('<LI> <OBJECT type="text/sitemap">\n')
                 write_param('Keyword', title)

File sphinx/pycode/pgen2/driver.py

         head, tail = os.path.splitext(gt)
         if tail == ".txt":
             tail = ""
-        gp = head + tail + ".".join(map(str, sys.version_info)) + ".pickle"
+        gp = head + tail + ".".join(map(str, sys.version_info[:2])) + ".pickle"
     if force or not _newer(gp, gt):
         logger.info("Generating grammar tables from %s", gt)
         g = pgen.generate_grammar(gt)