我试图打印一些汉字如下,但这不起作用。我想应该进行某种编码。你能帮帮我吗?
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.
}
编辑:如何在打印字符串之前以编程方式进行(更改/应用编码)?