开发者

Character set on Solaris

I have a simple java program that prints out some special characters

System.out.println("á");
System.out.println("é");开发者_开发百科
System.out.println("í");
System.out.println("ó");
System.out.println("ú");

When I run this code on a windows 7 machine, it prints to the console the correct characters. I now deploy it to a soloris machine and run the code.It looks like this á ú í ó é

I have tried running the jar with the commands java -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8

How can I get the special characters to print out in solaris?


You need a UTF-8 locale installed and configured for your terminal. I'm not as familiar with setting this up on Solaris, however these links might help you get started:

  • Customizing and Creating Solaris Locales
  • How to manually add locale pkgs on Solaris 10
  • en_US.utf-8 locale in Solaris 10
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