Fedora 16 设置 Gedit软件的默认编码


由于编码格式的不同Fedora打开Windows下的文本文件经常会出现乱码,时常是打开文件后发现编码不对,关闭后选择正确的编码再次打开,非常不爽。

方法一:

终端输入命令:

$ gsettings set org.gnome.gedit.preferences.encodings auto-detected "['UTF-8', 'GB18030', 'GB2312', 'GBK', 'BIG5', 'CURRENT', 'UTF-16']"

$ gsettings set org.gnome.gedit.preferences.encodings shown-in-menu "['UTF-8', 'GB18030', 'GB2312', 'GBK', 'BIG5', 'CURRENT', 'UTF-16']"

方法二:

安装dconf-editor(gconf-editor的升级版):

终端中输入命令:$ sudo yum install dconf-tools

终端中输入命令:$ dconf-editor

依次点开->org->gnome->gedit->preferences->encodings

在auto-detected的value项中加入'GB18030', 写在第二位;

在shown-in-menu的value项中加入'GB18030', 写在第二位。

(对应着方法一中括号中的值)

在Fedora 14及之前的版本中在终端中输入命令:$ sudo yum install gconf-editor安装gconf-editor,然后输入命令:$ gconf-editor 依次点开apps->gedit-2->preferences->encodings 中的auto-detected,在双击弹出对话框中加入GB18030,GBK,GB2312就可以了)

相关内容