Georg Brandl  committed 578147f

#232: Support non-ASCII metadata in Qt help builder.

  • Participants
  • Parent commits c45e790
  • Branches default

Comments (0)

Files changed (2)

 Release 0.6.3 (in development)
+* #232: Support non-ASCII metadata in Qt help builder.
 * Properly format bullet lists nested in definition lists for LaTeX.
 * Section titles are now allowed inside ``only`` directives.

File sphinx/builders/

 import os
 import re
 import cgi
+import codecs
 from os import path
 from docutils import nodes
 # It contains references to compressed help files which should be
 # included in the collection.
 # It may contain various other information for customizing Qt Assistant.
-collection_template = '''\
+collection_template = u'''\
 <?xml version="1.0" encoding="utf-8" ?>
 <QHelpCollectionProject version="1.0">
 # It contains the table of contents, indices and references to the
 # actual documentation files (*.html).
 # In addition it defines a unique namespace for the documentation.
-project_template = '''\
+project_template = u'''\
 <?xml version="1.0" encoding="UTF-8"?>
 <QtHelpProject version="1.0">
     def build_qhcp(self, outdir, outname):'writing collection project file...')
-        f = open(path.join(outdir, outname+'.qhcp'), 'w')
+        f =, outname+'.qhcp'), 'w', 'utf-8')
             f.write(collection_template % {'outname': outname})
         projectfiles = '\n'.join(projectfiles)
         # write the project file
-        f = open(path.join(outdir, outname+'.qhp'), 'w')
+        f =, outname+'.qhp'), 'w', 'utf-8')
             nversion = self.config.version.replace('.', '_')
             nversion = nversion.replace(' ', '_')