[issue10083] locale.currency() uses different formatting than system locale for negative values
New submission from Bram Mariën bram.mar...@gmail.com: On Windows Vista and Windows 7 (XP and Ubuntu seem ok): If the system locale is used (using locale.setlocale(LC_ALL, '') and the system locale is set to dutch belgium: If the regional options are set to format negative monetary items as EURO sign -value, than locale.currency(value) will format it as EURO sign)value-. Other formatting options works ok: e.g. if the regional settings display negative monetary items as (value), than locale.currency(value) will also display {value). Reproducable on Python 2.6.x, 2.7.x and 3.1.2 on Windows Vista (32 bit) -- components: Windows files: locale_currency_negative.JPG messages: 118509 nosy: bram.marien priority: normal severity: normal status: open title: locale.currency() uses different formatting than system locale for negative values type: behavior versions: Python 2.6, Python 2.7, Python 3.1 Added file: http://bugs.python.org/file19213/locale_currency_negative.JPG ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10083] locale.currency() uses different formatting than system locale for negative values
Eric Smith e...@trueblade.com added the comment: I don't have a copy of Vista or 7 handy to check with. Could you tell me what locale.localeconv() returns on a non-working system and on a working system (preferably Windows XP)? -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10083] locale.currency() uses different formatting than system locale for negative values
Changes by Eric Smith e...@trueblade.com: -- components: +Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10083] locale.currency() uses different formatting than system locale for negative values
Bram Mariën bram.mar...@gmail.com added the comment: * On Windows Vista (non working system): locale.localeconv() {'mon_decimal_point': ',', 'int_frac_digits': 2, 'p_sep_by_space': 1, 'frac_digits': 2, 'thousands_sep': '.', 'n_sign_posn': 4, 'decimal_point': ',', 'int_curr_symbol': 'EUR', 'n_cs_precedes': 1, 'p_sign_posn': 4, 'mon_thousands_sep': '.', 'negative_sign': '-', 'currency_symbol': '\x80', 'n_sep_by_space': 1, 'mon_grouping': [3, 0], 'p_cs_precedes': 1, 'positive_sign': '', 'grouping': [3, 0]} * On Windows XP (Working system): {'mon_decimal_point': ',', 'int_frac_digits': 2, 'p_sep_by_space': 1, 'frac_digits': 2, 'thousands_sep': '.', 'n_sign_posn': 1, 'decimal_point': ',', 'int_curr_symbol': 'EUR', 'n_cs_precedes': 0, 'p_sign_posn': 1, 'mon_thousands_sep': '.', 'negative_sign': '-', 'currency_symbol': '\x80', 'n_sep_by_space': 1, 'mon_grouping': [3, 0], 'p_cs_precedes': 0, 'positive_sign': '', 'grouping': [3, 0]} The locale is set to 'Dutch_Belgium.1252' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10083] locale.currency() uses different formatting than system locale for negative values
Eric Smith e...@trueblade.com added the comment: So it looks like locale.currency() is doing the right thing, given the values returned by locale.localeconv(). These values are copied from C's localeconv(), so the problem must be there. I don't see how we can do anything about it on the Python side, unfortunately. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10083] locale.currency() uses different formatting than system locale for negative values
Changes by Eric Smith e...@trueblade.com: -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com