我需要打印一些应该是unicode的特殊字符。代码如下
public class Greek {
public static void main (String [] args){
System.out.println("\u0391\t\u03B1\t" + "alpha\t" + "a\t" + "\"father\"");
System.out.println("\u0392\t\u03B2\t" + "beta\t" + "b");
System.out.println("\u0393\t\u03B3\t" + "gamma\t" + "g");
System.out.println("\u0394\t\u03B4\t" + "delta\t" + "d");
System.out.println("\u0395\t\u03B5\t" + "epsilon\t" + "e\t" + "\"end\"");
System.out.println("\u0396\t\u03B6\t" + "z\u00EAta\t" + "z");
System.out.println("\u0397\t\u03B7\t" + "\u00EAta\t" + "\u00EA\t" + "\"hey\"");
System.out.println("\u0398\t\u03B8\t" + "th\u00EAta\t" + "th\t" + "\"thick\"");
System.out.println("\u0399\t\u03B9\t" + "iota\t" + "i\t" + "\"it\"");
System.out.println("\u039A\t\u03BA\t" + "kappa\t" + "k");
System.out.println("\u039B\t\u03BB\t" + "lamda\t" + "l");
System.out.println("\u039C\t\u03BC\t" + "mu\t" + "m");
System.out.println("\u039D\t\u03BD\t" + "nu\t" + "n");
System.out.println("\u039E\t\u03BE\t" + "xi\t" + "ks\t" + "\"box\"");
System.out.println("\u039F\t\u03BF\t" + "omikron\t" + "o\t" + "\"off\"");
System.out.println("\u03A0\t\u03C0\t" + "pi\t" + "p");
System.out.println("\u03A1\t\u03C1\t" + "rho\t" + "r");
System.out.println("\u03A3\t\u03C3,\u03C2\t" + "sigma\t" + "s\t" + "\"say\"");
System.out.println("\u03A4\t\u03C4\t" + "tau\t" + "t");
System.out.println("\u03A5\t\u03C5\t" + "upsilon\t" + "u\t" + "\"put\"");
System.out.println("\u03A6\t\u03C6\t" + "phi\t" + "f");
System.out.println("\u03A7\t\u03C7\t" + "chi\t" + "ch\t" + "\"Bach\"");
System.out.println("\u03A8\t\u03C8\t" + "psi\t" + "ps");
System.out.println("\u03A9\t\u03C9\t" + "omega\t" + "\u00F4\t" + "\"grow\"");
}
}
我的问题是,我是否需要在计算机上安装语言包,因为我不确定在下载和安装时eclipse会包含语言包吗?
感谢
答案 0 :(得分:3)
你为什么不试试?但据我所知,你不需要。它会正确打印它们(因为它支持utf-8编码)