Ubuntu gedit 中文乱码解决方法
2013-04-01 19:42
363 查看
有些在Windows下能够打开的txt文件在Ubuntu下用gedit打开时,中文显示是乱码,这是因为编码方式不同造成的。Windows下默认txt文件的编码方式是GBK,而Ubuntu下的gedit默认没有对GBK的支持。解决方法如下:
在终端运行gconf-editor,(如果没有安装用“sudo apt-get install dconf-tools”安装。)
在apps -> gedit-2 -> preference -> encodings里面有个auto-detect,在它的前面加上
GBK或GB18030就OK了。
PS:使用的时候,我的preference的目录下面就是没有encodings的选项,因此改用一下方案:
打开终端输入:
gsettings set org.gnome.gedit.preferences.encodings auto-detected "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"
gsettings set org.gnome.gedit.preferences.encodings shown-in-menu "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"
此时,重新打开gedit文件,没有中文乱码。
在终端运行gconf-editor,(如果没有安装用“sudo apt-get install dconf-tools”安装。)
在apps -> gedit-2 -> preference -> encodings里面有个auto-detect,在它的前面加上
GBK或GB18030就OK了。
PS:使用的时候,我的preference的目录下面就是没有encodings的选项,因此改用一下方案:
打开终端输入:
gsettings set org.gnome.gedit.preferences.encodings auto-detected "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"
gsettings set org.gnome.gedit.preferences.encodings shown-in-menu "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"
此时,重新打开gedit文件,没有中文乱码。
相关文章推荐
- Ubuntu gedit 中文乱码解决方法
- Ubuntu gedit 中文乱码解决方法
- ubuntu文本编辑器gedit中文乱码的解决方法
- ubuntu gedit 中文显示乱码解决方法
- 【转载】Ubuntu系统Gedit中文乱码解决方法
- ubuntu下gedit中文乱码解决方法
- ubuntu gedit 中文显示乱码解决方法
- 【解决方法】Ubuntu文本编辑器gedit打开中文出现乱码的
- 【解决方法】Ubuntu文本编辑器gedit打开中文出现乱码的
- 【解决方法】Ubuntu文本编辑器gedit打开中文出现乱码的
- ubuntu14.04中 gedit 凝视能显示中文,而source insight中显示为乱码的解决的方法
- 终端输入ubuntu gedit 中文显示乱码解决方法
- Ubuntu gedit中文出现乱码解决方法
- 【解决方法】Ubuntu文本编辑器gedit打开中文出现乱码的
- ubuntu 12.04 中gedit打开txt等文件中文乱码的解决方法
- 我学ubuntu - gedit中文乱码的解决方法
- Ubuntu下pdf、gedit、vim 中文无法读取或者显示乱码的解决方法
- ubuntu中vim和gedit中文乱码解决方法
- Ubuntu下pdf、gedit、vim 中文无法读取或者显示乱码的解决方法
- ubuntu 10.04 vi 与 gedit 打开文件显示中文乱码的解决方法