]> granicus.if.org Git - python/commit
[3.6] bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) (#5192)
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 15 Jan 2018 22:23:47 +0000 (23:23 +0100)
committerGitHub <noreply@github.com>
Mon, 15 Jan 2018 22:23:47 +0000 (23:23 +0100)
commit5f959c4f9eca404b8bc4bc6348fed27c4b907b89
tree29b215542b7705687eb5644a0640896e587646b7
parentfb8569e36f2629654d5bc9c7ba05978edce408f4
[3.6] bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) (#5192)

* 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.

(cherry picked from commit cb064fc2321ce8673fe365e9ef60445a27657f54)
Doc/library/locale.rst
Doc/library/stdtypes.rst
Doc/whatsnew/3.6.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