请高手彻底解决samba下的中文字体问题!!!!!
好多人(也包括我)都在用samba时出现不能显示中文的问题,使我们不能下载windows机器中有中文名的文件,很郁闷啊!论坛里有一些方法,但我试了都不行啊!那个文件到底怎么配置才能解决这个问题啊!给个详细的方案吧!我们这些新手都快疯了。先谢谢了 在红旗4中没有问题。 我的是RH9啊!很多人都遇到了这种情况! Mandrake9.1也没有乱码问题。 //以下是我的一些看法,不知是否正确,若您测试了,还望给些意见。//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 Codepage
(seetheclientcode 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 theconversion
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
setparameter is set to ISO8859-5 in order for the conversion
to the UNIX character set to be done correctly.
o ISO8859-7:GreekUNIXcharacter set. The parameter client
code page MUST be set to code page 737 ifthecharacterset
parameterisset 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.Theparameter client code page MUST be set to code page
866 if the character set parameter is set to KOI8-Rinorder
fortheconversion to the UNIX character set to be done cor-
rectly.
BUG. These MSDOS code page to UNIX charactersetmappingsshouldbe
dynamic, like the loading of MS DOS code pages, not static.
Normallythis 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 DOScodepagethattheclients
accessing Samba are using. To determine what code page a Windows
or DOS client is using, open a DOS command prompt andtypethe
commandchcp.Thiswill output the code page. The default for
USA MS-DOS, Windows 95, and Windows NTreleasesiscodepage
437.ThedefaultforwesternEuropean releases of the above
operating systems is code page 850.
This parameter tells smbd(8) which of the codepage.XXX filesto
dynamicallyloadon startup. These files, described more fully
in the manual pagemake_smbcodepage(1) tellsmbdhowtomap
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 andthemake_smbcode-
page(1)manpageand write one. Please remember to donate it back to
the Samba user community.
This parameter co-operates with the valid chars parameter indetermin-
ingwhatcharactersare valid in filenames and how capitalization is
done. If you set both this parameter and the valid chars parameterthe
client code page parameter MUST be set before the valid chars parameter
in the smb.conf file. The valid charsstringwillthenaugmentthe
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(JapaneseShift-
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-Convertfromincoming
Shift-JIS to eight bit JIS code with different shift-in, shift
out codes.
o JIS7, J7BB, J7BH, J7@B, J7@J, J7@H-Convertfromincoming
Shift-JIS to seven bit JIS code with different shift-in, shift
out codes.
o JUNET, JUBB, JUBH, JU@B, JU@J, JU@H -Convertfromincoming
Shift-JIStoJUNETcodewith 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 bytehex
representation, i.e.:AB.
o CAP-Convertan incoming Shift-JIS character to the 3 byte
hex representation usedbytheColumbiaAppleTalkProgram
(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 charsetasthey
do. This option specifies which charset Samba should talk to DOS
clients.
The default depends on which charsets you have installed.Samba
triestouse 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 printmessagesto
stdoutandstderrandSWAT 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 sambawillassumethat
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 converttexttothe
charsets other SMB clients use.
Default: unix charset = UTF8
Example: unix charset = ASCII
页:
[1]