◐ Shell
clean mode source ↗

[3.12] [3.13] gh-52551: Fix encoding issues in strftime() (GH-125193) (GH-125657) by miss-islington · Pull Request #125661 · python/cpython

…5193) (pythonGH-125657)

Fix time.strftime(), the strftime() method and formatting of the
datetime classes datetime, date and time.

* Characters not encodable in the current locale are now acceptable in
  the format string.
* Surrogate pairs and sequence of surrogatescape-encoded bytes are no
  longer recombinated.
* Embedded null character no longer terminates the format string.

This fixes also pythongh-78662 and pythongh-124531.

(cherry picked from commit 08ccbb9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit ad3eac1)

This was referenced

Oct 17, 2024