]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Correct misleading strftime documentation.
authorDavid Wolever <david@wolever.net>
Sun, 14 Apr 2013 02:40:11 +0000 (22:40 -0400)
committerDavid Wolever <david@wolever.net>
Sun, 14 Apr 2013 02:40:11 +0000 (22:40 -0400)
strftime using locale-aware formatting directives will often, but not awlays,
produce UTF-8-encoded Unicode.

Doc/library/datetime.rst

index a60fa38dc384cefceb42bc0316f17fa17882c7ef..cf41d434c0ee2a1cc6232ce2e0d923873070ef2d 100644 (file)
@@ -1730,8 +1730,10 @@ Notes:
    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