Provided by: m17n-docs_1.6.2-2_all bug

NAME

       mchar_define_charset - Define a charset.

SYNOPSIS

       MSymbol mchar_define_charset (const char * name, MPlist * plist)

DESCRIPTION

       Define a charset. The mchar_define_charset() function defines a new charset and makes it
       accessible via a symbol whose name is name.  plist specifies parameters of the charset as
       below:

       • Key is Mmethod, value is a symbol.
       The value specifies the method for decoding/encoding code-points in the charset. It must
       be Moffset, Mmap (default), Munify, Msubset, or Msuperset.
       • Key is Mdimension, value is an integer
       The value specifies the dimension of code-points of the charset. It must be 1 (default),
       2, 3, or 4.
       • Key is Mmin_range, value is an unsigned integer
       The value specifies the minimum range of a code-point, which means that the Nth byte of
       the value is the minimum Nth byte of code-points of the charset. The default value is 0.
       • Key is Mmax_range, value is an unsigned integer
       The value specifies the maximum range of a code-point, which means that the Nth byte of
       the value is the maximum Nth byte of code-points of the charset. The default value is
       0xFF, 0xFFFF, 0xFFFFFF, or 0xFFFFFFFF if the dimension is 1, 2, 3, or 4 respectively.
       • Key is Mmin_code, value is an unsigned integer
       The value specifies the minimum code-point of the charset. The default value is the
       minimum range.
       • Key is Mmax_code, value is an unsigned integer
       The value specifies the maximum code-point of the charset. The default value is the
       maximum range.
       • Key is Mascii_compatible, value is a symbol
       The value specifies whether the charset is ASCII compatible or not. If the value is Mnil
       (default), it is not ASCII compatible, else compatible.
       • Key is Mfinal_byte, value is an integer
       The value specifies the final byte of the charset registered in The International
       Registry. It must be 0 (default) or 32..127. The value 0 means that the charset is not in
       the registry.
       • Key is Mrevision, value is an integer
       The value specifies the revision number of the charset registered in The International
       Registry. It must be 0..127. If the charset is not in The International Registry, the
       value is ignored. The value 0 means that the charset has no revision number.
       • Key is Mmin_char, value is an integer
       The value specifies the minimum character code of the charset. The default value is 0.
       • Key is Mmapfile, value is an M-text
       If the method is Mmap or Munify, a data that contains mapping information is added to the
       m17n database by calling the function mdatabase_define() with the value as an argument
       extra_info, i.e. the value is used as a file name of the data.
       Otherwise, this parameter is ignored.
       • Key is Mparents, value is a plist
       If the method is Msubset, the value must is a plist of length 1, and the value of the
       plist must be a symbol representing a parent charset.
       If the method is Msuperset, the value must be a plist of length less than 9, and the
       values of the plist must be symbols representing subset charsets.
       Otherwise, this parameter is ignored.
       • Key is Mdefine_coding, value is a symbol
       If the dimension of the charset is 1, the value specifies whether or not to define a
       coding system of the same name whose type is Mcharset.  A coding system is defined if the
       value is not Mnil.
       Otherwise, this parameter is ignored.

RETURN VALUE

           If the operation was successful, mchar_define_charset() returns a symbol whose name is
           name.  Otherwise it returns Mnil and assigns an error code to the external variable
           merror_code.

ERRORS

           MERROR_CHARSET

COPYRIGHT

       Copyright (C) 2001 Information-technology Promotion Agency (IPA)
       Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology
       (AIST)
       Permission is granted to copy, distribute and/or modify this document under the terms of
       the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.