我无法显示用 GBK 编码的文件。在 gnome 3.2 的 gconf-editor 中,我找不到 gedit 的编码项。如何设置?谢谢
Sav*_*vic 36
我没有用 GBK 编码的文件来测试解决方案,但请尝试一下。
选项 1:运行 gedit,然后打开文件:
运行 gedit
点击打开
在编码组合中选择“添加”并添加 GB18030(或 GBK)
在组合中选择该编码
选择文件
选项2:
安装并运行 gconf-editor
找到 /apps/gedit-2/preferences/encoding 键“auto_detected”并将其设置为:
[CURRENT,GB18030,GBK,GB2312,UTF-8,UTF-16]
Run Code Online (Sandbox Code Playgroud)记得备份auto_detected之前的值!!
选项 3:使用 dconf(在 ubuntu 中使用的“较新的”gconf)
dconf read /org/gnome/gedit/preferences/encodings/auto-detected
Run Code Online (Sandbox Code Playgroud)
保存结果(备份)!
dconf write /org/gnome/gedit/preferences/encodings/auto-detected "['CURRENT', 'GBK', 'GB18030', 'GB2312', 'UTF-8', 'UTF-16']"
Run Code Online (Sandbox Code Playgroud)
资料来源:
要将其重置为默认值:a) 使用您从 dconf read 命令备份的选项
或 b) 尝试:
dconf reset /org/gnome/gedit/preferences/encodings/auto-detected
Run Code Online (Sandbox Code Playgroud)