|
Duplicate :
|
A DESCRIPTION OF THE REQUEST :
Please Serbian currency information to the locale data.
Currently when querying the Serbian currency, either by specifying its iso code, RSD, or specifying the country through a Locale object an IllegalArgumentException is thrown.
JUSTIFICATION :
(?) Localized softwares occassionally need to know the currency of a country...
According to http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html#sz the country code of Serbia is RS.
According to http://en.wikipedia.org/wiki/Serbia the currency code of Serbia is RSD.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Currency.getInstance("RSD") and Currency.getInstance(new java.util.Locale("sr", "RS"))
should return a Currency object with the code RSD
ACTUAL -
Currency.getInstance("RSD") throws an IllegalArgumentException
---------- BEGIN SOURCE ----------
import java.util.Currency;
public class eraseme {
public static void main(String[] args) throws Exception {
System.out.println(Currency.getInstance("RSD"));
System.out.println(Currency.getInstance(new java.util.Locale("sr", "RS")));
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
it is not really a workarond, but as I know they prefer EUR if they have to choose something other then the local currency.