May 2, 2012

Display UTF-8 text in Eclipse 在 Eclipse 中顯示 UTF-8 文字

If you read text file that encoded with UTF8, Eclipse will show some strange text in Console window.
This is because Eclipse process text encode by MS950 but not for UTF-8.

如果在 Eclipse 讀取 UTF8 的文字檔時,會發現在 Console 視窗顯示亂碼。
這是因為 Eclipse 預設以 MS950 處理文字,而非 UTF-8。