Ubuntu下Eclipse的中文支持(GBK)

1,增加中文支持

System -> Administration -> Language Support ->

确认Language选项中是否有中文支持,没有的话添加

2,使中文有效(是否必须没有确认)

sudo gedit /var/lib/locales/supported.d/local 

在文件中添加 
zh_CN.GBK GBK 
zh_CN.GB2312 GB2312

3,设置eclipse

Windows -> Preferences -> General -> Workspace

Text file encoding选择Other GBK,如果没有GBK的选项, 直接输入“GBK”,Apply

代码中的中文注释就不是乱码了。

 

posted on 2013-03-23 12:41  大萝卜空心的  阅读(318)  评论(0编辑  收藏  举报