我試圖打印如下的一些中文字符,但這不起作用。我想應該有一些編碼需要完成。你能幫忙嗎?如何確定正確的編碼?
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