]> granicus.if.org Git - python/commit
Issue #13706: Fix format(int, "n") for locale with non-ASCII thousands separator
authorVictor Stinner <victor.stinner@haypocalc.com>
Thu, 23 Feb 2012 23:37:51 +0000 (00:37 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Thu, 23 Feb 2012 23:37:51 +0000 (00:37 +0100)
commit41a863cb81608c779d60b49e7be8a115816734fc
treeb59ae94894190d8863ffd2081122db4fe819e003
parentdcb30cf959902fdc3da027c13a99e091d116c273
Issue #13706: Fix format(int, "n") for locale with non-ASCII thousands separator

 * Decode thousands separator and decimal point using PyUnicode_DecodeLocale()
   (from the locale encoding), instead of decoding them implicitly from latin1
 * Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used
 * Change _PyUnicode_InsertThousandsGrouping() API to return the maximum
   character if unicode is NULL
 * Replace MIN/MAX macros by Py_MIN/Py_MAX
 * stringlib/undef.h undefines STRINGLIB_IS_UNICODE
 * stringlib/localeutil.h only supports Unicode
12 files changed:
Include/unicodeobject.h
Lib/test/test_format.py
Objects/stringlib/asciilib.h
Objects/stringlib/localeutil.h
Objects/stringlib/stringdefs.h
Objects/stringlib/ucs1lib.h
Objects/stringlib/ucs2lib.h
Objects/stringlib/ucs4lib.h
Objects/stringlib/undef.h
Objects/stringlib/unicodedefs.h
Objects/unicodeobject.c
Python/formatter_unicode.c