samba 主機上看共享亂碼

xiao_nick 发布于 2011/09/08 10:51
阅读 499
收藏 0

大家好!俺是個新手,有關于samba主機上查看共享資料亂碼問題想請教一下大家!

    我的samba主機用的是Cent os 5.5 ,主機語言:i18n =LANG="zh_tw.UTF-8" ,

    smb.conf設定:

        unix charset = UTF-8

        display charset = UTF-8

        dos charset = GBK
在windows xp(繁體系統) 下訪問samba主機建立中文資料及資料夾一切正常,但在samba主機上看windows xp 寫入的中文資料件及文件夾都是????????????號,英文資料一切正常,請問大家這是哪裹的問題?感謝!!

加载中
0
鉴客
鉴客
vi /etc/samba/smb.conf

根据locales的设置,修改该文件:

1. 如果locale是zh_CN.UTF-8,做如下设置:

display charset = UTF-8

unix charset = UTF-8

dos charset = UTF-8

2. 如果locale是zh_CN.GBK或zh_CN.gb2312,做如下设置:

display charset = cp936

unix charset = cp936

dos charset = cp936

重启samba:

service samba restart

则无论从windows的网上邻居,还是直接用securecrt登陆,均可显示正常中文。
0
xiao_nick
xiao_nick
[root@ksserver]$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=zh_tw.UTF-8
LC_CTYPE="zh_tw.UTF-8"
LC_NUMERIC="zh_tw.UTF-8"
LC_TIME="zh_tw.UTF-8"
LC_COLLATE="zh_tw.UTF-8"
LC_MONETARY="zh_tw.UTF-8"
LC_MESSAGES="zh_tw.UTF-8"
LC_PAPER="zh_tw.UTF-8"
LC_NAME="zh_tw.UTF-8"
LC_ADDRESS="zh_tw.UTF-8"
LC_TELEPHONE="zh_tw.UTF-8"
LC_MEASUREMENT="zh_tw.UTF-8"
LC_IDENTIFICATION="zh_tw.UTF-8"

smb.conf設定:

        unix charset = UTF-8

        display charset = UTF-8

        dos charset = GBK

        注:我試過將smb.conf改成:

    unix charset = UTF-8

        display charset = UTF-8

        dos charset =UTF-8

在windows xp下顯示為亂碼.


幫我看一下locale的設置和smb.conf的語言設置是否有問題. 感謝!!
返回顶部
顶部