summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next/Library
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-10-17 15:46:59 (GMT)
committerGitHub <noreply@github.com>2024-10-17 15:46:59 (GMT)
commitad3eac1963a5f195ef9b2c1dbb5e44fa3cce4c72 (patch)
treec98cc588f9ad2070be389ad5c181d559b8e74bb2 /Misc/NEWS.d/next/Library
parent0cb20f2e7e867d5c34fc17dd5b8e51e8b0020bb3 (diff)
downloadcpython-ad3eac1963a5f195ef9b2c1dbb5e44fa3cce4c72.zip
cpython-ad3eac1963a5f195ef9b2c1dbb5e44fa3cce4c72.tar.gz
cpython-ad3eac1963a5f195ef9b2c1dbb5e44fa3cce4c72.tar.bz2
gh-52551: Fix encoding issues in strftime() (GH-125193)
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 gh-78662 and gh-124531.
Diffstat (limited to 'Misc/NEWS.d/next/Library')
-rw-r--r--Misc/NEWS.d/next/Library/2024-10-09-17-07-33.gh-issue-52551.PBakSY.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-10-09-17-07-33.gh-issue-52551.PBakSY.rst b/Misc/NEWS.d/next/Library/2024-10-09-17-07-33.gh-issue-52551.PBakSY.rst
new file mode 100644
index 0000000..edc9ac5
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-10-09-17-07-33.gh-issue-52551.PBakSY.rst
@@ -0,0 +1,8 @@
+Fix encoding issues in :func:`time.strftime`, the
+:meth:`~datetime.datetime.strftime` method of the :mod:`datetime` classes
+:class:`~datetime.datetime`, :class:`~datetime.date` and
+:class:`~datetime.time` and formatting of these classes. 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.