Author vstinner
Recipients Guillaume Pasquet (Etenil), cstratak, lemburg, loewis, schwab, serhiy.storchaka, vstinner, xtreak
Date 2018-11-20.12:27:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542716876.35.0.788709270274.issue28604@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-11-20 12:27:56vstinnersetrecipients: + vstinner, lemburg, loewis, serhiy.storchaka, schwab, cstratak, Guillaume Pasquet (Etenil), xtreak
2018-11-20 12:27:56vstinnersetmessageid: <1542716876.35.0.788709270274.issue28604@psf.upfronthosting.co.za>
2018-11-20 12:27:56vstinnerlinkissue28604 messages
2018-11-20 12:27:56vstinnercreate