默认ubuntu 使用的是UTF-8编码,因此打开win txt 文件是乱码。
1、安装dconf-editor ,如果有就不用安装了 。
sudo apt-get install dconf-editor
2、运行dconf-editor,在org/gnome/gedit/preferences/encodings中,设candidate-encodings的值为
['UTF-8', 'GB2312', 'CURRENT', 'ISO-8859-15', 'UTF-16']
我看网上很多都写的auto-detected ,我的版本是19.04 ,是candidate-encodings
感觉有点像window 的注册表,难道是殊途同归。