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 kadler
Recipients kadler, methane
Date 2020-10-07.16:57:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602089837.67.0.328545635057.issue41894@roundup.psfhosted.org>
In-reply-to
Content
Glad you were able to reproduce on Linux.

I have since changed the PR to use PyUnicode_DecodeFSDefault based on review feedback. I was going to say that you will have to fight it out with @methane on GH, but I see that that's you. :D Would have been nice if you would have left the updated feedback there as well so people who aren't familiar would know it's one person adjusting their recommendation vs two different people with conflicting recommendations.


The only issue I see with using backslashreplace is that users of non-UTF-8 locales would see message text that contains non-ASCII characters only as escape codes. eg, the message above would show "Il modulo dipendente libbz2.so non \xe8 stato caricato." instead of "Il modulo dipendente libbz2.so non è stato caricato." By using PyUnicode_DecodeFSDefault instead, the message should be properly decoded but any encoding errors (such as utf-8 paths, etc) would be handled by surrogateescape.

I guess the question comes to: what's more important to be decoded, the message text or the path?
History
Date User Action Args
2020-10-07 16:57:17kadlersetrecipients: + kadler, methane
2020-10-07 16:57:17kadlersetmessageid: <1602089837.67.0.328545635057.issue41894@roundup.psfhosted.org>
2020-10-07 16:57:17kadlerlinkissue41894 messages
2020-10-07 16:57:17kadlercreate