summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-01-12 09:28:06 -0800
committerGitHub <noreply@github.com>2019-01-12 09:28:06 -0800
commit77b80c956f39df34722bd8646cf5b83d149832c4 (patch)
tree167078f5bc84ca5310e2f5f1f782f6495089e302
parent555755ecff2669f4e020147d7d3a0aec71abb679 (diff)
downloadcpython-git-77b80c956f39df34722bd8646cf5b83d149832c4.tar.gz
bpo-34512: Document platform-specific strftime() behavior for non-ASCII format strings (GH-8948)
(cherry picked from commit 1cffd0eed313011c0c2bb071c8affeb4a7ed05c7) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
-rw-r--r--Doc/library/datetime.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index 1e575d5d57..2d164b201a 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -1611,6 +1611,12 @@ calls the platform C library's :func:`strftime` function, and platform
variations are common. To see the full set of format codes supported on your
platform, consult the :manpage:`strftime(3)` documentation.
+For the same reason, handling of format strings containing Unicode code points
+that can't be represented in the charset of the current locale is also
+platform-dependent. On some platforms such code points are preserved intact in
+the output, while on others ``strftime`` may raise :exc:`UnicodeError` or return
+an empty string instead.
+
The following is a list of all the format codes that the C standard (1989
version) requires, and these work on all platforms with a standard C
implementation. Note that the 1999 version of the C standard added additional