I have a java application that needs to display currency symbols. I'm running on a Linux(Ubuntu) server.
On Linux server LANG=en_GB.UTF-8
The following code tests the problem:
import java.util.Currency;
import java.util.Locale;
import java.text.NumberFormat;
public class SymbolTest
{
public static void main(String[] args)
{
System.out.println("Hardcoded Unicode Currency Symbol for GBP [\u00A3] ");
System.out.println("Currency Symbol for GBP with Locale [" + Currency.getInstance(Locale.UK).getSymbol() + "]");
System.out.println("Currency Symbol for US with Locale [" + Currency.getInstance(Locale.US).getSymbol() + "]");
System.out.println("Currency Symbol for FRANCE with Locale [" + Currency.getInstance(Locale.FRANCE).getSymbol() + "]");
}
}
gives the output:
Hardcoded Unicode Currency Symbol for GBP £
Currency Symbol for GBP with Locale [£]
Currency Symbol for US with Locale [USD]
Currency Symbol for FRANCE with Locale [â¬]
I suspect this is a Locale or Lang problem on the Ubuntu server. What should I install/configure on the linux server to enable the currency symbols to display?