導入專案出現中文亂碼,90% 情況只需同步 Workspace 與 Project 兩層編碼即可解決。
Window → Preferences → General → Workspace → Text file encoding
選 Other → 輸入 UTF-8 (或 GBK) → Apply and Close
專案右鍵 → Properties → Resource → Text file encoding
選 Other → 輸入相同編碼 → Apply and Close
Project → Clean... → 全選 → Clean
專案中文註釋、字串常量正常顯示,無亂碼。
補充:若仍有個別檔案亂碼,按檔案層級(Properties → Resource)單獨修正;若特定類型(.js/.xml)批量亂碼,用 Content Type 統一設定並點擊 Update。