summaryrefslogtreecommitdiff
path: root/sphinx/builders/changes.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-12-28 23:39:26 +0100
committerGeorg Brandl <georg@python.org>2008-12-28 23:39:26 +0100
commitce52e9072e6a9e42530d8b3b0fa79d58c0846826 (patch)
tree1a10151ca466c8a4447931251c85946b7e8a123c /sphinx/builders/changes.py
parent3e988f49174709be30e113bc7c867b165b337b12 (diff)
downloadsphinx-git-ce52e9072e6a9e42530d8b3b0fa79d58c0846826.tar.gz
Some fixes and changelog entry after switch to Jinja2.
Diffstat (limited to 'sphinx/builders/changes.py')
-rw-r--r--sphinx/builders/changes.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/builders/changes.py b/sphinx/builders/changes.py
index 8665b6e77..047b01550 100644
--- a/sphinx/builders/changes.py
+++ b/sphinx/builders/changes.py
@@ -87,12 +87,12 @@ class ChangesBuilder(Builder):
'otherchanges': sorted(otherchanges.iteritems()),
'show_sphinx': self.config.html_show_sphinx,
}
- f = open(path.join(self.outdir, 'index.html'), 'w')
+ f = codecs.open(path.join(self.outdir, 'index.html'), 'w', 'utf8')
try:
f.write(self.templates.render('changes/frameset.html', ctx))
finally:
f.close()
- f = open(path.join(self.outdir, 'changes.html'), 'w')
+ f = codecs.open(path.join(self.outdir, 'changes.html'), 'w', 'utf8')
try:
f.write(self.templates.render('changes/versionchanges.html', ctx))
finally:
@@ -112,11 +112,11 @@ class ChangesBuilder(Builder):
self.info(bold('copying source files...'))
for docname in self.env.all_docs:
- f = open(self.env.doc2path(docname))
+ f = codecs.open(self.env.doc2path(docname), 'r', 'latin1')
lines = f.readlines()
targetfn = path.join(self.outdir, 'rst', os_path(docname)) + '.html'
ensuredir(path.dirname(targetfn))
- f = codecs.open(targetfn, 'w', 'utf8')
+ f = codecs.open(targetfn, 'w', 'latin1')
try:
text = ''.join(hl(i+1, line) for (i, line) in enumerate(lines))
ctx = {'filename': self.env.doc2path(docname, None), 'text': text}