本文共 795 字,大约阅读时间需要 2 分钟。
由于编码格式的不同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', 写在第二位。 (对应着方法一中括号中的值) (在fedora14及之前的版本中在终端中输入命令:$ sudo yum install gconf-editor安装gconf-editor,然后输入命令:$ gconf-editor 依次点开apps->gedit-2->preferences->encodings 中的auto-detected,在双击弹出对话框中加入GB18030,GBK,GB2312就可以了) 转载地址:http://xvqab.baihongyu.com/