A few days ago I did an exercise to format currencies and I used the following code for this:
String us, china, france;
us = NumberFormat.getCurrencyInstance(Locale.US).format(payment);
china = NumberFormat.getCurrencyInstance(Locale.CHINA).format(payment);
france = NumberFormat.getCurrencyInstance(Locale.FRANCE).format(payment);
At the command prompt should look something like this:
US: $12,324.13
China: ¥12,324.13
France: 12 324,13 €
But something went like this:
US: $12,324.13
China: ?12,324.13
France: 12▒324,13 ▒
I know the code is correct because it worked, but it does not display correctly. How do I make sure that whenever I need to run special characters through the CMD they display correctly?