]> granicus.if.org Git - python/commit
bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174)
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 15 Jan 2018 14:58:02 +0000 (15:58 +0100)
committerGitHub <noreply@github.com>
Mon, 15 Jan 2018 14:58:02 +0000 (15:58 +0100)
commitcb064fc2321ce8673fe365e9ef60445a27657f54
tree06356d6625f022636e22ed5e8646a3f2e36afac4
parent7ed7aead9503102d2ed316175f198104e0cd674c
bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174)

* Add _Py_GetLocaleconvNumeric() function: decode decimal_point and
  thousands_sep fields of localeconv() from the LC_NUMERIC encoding,
  rather than decoding from the LC_CTYPE encoding.
* Modify locale.localeconv() and "n" formatter of str.format() (for
  int, float and complex to use _Py_GetLocaleconvNumeric()
  internally.
Doc/library/locale.rst
Doc/library/stdtypes.rst
Doc/whatsnew/3.7.rst
Include/fileutils.h
Misc/NEWS.d/next/Library/2017-10-30-15-55-32.bpo-31900.-S9xc4.rst [new file with mode: 0644]
Modules/_localemodule.c
Python/fileutils.c
Python/formatter_unicode.c