The currency symbol is not always a symbol. How to ensure that it is always a symbol and not a 2 char string?
Example:
import locale
locale.setlocale(locale.LC_ALL, 'de_DE')
conv=locale.localeconv()
print('Currency code:', conv['int_curr_symbol'])
print('Currency symbol:', conv['currency_symbol'])
On some systems the result for currency symbol is "€" on others it is "Eu"
I did find a way to, at least so far, get a consistent currency symbol on all systems with the help of "forex_python" package.
Example:
from forex_python.converter import CurrencyCodes
print('Currency symbols')
c = CurrencyCodes()
print('GBP:', c.get_symbol('GBP'))
print('EUR:',c.get_symbol('EUR'))
print('THB:',c.get_symbol('THB'))
print('USD', c.get_symbol('USD'))