[New-bugs-announce] [issue42156] Currency not correct for all locales

Stefan Völkl report at bugs.python.org
Mon Oct 26 09:33:05 EDT 2020


New submission from Stefan Völkl <stefan.voelkl at fotozupple.de>:

I found that the currency formatting does not work correctly for all locales. For example:

{{{
import locale

amount = 24.99
locale.setlocale(locale.LC_ALL, 'it_IT.UTF-8')

price = locale.currency(amount)

print(price)
}}}

returns "€ 24,99".
It should return "24,99 €", just like noted at http://publications.europa.eu/code/it/it-370303.htm
under "Posizione del simbolo (€) negli importi in cifre".

----------
components: Library (Lib)
messages: 379662
nosy: GiftZwergrapper, lemburg
priority: normal
severity: normal
status: open
title: Currency not correct for all locales
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42156>
_______________________________________


More information about the New-bugs-announce mailing list