[問題] 如何更改以及確認 file encoding

看板Linux作者 (偽ABJ)時間17年前 (2008/11/27 12:56), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
請問要如何更改及確認 file encoding? ==================== 我是用 iconv 去改,寫成這樣的 shell sciript 把目前目錄底下的所有檔案改成 UTF-8 #!/bin/bash for i in $(ls) do iconv -t UTF-8 $i > temp mv temp $i done =================== 但下 ls| xargs file 查看檔案屬性時 卻發現還是有很多 ASCII 編碼的 或是寫成 tex file, english text 之類的 看不出編碼: abstractCH.tex: UTF-8 Unicode text abstractEN.tex: ASCII English text algorithmicx.sty: ASCII English text algorithm.sty: ASCII English text algpseudocode.sty: ASCII English text application.tex: LaTeX document text conclusion.tex: LaTeX document text convert_to_utf.sh: Bourne-Again shell script text executable defs.tex: ASCII text errors.txt: ASCII text introduction.tex: LaTeX document text Makefile: ASCII make commands text modeling.tex: LaTeX document text ntu.sty: UTF-8 Unicode English text ntuvars.tex: UTF-8 Unicode text photoshoot.tex: LaTeX document text related.tex: LaTeX document text thesis.aux: LaTeX auxiliary file thesis.bib: BibTeX text file thesis.log: ASCII C++ program text thesis.out: empty thesis.pdf: empty thesis.tex: LaTeX 2e document text ================================= 不知道是 iconv 的問題還是 file 的問題 除了 file,有沒別的方法可以確認編碼? -- Team Programming Dragon http://graphics.csie.ntu.edu.tw/~jonathan/tpd/ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 157.82.147.209 ※ 編輯: Reinhard 來自: 157.82.147.209 (11/27 12:59)
文章代碼(AID): #19BYXrxy (Linux)
文章代碼(AID): #19BYXrxy (Linux)