Ubuntu eclipse乱码
来源:互联网 发布:炒股软件使用详解 编辑:程序博客网 时间:2024/06/05 23:41
把Windows下的工程导入到了Linux下Eclipse中,由于以前的工程代码,都是GBK编码的(Windows下的Eclipse 默认会去读取系统的编码,所以Widnwos下的Eclipse的编码为GBK),而Ubuntu默认是不支持GBK编码的。所以,首先我们要先让 Ubuntu支持GBK,方法如下:
- 首先要修改/var/lib/locales/supported.d这个文件夹的权限,否则不能修改该文件夹下的local文件,使用如下命令 sudo chmod -R 777 /var/lib/locales/supported.d
- 修改/var/lib/locales/supported.d/local文件,在文件中添加zh_CN.GBK GBKzh_CN.GB2312 GB2312
- sudo dpkg-reconfigure --force locales然后在输出的结果中会出现zh_CN.GB2312 donezh_CN.GBK done如下所示:
这样, Ubuntu就支持GBK编码了, 下面开始设置eclipse,
首先选择eclipse菜单栏中的Windows->Preferences, 然后选择General下面的Workspace, Text file encoding下选择Other GBK,如果没有GBK的选项, 没关系, 直接输入GBK三个字母, Apply, GBK编码的中文, 已经不是乱码了。
下面送上Ubuntu操作过程中的一些截图:
0 0
- Ubuntu Eclipse 中文乱码
- Ubuntu Eclipse 中文乱码
- ubuntu eclipse 乱码
- Eclipse 工程 ubuntu 乱码
- ubuntu eclipse 中文乱码
- Ubuntu下Eclipse乱码
- ubuntu Eclipse 中文乱码
- ubuntu - eclipse 乱码
- Ubuntu eclipse乱码
- Ubuntu Eclipse 输入 乱码 解决
- Ubuntu下Eclipse乱码问题。
- Ubuntu中Eclipse中文乱码
- ubuntu中eclipse中文乱码问题
- Ubuntu下Eclipse存在中文乱码
- Ubuntu下Eclipse存在中文乱码
- Ubuntu下Eclipse中文乱码解决
- ubuntu eclipse中英文斜体乱码问题解决
- Ubuntu下Eclipse中文乱码解决
- Linux远程ssh脚本执行命令问题
- 给Fragment设置Style
- HDU 3853 LOOPS [简单概率DP]
- UIImageJPEGRepresentation和UIImagePNGRepresentation
- 文章标题
- Ubuntu eclipse乱码
- Linux and the Device Tree
- pageadmin企业建站系统为中小企业轻松搭建企业网站
- 自定义圆角ImageView方案1,去锯齿
- 初识Linux服务器。
- Android draw canvas save restore saveLayer 学习
- 学习HanNLP2015年12月4日 16:24:53
- iOS开发——warning: directory not found for option ' '
- POJ 1036 Gangsters