]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Add PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale()
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 16 Dec 2011 22:56:01 +0000 (23:56 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 16 Dec 2011 22:56:01 +0000 (23:56 +0100)
commitaf02e1c85a66009cdc645a64de7d7ee1335c8301
tree5bc78c3a8628589cf5a4c246afc0076871d51c62
parent3607e3de278c89660f773064a94385066eebda1b
Add PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale()

 * PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale() decode a string
   from the current locale encoding
 * _Py_char2wchar() writes an "error code" in the size argument to indicate
   if the function failed because of memory allocation failure or because of a
   decoding error. The function doesn't write the error message directly to
   stderr.
 * Fix time.strftime() (if wcsftime() is missing): decode strftime() result
   from the current locale encoding, not from the filesystem encoding.
Doc/c-api/unicode.rst
Include/unicodeobject.h
Modules/_localemodule.c
Modules/main.c
Modules/timemodule.c
Objects/unicodeobject.c
Python/fileutils.c