Linux:ファイル文字コードの判別と変更方法
emacs
モードラインで判別
E:--- みたいなの。
E | EUC |
J | JIS |
S | Shift JIS |
U | UTF-8 |
t | BINARY |
変更
C-x RET f
nkf コマンドを使用すると判別ができる
文字コードを判別する
$ nkf -g <textdata>
文字コードの変換
EUC-JPへ変換
$ nkf -e --overwrite <textdata>
Shift-JISへ変換
$ nkf -s --overwrite <textdata>
UTF-8へ変換
$ nkf -w --overwrite <textdata>