make_smbcodepage 中文man页面

系统
这个工具是是Samba组件的一部分。针对Samba 2.2的国际化功能,使用make_smbcodepage可以编译或反编译代码页文件。

名字

make_smbcodepage - 为Samba创建代码页文件  

总览

make_smbcodepage c|d 代码页 输入文件 输出文件  

描述

这个工具是是Samba组件的一部分。

针对Samba 2.2的国际化功能,使用make_smbcodepage可以编译或反编译代码页文件。  

选项

c|d
使用c把一个文本格式的代码页文件编译成二进制格式;使用d把一个二进制格式的代码页反编译成文本格式。
代码页
选用的代码页(一个数字,如850)。
输入文件
待处理的输入文件。在使用c选项时,它是文本格式的代码页预定义文件,这些文件可以在Samba包的source/codepages 目录中找到;在使用d选项时,它是二进制格式的代码页文件,通常,这些文件保存在Samba安装路径的lib/codepages目录的。
输出文件
程序产生的输出文件。

Samba的代码页文件

文本格式的代码页定义文件描述了在指定DOS代码页大于127的字符中是如何把大写转换为小写的。要注意的是,在某些DOS代码页中 (如437),大小写之间的映射并不一定对称。例如,在代码页437中,当进行小写到大写的映射时,把带有撇形(')重音符号的a转换为不带重间符号的明文大写字母A,而当进行大写到小写映射时,则把字母A直接转换为字母a而不带重间符号。

而二进制代码页定义文件则是相同信息的二进制表示,同时包含一个值,用来说明所描述的代码页。

因为Samba还没有使用UNICODE码,所以如果你希望在特殊的语言环境中不区分大小写的话,就要为DOS和Windows客户端指定所用的代码页。 Samba所用的缺省代码页是850(西欧语)。同时,Samba发布还提供了文本格式的样本代码页文件,包含437(美语)、737(希腊语)、850(西欧语)、852(MS-DOS 拉丁2)、861(冰岛语), 866 (斯拉夫语)、932 (日语)、936(简体中文)、949(韩文)和950(繁体中文)。我们鼓励用户为自己的代码页编写文本格式的定义文件,并把它捐款给samba@samba.org。当你执行'make install'命令时,source/codepages目录中的所有代码页文件都会被编译并安装到系统上。

smb.conf文件中配置了client code page选项之后, smbd服务器就可以使用客户代码页了。  

相关文件

codepage_def.<codepage>

这是Samba源代码包提供的用于输入的文本代码页文件,它们保存在 source/codepages目录中。

在这些文本格式的代码页定义文件中,每一行都包含了四个字段:

*
lower:小写字符的十六进制值。
*
upper:上述小写字符所对应的大写字符十六进制值。
*
map upper to lower:这是个布尔量(True或False二者选一)。用来说明在对一个文件名进行小写处理时,是否让Samba将其中的大写字符映射成小写字符。
*
map lower to upper:这是个布尔量(True或False二者选一)。用来说明在对一个文件名进行大写处理时,是否让Samba将其中的小写字符映射成大写字符。

codepage.<codepage> 这是Samba产生的输出二进制代码页文件,它们保存在Samba安装目录的 lib/codepage中。

安装

服务器及相关支持文件的保存位置决定于系统管理员,以下只是建议:

我们推荐把make_smbcodepage程序安装到/usr/local/samba 路径下的一个目录中,这个目录应该具有只有root可写,所有人都可读的权限。这个程序本身应该让所有用户都可执行,而不应该执行suid或sgid 操作。  

版本

本手册页是针对samba 2.2版的。  

另见

smbd(8)、smb.conf(5)  

#p#

NAME

make_smbcodepage - construct a codepage file for Samba  

SYNOPSIS

make_smbcodepage c|d codepage inputfile outputfile  

DESCRIPTION

This tool is part of the Samba suite.

make_smbcodepage compiles or de-compiles codepage files for use with the internationalization features of Samba 2.2  

OPTIONS

c|d
This tells make_smbcodepage if it is compiling (c) a text format code page file to binary, or (d) de-compiling a binary codepage file to text.
codepage
This is the codepage we are processing (a number, e.g. 850).
inputfile
This is the input file to process. In the c case this will be a text codepage definition file such as the ones found in the Samba source/codepages directory. In the d case this will be the binary format codepage definition file normally found in the lib/codepages directory in the Samba install directory path.
outputfile
This is the output file to produce.

SAMBA CODEPAGE FILES

A text Samba codepage definition file is a description that tells Samba how to map from upper to lower case for characters greater than ascii 127 in the specified DOS code page. Note that for certain DOS codepages (437 for example) mapping from lower to upper case may be non-symmetrical. For example, in code page 437 lower case a acute maps to a plain upper case A when going from lower to upper case, but plain upper case A maps to plain lower case a when lower casing a character.

A binary Samba codepage definition file is a binary representation of the same information, including a value that specifies what codepage this file is describing.

As Samba does not yet use UNICODE (current for Samba version 2.2) you must specify the client code page that your DOS and Windows clients are using if you wish to have case insensitivity done correctly for your particular language. The default codepage Samba uses is 850 (Western European). Text codepage definition sample files are provided in the Samba distribution for codepages 437 (USA), 737 (Greek), 850 (Western European) 852 (MS-DOS Latin 2), 861 (Icelandic), 866 (Cyrillic), 932 (Kanji SJIS), 936 (Simplified Chinese), 949 (Hangul) and 950 (Traditional Chinese). Users are encouraged to write text codepage definition files for their own code pages and donate them to samba@samba.org. All codepage files in the Samba source/codepages directory are compiled and installed when a 'make install' command is issued there.

The client codepage used by the smbd server is configured using the client code page parameter in the smb.conf file.  

FILES

codepage_def.<codepage>

These are the input (text) codepage files provided in the Samba source/codepages directory.

A text codepage definition file consists of multiple lines containing four fields. These fields are:

*
lower: which is the (hex) lower case character mapped on this line.
*
upper: which is the (hex) upper case character that the lower case character will map to.
*
map upper to lower which is a boolean value (put either True or False here) which tells Samba if it is to map the given upper case character to the given lower case character when lower casing a filename.
*
map lower to upper which is a boolean value (put either True or False here) which tells Samba if it is to map the given lower case character to the given upper case character when upper casing a filename.

codepage.<codepage> - These are the output (binary) codepage files produced and placed in the Samba destination lib/codepage directory.

INSTALLATION

The location of the server and its support files is a matter for individual system administrators. The following are thus suggestions only.

It is recommended that the make_smbcodepage program be installed under the /usr/local/samba hierarchy, in a directory readable by all, writeable only by root. The program itself should be executable by all. The program should NOT be setuid or setgid!  

VERSION

This man page is correct for version 2.2 of the Samba suite.  

SEE ALSO

smbd(8) smb.conf(5)  

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-24 16:48:36

man中文man

2011-08-15 10:21:09

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-25 15:39:42

fcloseall中文man

2011-08-25 15:00:15

cfgetispeed中文man

2011-08-25 09:29:35

udp中文man

2011-08-19 18:35:50

issue中文man

2011-08-25 17:03:51

pclose中文man

2011-08-25 17:40:25

setvbuf中文man

2011-08-23 14:21:16

poweroff中文man

2011-08-24 15:52:59

intro中文man

2011-08-23 13:40:31

2011-08-25 15:54:08

ferror中文man

2011-08-25 14:40:27

basename中文man

2011-08-25 17:24:54

puts中文man

2011-08-24 18:05:31

SHOW中文man

2011-08-25 18:34:55

ungetc中文man

2011-08-23 10:03:40

useradd中文man

2011-08-16 10:42:30

rmmod中文man
点赞
收藏

51CTO技术栈公众号