file 查看檔案格式問題 - Linux

Table of Contents

請教各位一下
我用vi建立了2個txt file
cat a.txt
abc 123 ^

cat b.txt
中文abc123


file a.txt => ASCII text
file b.txt => UTF-8 Unicode text

為什麼會這樣呢?它會自動幫我做轉換?

因為不太明白,所以來請教各位
謝謝您

--

All Comments

Rosalind avatarRosalind2014-09-20
你的預設編碼應該是 utf8,只是因爲如果只有英數的話
Christine avatarChristine2014-09-25
ASCII 和 utf8 其實一模一樣 所以辨認成 ASCII
Selena avatarSelena2014-09-25
基本上幾乎所有編碼前 128 都跟 ASCII 相同
你可以 set encoding 看一下就知道了
Blanche avatarBlanche2014-09-30
謝謝~雖然1~2句還不是很明白@@