•Comments are written as ordinary XML comments ( <!-- text  --> ). 

•Words within <map>  array elements are separated by arbitrary amounts of whitespace. 

•Each word within <map>  array elements must be a number in hexadecimal format. 

•The <map>  array element for the <ctype>  element has 257 words. The other <map>  array elements after that have 256 words. See Section 10.13.1, “Character Definition Arrays” . 

•For each collation listed in the <charset>  element for the character set in Index.xml , MYSET .xml must contain a <collation>  element that defines the character ordering. 

For a complex character set, create a C source file that describes the character set properties and defines the support routines necessary to properly perform operations on the character set: 

•Create the file ctype- MYSET .c  in the strings  directory. Look at one of the existing ctype-*.c files (such as ctype-big5.c ) to see what needs to be defined. The arrays in your file must have names like ctype_ MYSET , to_lower_ MYSET , and so on. These correspond to the arrays for a simple character set. See Section 10.13.1, “Character Definition Arrays” . 

•For each <collation>  element listed in the <charset>  element for the character set in Index.xml , the ctype- MYSET .c  file must provide an implementation of the collation. 

•If the character set requires string collating functions, see Section 10.13.2, “String Collating Support for Complex Character Sets” . 

•If the character set requires multibyte character support, see Section 10.13.3, “Multi-Byte Character Support for Complex Character Sets” . 

3. Modify the configuration information. Use the existing configuration information as a guide to adding information for MYSYS . The example here assumes that the character set has default and binary collations, but more lines are needed if MYSET  has additional collations. 

a. Edit mysys/charset-def.c , and “register”  the collations for the new character set. 

Add these lines to the “declaration”  section: 

#ifdef HAVE_CHARSET_ MYSET extern CHARSET_INFO my_charset_ MYSET _general_ci; extern CHARSET_INFO my_charset_ MYSET _bin; #endif 

Add these lines to the “registration”  section: 

#ifdef HAVE_CHARSET_ MYSET add_compiled_collation(&my_charset_ MYSET _general_ci); add_compiled_collation(&my_charset_ MYSET _bin); #endif 

b. If the character set uses ctype- MYSET .c , edit strings/CMakeLists.txt  and add ctype- MYSET .c  to the definition of the STRINGS_SOURCES  variable. 

c. Edit cmake/character_sets.cmake : 

i. Add MYSET  to the value of with CHARSETS_AVAILABLE  in alphabetic order. 

ii. Add MYSET  to the value of CHARSETS_COMPLEX  in alphabetic order. This is needed even for simple character sets, so that CMake  can recognize -DDEFAULT_CHARSET= MYSET . 

