---
title: "MyEclipse设置编码格式"
author: "superonion"
date: "2012-02-29T14:18:17Z"
tags: ["Myeclipse", "encoding", "编码"]
categories: ["开源软件"]
slug: "myeclipse"
draft: false
lastmod: "2012-02-29T22:27:38Z"
id: 1431808
url: "https://superonion.iteye.com/blog/1431808"
---

在MyEclipse中imort项目后，发现个别类的中文注释全是乱码。想在Window --&gt; Preference --&gt; General --&gt; Editors --&gt; Text Editors --&gt; Spelling 中的 Encoding 里设置，但是没有GBK的选项。发现其实通过Window进入是**全局设置**，如果需要对单个文件进行**局部设置**，可在Package Explorer中右键需要设置的文件，选Properties，Resource下有一个Text file encoding ，可以设置为GBK。