New submission from Guillaume Pasquet (Etenil): This issue was originally reported on Fedora's Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1391280
Description of problem: After switching the monetary locale to en_GB, python then raises an exception when calling locale.localeconv() Version-Release number of selected component (if applicable): 3.5.2-4.fc25 How reproducible: Every time Steps to Reproduce: 1. Write a python3 script or open the interactive interpreter with "python3" 2. Enter the following import locale locale.setlocale(locale.LC_MONETARY, 'en_GB') locale.localeconv() 3. Observe that python raises an encoding exception Actual results: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.5/locale.py", line 110, in localeconv d = _localeconv() UnicodeDecodeError: 'locale' codec can't decode byte 0xa3 in position 0: Invalid or incomplete multibyte or wide character Expected results: A dictionary of locale data similar to (for en_US): {'mon_thousands_sep': ',', 'currency_symbol': '$', 'negative_sign': '-', 'p_sep_by_space': 0, 'frac_digits': 2, 'int_frac_digits': 2, 'decimal_point': '.', 'mon_decimal_point': '.', 'positive_sign': '', 'p_cs_precedes': 1, 'p_sign_posn': 1, 'mon_grouping': [3, 3, 0], 'n_cs_precedes': 1, 'n_sign_posn': 1, 'grouping': [3, 3, 0], 'thousands_sep': ',', 'int_curr_symbol': 'USD ', 'n_sep_by_space': 0} Note: This was reproduced on Linux Mint 18 (python 3.5.2), and also on Fedora with python 3.4 and python 3.6 (compiled). ---------- components: Interpreter Core messages: 280023 nosy: Guillaume Pasquet (Etenil) priority: normal severity: normal status: open title: Exception raised by python3.5 when using en_GB locale type: behavior versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28604> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com