-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b118
-
generic
-
generic
-
Verified
When I kick following code with specifying user.language.display and
user.language.format, the output currency becomes "XXX".
public class decimalFormatTest {
public static void main(String[] args) {
DecimalFormat decif = new DecimalFormat();
System.out.println(decif.getCurrency());
}
}
% java -Duser.language.format=ja -Duser.language.display=fr decimalFormatTest
Currency = XXX
Then, if specify the user.country.format, output become correct one
% java -Duser.language.format=ja -Duser.language.display=fr -Duser.country.format=FR decimalFormatTest
Currency = EUR
But will not be correct when specify user.country.display only.
% java -Duser.language.format=ja -Duser.language.display=fr -Duser.country.display=FR decimalFormatTest
Currency = XXX
Then, if specifying user.language.display and user.country.display, seems that OS default is used.
% java -Duser.language.display=fr -Duser.country.display=FR decimalFormatTest
Currency = JPY
Also, NumberFormat.getCurrencyInstance() will work the same way as DecimalFormat.getCurrency().
user.language.format, the output currency becomes "XXX".
public class decimalFormatTest {
public static void main(String[] args) {
DecimalFormat decif = new DecimalFormat();
System.out.println(decif.getCurrency());
}
}
% java -Duser.language.format=ja -Duser.language.display=fr decimalFormatTest
Currency = XXX
Then, if specify the user.country.format, output become correct one
% java -Duser.language.format=ja -Duser.language.display=fr -Duser.country.format=FR decimalFormatTest
Currency = EUR
But will not be correct when specify user.country.display only.
% java -Duser.language.format=ja -Duser.language.display=fr -Duser.country.display=FR decimalFormatTest
Currency = XXX
Then, if specifying user.language.display and user.country.display, seems that OS default is used.
% java -Duser.language.display=fr -Duser.country.display=FR decimalFormatTest
Currency = JPY
Also, NumberFormat.getCurrencyInstance() will work the same way as DecimalFormat.getCurrency().
- relates to
-
JDK-6989111 Incorrect default locale for New Zealand
-
- Closed
-