forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-124531: Fix encoding issues in strftime()
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.
- Loading branch information
1 parent
a5716a3
commit f340383
Showing
5 changed files
with
273 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
Misc/NEWS.d/next/Library/2024-10-09-17-07-33.gh-issue-52551.PBakSY.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
Oops, something went wrong.