歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> Ubuntu16.04 gedit 中文亂碼

Ubuntu16.04 gedit 中文亂碼

日期:2017/3/3 12:44:30   编辑:Linux技術

更新到16.04,gedit打開中文時,依然存在亂碼的問題。ubuntu官方給出的解決方案是,gedit3.x以上版本的在命令終端輸入命令:

gsettings set org.gnome.gedit.preferences.encodings auto-detected “[‘GB18030’, ‘UTF-8’, ‘CURRENT’, ‘ISO-8859-15’, ‘UTF-16’]” 來解決。

但是輸入命令後提示無”auto-detected”鍵值。

難道是ubuntu16.04把這個鍵值給改了?

只能用dconf-editor進行查看一下。終端輸入dconf-editor命令,找到

看來鍵值真的是更改了,可以直接在dconf-editor下把”candidate-encodings”的值更改為”[‘GB18030’, ‘UTF-8’, ‘CURRENT’, ‘ISO-8859-15’, ‘UTF-16’]”。

問題找到了,如果用命令進行更改的話,可以輸入命令

gsettings set org.gnome.gedit.preferences.encodings candidate-encodings “[‘GB18030’, ‘UTF-8’, ‘CURRENT’, ‘ISO-8859-15’, ‘UTF-16’]” 來解決。

Copyright © Linux教程網 All Rights Reserved