diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2009-02-01 20:51:16 +0100 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2009-02-01 20:51:16 +0100 |
commit | 4f21cce12e4153eafa41ca36411c24be8ee25da7 (patch) | |
tree | 5fee5e4093da976c189611f8acb4c1b8be6eea45 /sphinx/ext/autodoc.py | |
parent | 9f85317530b033978221d9561e538b5e8d960471 (diff) | |
parent | 4e3c3a43fcf35bf110cd35ebe53ee54ac1720ae1 (diff) | |
download | sphinx-git-4f21cce12e4153eafa41ca36411c24be8ee25da7.tar.gz |
Merge
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r-- | sphinx/ext/autodoc.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 79443859f..a817e3433 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -460,7 +460,10 @@ class RstGenerator(object): # add content from attribute documentation if analyzer: - sourcename = '%s:docstring of %s' % (analyzer.srcname, fullname) + # prevent encoding errors when the file name is non-ASCII + srcname = unicode(analyzer.srcname, + sys.getfilesystemencoding(), 'replace') + sourcename = u'%s:docstring of %s' % (srcname, fullname) attr_docs = analyzer.find_attr_docs() if what in ('data', 'attribute'): key = ('.'.join(objpath[:-1]), objpath[-1]) @@ -471,7 +474,7 @@ class RstGenerator(object): fullname, todoc)): self.result.append(indent + line, sourcename, i) else: - sourcename = 'docstring of %s' % fullname + sourcename = u'docstring of %s' % fullname attr_docs = {} # add content from docstrings |