由於編碼格式的不同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就可以了)