QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 909|回复: 4

请高手彻底解决samba下的中文字体问题!!!!!

[复制链接]
发表于 2003-7-18 16:50:53 | 显示全部楼层 |阅读模式
好多人(也包括我)都在用samba时出现不能显示中文的问题,使我们不能下载windows机器中有中文名的文件,很郁闷啊!论坛里有一些方法,但我试了都不行啊!那个文件到底怎么配置才能解决这个问题啊!给个详细的方案吧!我们这些新手都快疯了。先谢谢了
发表于 2003-7-19 07:11:00 | 显示全部楼层
在红旗4中没有问题。
回复

使用道具 举报

 楼主| 发表于 2003-7-19 11:11:07 | 显示全部楼层
我的是RH9啊!很多人都遇到了这种情况!
回复

使用道具 举报

发表于 2003-7-20 00:30:07 | 显示全部楼层
Mandrake9.1也没有乱码问题。
回复

使用道具 举报

发表于 2003-9-27 15:27:12 | 显示全部楼层
//以下是我的一些看法,不知是否正确,若您测试了,还望给些意见。
//  Ray 2003.09.26


看看以下的参数是否设置正确:
一、在2.2.x版本中

      character set = GB2312
        valid chars =
        coding system =
        client code page = 936
        code page directory = /usr/share/samba/codepages

二、在3.0.x版本中

     dos charset = CP936
        unix charset = CP936
        display charset = LOCALE
        unicode = Yes

三、内核配置

CONFIG_SMB_FS=y
CONFIG_SMB_NLS_DEFAULT="cp936"
CONFIG_NLS_DEFAULT="cp936"

四、相关参数说明

