简体   繁体   中英

Currency Symbol for a given currency code

I'm trying to output all currency symbol (like $ or €) in java for a given currency code. The list of currency codes can be found in http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml and the language is either "pt" or "en".

I tried already many solutions found over the internet, but some print only € other prints the currency code... but I did not found solution to print all the currency symbol in that list.

Someone can help on that?

Thanks

I think you're looking for a list like this: http://www.xe.com/symbols.php

Just read in the list and create a map of columns 1 = key, 3 = value. Most of the currency symbols are single-character, but not all are. That's just a fact of life.

Using the code, you can go between the symbol in this new list and the currency value in the original source you provided.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM