TXT中国語がUbuntu 18.04で文字化けを表示する

問題の原因

Ubuntu 18.04のデフォルトのエディターはGeditです。英語版がインストールされているか、文字エンコードが設定されていない場合、TXTファイルの中国語に文字化けが表示されます。

dconf-toolsをインストールする

sudo apt-get install dconf-tools

dconf-editorを開く

dconf-editor

文字エンコーディングを追加する

开org / gnome / gedit / preferences / encodings / candidate-encodings

[デフォルト値を使用]を Off

カスタム値にコンテンツを追加する

[‘UTF-8′,’GB18030′,’GB2312′,’GBK’,’BIG5′,’CURRENT’,’UTF-16′]

コマンドの直接変更

ズームインします。ここでは、ターミナルで次のコマンドを入力するだけで、txtの文字化けの問題を完全に修正できます。

gsettings set org.gnome.gedit.preferences.encodings candidate-encodings "['GB18030', 'UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16']"

おすすめ

転載: blog.csdn.net/no1xium/article/details/108325792