如果您想为名为 MYSET 的新字符集添加支持,该字符集包含多字节字符,则必须在 strings 目录下的 ctype- 源文件中使用多字节字符函数。If you want to add support for a new character set named
MYSET.cMYSET that includes multibyte
characters, you must use multibyte character functions in the
ctype-
source file in the MYSET.cstrings directory.
现有的字符集提供了最好的文档和示例来展示这些函数是如何实现的。请查看 strings 目录下的 ctype-*.c 文件,例如 euc_kr、gb2312、gbk、sjis 和 ujis 字符集的文件。看看 MY_CHARSET_HANDLER 结构体,了解它们是如何使用的。有关更多信息,请参见 strings 目录下的 CHARSET_INFO.txt 文件。The existing character sets provide the best documentation and
examples to show how these functions are implemented. Look at
the ctype-*.c files in the
strings directory, such as the files for
the euc_kr, gb2312,
gbk, sjis, and
ujis character sets. Take a look at the
MY_CHARSET_HANDLER structures to see how they
are used. See also the CHARSET_INFO.txt
file in the strings directory for
additional information.