This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients barry, lemburg, loewis, nnja, r.david.murray, serhiy.storchaka, vstinner
Date 2019-01-09.11:53:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547034817.59.0.967582042804.issue25812@roundup.psfhosted.org>
In-reply-to
Content
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".
History
Date User Action Args
2019-01-09 11:53:38vstinnersetrecipients: + vstinner, lemburg, loewis, barry, r.david.murray, serhiy.storchaka, nnja
2019-01-09 11:53:37vstinnersetmessageid: <1547034817.59.0.967582042804.issue25812@roundup.psfhosted.org>
2019-01-09 11:53:37vstinnerlinkissue25812 messages
2019-01-09 11:53:37vstinnercreate