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
This commit is contained in:
Victor Stinner 2012-02-24 00:37:51 +01:00
parent dcb30cf959
commit 41a863cb81
12 changed files with 187 additions and 150 deletions

View file

@ -7,5 +7,5 @@
#undef STRINGLIB_NEW
#undef STRINGLIB_RESIZE
#undef _Py_InsertThousandsGrouping
#undef _Py_InsertThousandsGroupingLocale
#undef STRINGLIB_IS_UNICODE