diff --git a/CHANGES b/CHANGES index bebbd818c..42e3b77e8 100644 --- a/CHANGES +++ b/CHANGES @@ -69,6 +69,8 @@ Bugs fixed * Fix the handling of explicit module names given to autoclass directives. They now show up with the correct module name in the generated docs. +* Enable autodoc to process Unicode docstrings. + Release 0.3 (May 6, 2008) ========================= diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 36d6a32ca..b68285846 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -218,7 +218,7 @@ def generate_rst(what, name, members, inherited, undoc, add_content, document, module = getattr(todoc, '__module__', None) if module is not None: charset = get_module_charset(module) - docstrings = [docstring.decode(charset) for docstring in docstrings] + docstrings = [isinstance(d, str) and d.decode(charset) or d for d in docstrings] # add docstring content for docstring in docstrings: