Akira Kitada added the comment: I tried pydoc_2.7.patch with the following test file and found source_synopsis returns \x escaped string instead of \u escaped one.
# -*- coding: utf-8 -*- u"""ツ""" class Spam(object): u"""ツ""" >>> import utf8 >>> utf8.__doc__ u'\u30c4' >>> print(utf8.__doc__) ツ >>> import pydoc >>> pydoc.source_synopsis(file('utf8.py')) u'\xe3\x83\x84' >>> print pydoc.source_synopsis(file('utf8.py')) ã >>> print pydoc.source_synopsis(file('utf8.py')).encode('latin-1') ツ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1185124> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com