[Python-checkins] cpython (2.7): Correct misleading strftime documentation.

david.wolever python-checkins at python.org
Mon Aug 12 21:51:25 CEST 2013


http://hg.python.org/cpython/rev/53a0e908f787
changeset:   85135:53a0e908f787
branch:      2.7
user:        David Wolever <david at wolever.net>
date:        Sat Apr 13 22:40:11 2013 -0400
summary:
  Correct misleading strftime documentation.

strftime using locale-aware formatting directives will often, but not awlays,
produce UTF-8-encoded Unicode.

files:
  Doc/library/datetime.rst |  6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)


diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -1730,8 +1730,10 @@
    Because the format depends on the current locale, care should be taken when
    making assumptions about the output value. Field orderings will vary (for
    example, "month/day/year" versus "day/month/year"), and the output may
-   contain UTF-8 encoded unicode characters (for example, the ``ja_JP`` locale
-   may include Japanese characters).
+   contain Unicode characters (encoded, by default, using UTF-8, but this may
+   vary based on the locale; for example, the ``ja_JP`` locale contains UTF-8
+   encoded Japanese characters, but ``ja_JP.SJIS`` contains Shift JIS encoded
+   Japanese characters).
 
 (2)
    When used with the :meth:`strptime` method, the ``%p`` directive only affects

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list