diff options
author | shimizukawa <shimizukawa@gmail.com> | 2015-12-02 18:22:47 +0900 |
---|---|---|
committer | shimizukawa <shimizukawa@gmail.com> | 2015-12-02 18:22:47 +0900 |
commit | d86ce4c0c27009e2f5f17888ac70a240cfb8f6de (patch) | |
tree | b5ef67ef17a0b7466a43e1095f53a37cd55f8f12 /sphinx/builders/devhelp.py | |
parent | 28db5fb767a5853065ac449ffb8c380c660a1f0c (diff) | |
download | sphinx-git-d86ce4c0c27009e2f5f17888ac70a240cfb8f6de.tar.gz |
Fix #2148: Error while building devhelp target with non-ASCII document.
Diffstat (limited to 'sphinx/builders/devhelp.py')
-rw-r--r-- | sphinx/builders/devhelp.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/builders/devhelp.py b/sphinx/builders/devhelp.py index e6199e621..56e63625e 100644 --- a/sphinx/builders/devhelp.py +++ b/sphinx/builders/devhelp.py @@ -91,7 +91,7 @@ class DevhelpBuilder(StandaloneHTMLBuilder): write_toc(subnode, item) elif isinstance(node, nodes.reference): parent.attrib['link'] = node['refuri'] - parent.attrib['name'] = node.astext().encode('utf-8') + parent.attrib['name'] = node.astext() def istoctree(node): return isinstance(node, addnodes.compact_paragraph) and \ @@ -129,6 +129,6 @@ class DevhelpBuilder(StandaloneHTMLBuilder): # Dump the XML file f = comp_open(path.join(outdir, outname + '.devhelp'), 'w') try: - tree.write(f) + tree.write(f, 'utf-8') finally: f.close() |