Message280023
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). |
|
Date |
User |
Action |
Args |
2016-11-03 21:26:34 | Guillaume Pasquet (Etenil) | set | recipients:
+ Guillaume Pasquet (Etenil) |
2016-11-03 21:26:34 | Guillaume Pasquet (Etenil) | set | messageid: <1478208394.68.0.721396484587.issue28604@psf.upfronthosting.co.za> |
2016-11-03 21:26:34 | Guillaume Pasquet (Etenil) | link | issue28604 messages |
2016-11-03 21:26:34 | Guillaume Pasquet (Etenil) | create | |
|