Message333308
Since this bug has been reported, locale.localeconv() has been fixed in bpo-31900 to temporarily set LC_CTYPE to LC_NUMERIC to decode numeric fields of localeconv() from the proper encoding. I guess that a similar fix can be applied to locale.nl_langinfo(): set LC_CTYPE to LC_NUMERIC if the parameter is a numeric field.
I only knew locale.nl_langinfo(locale.CODESET). I didn't know that this function accepted other arguments :-)
I even wrote an article about these locale bugs :-)
https://github.com/python/cpython/pull/5191
See also bpo-35697: "decimal: formatter error if LC_NUMERIC uses a different encoding than LC_CTYPE". |
|
Date |
User |
Action |
Args |
2019-01-09 11:53:38 | vstinner | set | recipients:
+ vstinner, lemburg, loewis, barry, r.david.murray, serhiy.storchaka, nnja |
2019-01-09 11:53:37 | vstinner | set | messageid: <1547034817.59.0.967582042804.issue25812@roundup.psfhosted.org> |
2019-01-09 11:53:37 | vstinner | link | issue25812 messages |
2019-01-09 11:53:37 | vstinner | create | |
|