STINNER Victor <[email protected]> added the comment:
Example of the bug:
import locale
# LC_CTYPE: latin1 encoding
locale.setlocale(locale.LC_ALL, "en_GB")
# LC_MONETARY: utf8 encoding
locale.setlocale(locale.LC_MONETARY, "ar_SA.UTF-8")
lc = locale.localeconv()
for attr in (
"mon_grouping",
"int_curr_symbol",
"currency_symbol",
"mon_decimal_point",
"mon_thousands_sep",
):
print(f"{attr}: {lc[attr]!a}")
Python 3.7 output:
mon_grouping: []
int_curr_symbol: 'SAR '
currency_symbol: '\xd8\xb1.\xd8\xb3'
mon_decimal_point: '.'
mon_thousands_sep: ''
Expected output:
mon_grouping: []
int_curr_symbol: 'SAR '
currency_symbol: '\u0631.\u0633'
mon_decimal_point: '.'
mon_thousands_sep: ''
Tested on Fedora 29.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue28604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com