(1) samba 2.2.x version

       *********character set (G)*********
              This allows smbd to map incoming filenames from a DOS Code  page
              (see  the  client  code page parameter) to several built in UNIX
              character sets.  The built in code page translations are:

              o ISO8859-1 : Western European UNIX character set. The parameter
                client code page MUST be set to code page 850 if the character
                set parameter is set to ISO8859-1 in order for the  conversion
                to the UNIX character set to be done correctly.

              o ISO8859-2 : Eastern European UNIX character set. The parameter
                client code page MUST be set to code page 852 if the   charac-
                ter set parameter is set to ISO8859-2 in order for the conver-
                sion to the UNIX character set to be done correctly.

              o ISO8859-5 : Russian Cyrillic UNIX character set. The parameter
                client code page MUST be set to code page 866 if the character
                set  parameter is set to ISO8859-5 in order for the conversion
                to the UNIX character set to be done correctly.

              o ISO8859-7  :  Greek  UNIX  character set. The parameter client
                code page MUST be set to code page 737 if  the  character  set
                parameter  is  set to ISO8859-7 in order for the conversion to
                the UNIX character set to be done correctly.

              o KOI8-R : Alternate mapping for Russian Cyrillic UNIX character
                set.  The  parameter client code page MUST be set to code page
                866 if the character set parameter is set to KOI8-R  in  order
                for  the  conversion to the UNIX character set to be done cor-
                rectly.

       BUG. These MSDOS code page to UNIX character  set  mappings  should  be
       dynamic, like the loading of MS DOS code pages, not static.

       Normally  this parameter is not set, meaning no filename translation is
       done.

       Default: character set = <empty string>

       Example: character set = ISO8859-1

       *********client code page (G)*********
              This parameter specifies the DOS  code  page  that  the  clients
              accessing Samba are using. To determine what code page a Windows
              or DOS client is using, open a DOS command prompt and  type  the
              command  chcp.  This  will output the code page. The default for
              USA MS-DOS, Windows 95, and Windows NT  releases  is  code  page
              437.  The  default  for  western  European releases of the above
              operating systems is code page 850.

              This parameter tells smbd( which of the codepage.XXX files  to
              dynamically  load  on startup. These files, described more fully
              in the manual page  make_smbcodepage(1) tell  smbd  how  to  map
              lower to upper case characters to provide the case insensitivity
              of filenames that Windows clients expect.

              Samba currently ships with the following code page files :

              o Code Page 437 - MS-DOS Latin US

              o Code Page 737 - Windows '95 Greek

              o Code Page 850 - MS-DOS Latin 1

              o Code Page 852 - MS-DOS Latin 2

              o Code Page 861 - MS-DOS Icelandic

              o Code Page 866 - MS-DOS Cyrillic

              o Code Page 932 - MS-DOS Japanese SJIS

              o Code Page 936 - MS-DOS Simplified Chinese

              o Code Page 949 - MS-DOS Korean Hangul

              o Code Page 950 - MS-DOS Traditional Chinese

       Thus this parameter may have any of the values 437, 737, 850, 852, 861,
       932,  936,  949,  or 950. If you don't find the codepage you need, read
       the comments in one of the other codepage files and  the  make_smbcode-
       page(1)  man  page  and write one. Please remember to donate it back to
       the Samba user community.
       This parameter co-operates with the valid chars parameter in  determin-
       ing  what  characters  are valid in filenames and how capitalization is
       done. If you set both this parameter and the valid chars parameter  the
       client code page parameter MUST be set before the valid chars parameter
       in the smb.conf file. The valid chars  string  will  then  augment  the
       character settings in the client code page parameter.

       If not set, client code page defaults to 850.

       See also : valid chars,  code page directory

       Default: client code page = 850

       Example: client code page = 936


       *********code page directory (G)*********
              Define the location of the various client code page files.

              See also client code page

              Default:  code page directory = ${prefix}/lib/codepages Example:
              code page directory = /usr/share/samba/codepages .TP coding sys-
              tem  (G) This parameter is used to determine how incoming Shift-
              JIS Japanese characters are mapped from the incoming client code
              page used by the client, into file names in the UNIX filesystem.
              Only useful if client code page is set to 932  (Japanese  Shift-
              JIS). The options are :

              o SJIS - Shift-JIS. Does no conversion of the incoming filename.

              o JIS8, J8BB, J8BH, J8@B, J8@J, J8@H  -  Convert  from  incoming
                Shift-JIS to eight bit JIS code with different shift-in, shift
                out codes.

              o JIS7, J7BB, J7BH, J7@B, J7@J, J7@H  -  Convert  from  incoming
                Shift-JIS to seven bit JIS code with different shift-in, shift
                out codes.

              o JUNET, JUBB, JUBH, JU@B, JU@J, JU@H -  Convert  from  incoming
                Shift-JIS  to  JUNET  code  with different shift-in, shift out
                codes.

              o EUC - Convert an incoming Shift-JIS character to EUC code.

              o HEX - Convert an incoming Shift-JIS character to a 3 byte  hex
                representation, i.e.  :AB.

              o CAP  -  Convert  an incoming Shift-JIS character to the 3 byte
                hex representation used  by  the  Columbia  AppleTalk  Program
                (CAP), i.e. :AB.  This is used for compatibility between Samba
                and CAP.

       Default: coding system = <empty value>


(2) samba 3.0.x version


       *********dos charset (G)*********
              DOS SMB clients assume the server has the same charset  as  they
              do. This option specifies which charset Samba should talk to DOS
              clients.

              The default depends on which charsets you have installed.  Samba
              tries  to  use charset 850 but falls back to ASCII in case it is
              not available. Run testparm(1) to check the default on your sys-
              tem.



       *********display charset (G)*********
              Specifies the charset that samba will use to print  messages  to
              stdout  and  stderr  and  SWAT will use. Should generally be the
              same as the unix charset.

              Default: display charset = ASCII

              Example: display charset = UTF8


       *********unicode (G)*********
              Specifies whether Samba should try to use unicode on the wire by
              default. Note: This does NOT mean that samba  will  assume  that
              the unix machine uses unicode!

              Default: unicode = yes



       *********unix charset (G)*********
              Specifies the charset the unix machine Samba runs on uses. Samba
              needs to know this in order to be able to convert  text  to  the
              charsets other SMB clients use.

              Default: unix charset = UTF8

              Example: unix charset = ASCII
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-29 17:22 , Processed in 0.049924 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表