顯示亂碼-putty/透過vi 開檔 - Linux
By Delia
at 2013-05-15T18:00
at 2013-05-15T18:00
Table of Contents
有一問題,久尋不著問題點跟解法!!
在做文字處理(長字串,分割句子),如果直接從putty 列出結果,顯示皆為正常
若是轉至檔案後,透過vi 打開,有些文字會顯示亂碼(主要是泰文與簡中)
如果在windows下打開,也是正常的……
檔案格式:
3out.txt: UTF-8 Unicode text
會出現像:
原文:
xxxxxxx (沒有標點符號)
==> xxx█|# (█由點組成的長方塊,|#為藍字,xxx為泰文)
█~@xxxx (█由點組成的長方塊,~@為藍字,xxxx為泰文)
或是
原文:
電話號碼: (為簡中)
==> 電話號碼█~@ (█由點組成的長方塊,~@為藍字)
碼:
String=$(<1.txt)
for item in $String
do
echo "$item" >> 3out.txt
done
有想過是否為字型問題,但不是每個泰文,簡體都會發生
不過…在簡中時,只要接著":"就會變亂碼(半型?全型?)
是那邊在轉換格式時沒注意到嗎??
跪求各位提供方向!!! 感謝
--
Tags:
Linux
All Comments
By Harry
at 2013-05-16T02:06
at 2013-05-16T02:06
By Odelette
at 2013-05-17T20:47
at 2013-05-17T20:47
By Enid
at 2013-05-18T15:50
at 2013-05-18T15:50
By Gary
at 2013-05-22T14:48
at 2013-05-22T14:48
By Jessica
at 2013-05-24T01:54
at 2013-05-24T01:54
By Dinah
at 2013-05-28T18:45
at 2013-05-28T18:45
By Joseph
at 2013-05-29T21:38
at 2013-05-29T21:38
By Rae
at 2013-06-03T07:54
at 2013-06-03T07:54
Related Posts
debian桌面問題
By Faithe
at 2013-05-15T10:39
at 2013-05-15T10:39
FileZilla更新 3.6.0.2到3.7.0.1
By Dora
at 2013-05-14T22:31
at 2013-05-14T22:31
windows換到linux
By Frederica
at 2013-05-14T21:12
at 2013-05-14T21:12
HackingThursday 固定聚會 (2013-05-16)
By Elizabeth
at 2013-05-14T10:46
at 2013-05-14T10:46
自製 Ubuntu 與 Debian 測試硬體安裝使用的 USB 隨身碟
By Lauren
at 2013-05-13T16:23
at 2013-05-13T16:23