This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients lukasz.langa, serhiy.storchaka, xtreak
Date 2020-08-12.07:23:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1597217010.22.0.730051068722.issue41527@roundup.psfhosted.org>
In-reply-to
Content
Pydoc uses the backslashreplace error handler for characters not encodable with the output encoding (see issue21398 and issue23374).

$ LC_ALL=uk_UA.koi8-u ./python -c "help('async')"
[...]

[2] A string literal appearing as the first statement in the
    function body is transformed into the function\u2019s "__doc__"
    attribute and therefore the function\u2019s *docstring*.

[3] A string literal appearing as the first statement in the class
    body is transformed into the namespace\u2019s "__doc__" item and
    therefore the class\u2019s *docstring*.


It would be better to replace non-ASCII quotation marks and dashes with corresponding ASCII quotation marks and hyphen-minus if they cannot be encoded. It may be a part of more general feature for transliterating non-ASCII characters to ASCII.
History
Date User Action Args
2020-08-12 07:23:30serhiy.storchakasetrecipients: + serhiy.storchaka, lukasz.langa, xtreak
2020-08-12 07:23:30serhiy.storchakasetmessageid: <1597217010.22.0.730051068722.issue41527@roundup.psfhosted.org>
2020-08-12 07:23:30serhiy.storchakalinkissue41527 messages
2020-08-12 07:23:29serhiy.storchakacreate