Skip to content

Commit 1cffd0e

Browse files
Alexey Izbyshevtaleinat
authored andcommitted
bpo-34512: Document platform-specific strftime() behavior for non-ASCII format strings (GH-8948)
1 parent d586ccb commit 1cffd0e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Doc/library/datetime.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,6 +2034,12 @@ calls the platform C library's :func:`strftime` function, and platform
20342034
variations are common. To see the full set of format codes supported on your
20352035
platform, consult the :manpage:`strftime(3)` documentation.
20362036

2037+
For the same reason, handling of format strings containing Unicode code points
2038+
that can't be represented in the charset of the current locale is also
2039+
platform-dependent. On some platforms such code points are preserved intact in
2040+
the output, while on others ``strftime`` may raise :exc:`UnicodeError` or return
2041+
an empty string instead.
2042+
20372043
The following is a list of all the format codes that the C standard (1989
20382044
version) requires, and these work on all platforms with a standard C
20392045
implementation. Note that the 1999 version of the C standard added additional

0 commit comments

Comments
 (0)