]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Clarify that strftime's encoding is based on locale
authorDavid Wolever <david@wolever.net>
Thu, 23 May 2013 21:42:14 +0000 (17:42 -0400)
committerDavid Wolever <david@wolever.net>
Thu, 23 May 2013 21:42:14 +0000 (17:42 -0400)
Doc/library/datetime.rst

index ad1e0474ec11a8d7020d1bb4d7587d1c4d008e37..e33f3f06ba1976c2917bbba37ddbebde082722d5 100644 (file)
@@ -1718,10 +1718,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 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).
+   contain Unicode characters encoded using the locale's default encoding (for
+   example, if the current locale is ``js_JP``, the default encoding could be
+   any one of ``eucJP``, ``SJIS``, or ``utf-8``; use :meth:`locale.getlocale`
+   to determine the current locale's encoding).
 
 (2)
    When used with the :meth:`strptime` method, the ``%p`` directive only affects