What you need to do is to declare the encodings using gsettings, and the order you'd like. Here's mine:
gsettings set org.gnome.gedit.preferences.encodings auto-detected "['UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16']"
大概意思就是,gedit会为每个文件保存编码方式,下次打开时会再次使用这些信息,若编码方式改变,则会出现错误。
这里也提供了一些解决方式,可以尝试一下。
「解决方式」
再将编码改回去
命令方式:在终端中输入以下命令
gsettings set org.gnome.gedit.preferences.encodings auto-detected "['UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16']"
图形方式:
1、运行dconf-editor
2、展开/org/gnome/gedit/preferences/encodings
3、auto-detected的Value中删除 'GB18030' ;