歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 12.04下Gedit打開Windows下txt文件亂碼解決

Ubuntu 12.04下Gedit打開Windows下txt文件亂碼解決

日期:2017/2/28 15:45:18   编辑:Linux教程

剛安裝好的Ubuntu 12.04,用gedit打開Windows下的txt等文本文件,由於沒有像網頁文件那樣指明編碼,gedit不能夠自動識別編碼,所以會出現中文漢字顯示亂碼(見圖1)。

圖1

解決方法:

1、在終端輸入“dconf-editor”回車(見圖2)。(如果沒有安裝用“sudo apt-get install dconf-tools”安裝。)

圖2

2、展開org/gnome/gedit/preferences/encodings(見圖3)

auto-detected的value中加入 'GB18030', 加在uft8後面,按回車;

show-in-menu的value中在前面加入 'GB18030', 按回車。

圖3

現在再打開txt等文本文件看看,亂碼問題是不是解決了。 (見圖4)

圖4
Copyright © Linux教程網 All Rights Reserved