iT邦幫忙

0

samba 亂碼?

sden 2012-08-31 14:09:378555 瀏覽
  • 分享至 

  • xImage

我的device上有一張SD card, 我用samba分享sdcard上的data,
不過遇到一個問題,
SD card 上原本的中文檔名,在winXP網芳看是亂碼。
在網芳存入一個中文檔名的檔案,然後把SD card插入PC上,也是亂碼..
意思就是互相看是亂碼.. 請問這有辦法解決嗎?
我試過調整
display charset=big5
dos charset=big5
unix charset=big5
不過沒有作用...

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

4
wiseguy
iT邦超人 1 級 ‧ 2012-08-31 21:29:33
最佳解答

調整成
dos charset = UTF-8
unix charset = CP950
再重跑 samba,重新建立中文檔名試試看。

看現在已經是亂碼的檔案名稱不準。因為它可能是因為你設定錯誤而轉錯碼了。

看更多先前的回應...收起先前的回應...
sden iT邦新手 5 級 ‧ 2012-09-03 09:02:11 檢舉

一樣ㄝ~Sd Card插到電腦去看起來都是亂碼..

wiseguy iT邦超人 1 級 ‧ 2012-09-03 23:17:24 檢舉

依我的設定重跑 samba 後,你有重新 copy 一個中文名的檔案嗎?
我上面最後一行已經說明了,如果 SD 裡頭已經是亂碼,再怎麼設,看到的還是亂碼。我的設定是讓你在 windows 重新寫入中文名檔案可以在 samba 看到,不是幫你還原已經是亂碼的檔名喔,瞭解嗎?

sden iT邦新手 5 級 ‧ 2012-09-04 08:44:41 檢舉

我是網芳裡新建一個資料夾在改名, 把sdcard插上電腦看我新建的資料夾名稱還是亂碼,
會需要重新format SDcard 嗎?
我的.conf設定..
#===== smb.conf =====
[global]
workgroup = MYGROUP
server string = Samba Server
security = share
load printers = no
log file = /var/log/samba/log.%m
max log size = 50
dns proxy = no
guest account = root
smb ports = 139 445
bind interfaces only = True
interfaces = eth0 eth1
include = /etc/samba/smb-%i.conf
display charset=UTF-8
dos charset=UTF-8
unix charset=CP950

#===== smb-192.168.1.1.conf =====
[sdcard]
path = /media/card/
browseable = yes
writable = yes
guest ok = yes
read only = no
public = yes
hosts allow = 192.168.1.
hosts deny = ALL

#===== smb-192.168.0.1.conf =====
[public]
path = /media/card/public
browseable = yes
writable = yes
guest ok = yes
read only = no
public = yes

wiseguy iT邦超人 1 級 ‧ 2012-09-05 14:22:32 檢舉

請把 display charset 也指定為 CP950。

sden iT邦新手 5 級 ‧ 2012-09-06 15:52:04 檢舉

一樣ㄝ~ 還是我必須把
display charset=CP950
dos charset=UTF-8
unix charset=CP950
放在 smb-192.168.1.1.conf and smb-192.168.0.1.conf 裡面?

我要發表回答

立即登入回答