◐ Shell
clean mode source ↗

bpo-34481: Fix surrogate-handling in strftime by pganssle · Pull Request #8983 · python/cpython

and others added 6 commits

August 23, 2018 20:46
…gs in datetime classes

A follow-up of bpo-34454.
Now that the bug is fixed, the try/catch can be removed.
This is now also a more complete fix for bpo-6697.
This will cut down on some of the per-environment variability of this
function.
This passes a backslash-escaped unicode string to strftime in the event
that locale encoding fails. To ensure that the relevant string is
round-trippable, all backslashes in the original string are
double-escaped, and then unescaped when the result is decoded.

@izbyshev izbyshev mannequin mentioned this pull request

Apr 10, 2022