Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency symbol assumption is wrong #149

Closed
keilw opened this issue Feb 8, 2017 · 2 comments
Closed

Currency symbol assumption is wrong #149

keilw opened this issue Feb 8, 2017 · 2 comments
Milestone

Comments

@keilw
Copy link
Member

keilw commented Feb 8, 2017

As reported in http://stackoverflow.com/questions/40244526/jsr-354-monetaryamountformat-not-working-two-way-for-other-currency-symbols-than?rq=1
the assumption of "$" has to be "USD" in
https://github.com/JavaMoney/jsr354-ri/blob/master/moneta-core/src/main/java/org/javamoney/moneta/internal/format/CurrencyToken.java
is wrong and a bug.
There are at least 3 other countries (Australia, Canada, New Zealand) using the exact same "$" symbol for totally different currencies like "AUD", etc. Not to mention other cases like "HK$" which you may also find abbreviated. see https://coderanch.com/t/463940/java/show-countries-currency-symbols

@keilw
Copy link
Member Author

keilw commented Jul 7, 2017

Actually this is very much a showstopper, too. As getting the wrong currency (e.g. USD instead of CAD) is worse than getting none at all.

atsticks added a commit to JavaMoney/jsr354-ri-bp that referenced this issue Jul 30, 2017
…l throw an exception, since the symbol is not unique. Pass the ISO currency code instead of.
atsticks added a commit that referenced this issue Jul 30, 2017
…n, since the symbol is not unique. Pass the ISO currency code instead of.
@atsticks
Copy link
Member

Will throw an exception, fixed in both RI and RI-BP.

@atsticks atsticks added the done label Apr 3, 2018
@atsticks atsticks added this to the 1.2 milestone Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants