ubuntu 下gedit默认编码为UTF-8,而在windows下编写得txt默认编码位GBK,所以在windowx下面的txt用getdit打开则为乱码,解决方案:
在终端下输入: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
sudo apt-get install dconf-tools
终端中输入命令:$ dconf-editor
依次点开->org->gnome->gedit->preferences->encodings
但是我改变里面得参数值,最终还是没有效果,原因不明,但是这里可以看到默认编码是什么。
相关文章:
-
2021-11-28
-
2021-07-04
-
2021-11-27
-
2021-10-16
-
2021-04-09
-
2021-10-15
-
2021-08-20
猜你喜欢
-
2022-12-23
-
2021-06-04
-
2021-12-15
-
2021-04-26
-
2021-09-11
-
2022-02-08
-
2021-10-03
相关资源
-
下载
2022-12-24
-
下载
2021-06-07
-
下载
2021-07-01
-
下载
2023-01-01