我试图打印如下的一些中文字符,但这不起作用。我想应该有一些编码需要完成。你能帮忙吗?如何确定正确的编码?
public static void main(String[] args)
{
String myString = "奥妙洗衣粉";
System.out.println(myString);
// Output in eclipse: Some characters cannot be mapped using Cp1252 character encoding.
// Either change the encoding or remove the characters which are not supported
// by the Cp1252 character encoding.
}
编辑:我怎样才能做到这一点(变化/应用编码)打印字符串之前编程?
检查Eclipse首选项工作区编码。 – dkateros 2013-03-08 09:18:45