Choosing a Collation ID 1 row in set (0.02 sec) A many-characters-to-many-weights mapping is also possible (this is contraction with expansion), but is not supported by MySQL. For implementation instructions, for a non-UCA collation, see Section 10.13, “Adding a Character Set” . For a UCA collation, see Section 10.14.4, “Adding a UCA Collation to a Unicode Character Set” . There are also a few collations that do not fall into any of the previous categories. Each collation must have a unique ID. To add a collation, you must choose an ID value that is not currently used. MySQL supports two-byte collation IDs. The range of IDs from 1024 to 2047 is reserved for user- defined collations. The collation ID that you choose appears in these contexts: To determine the largest currently used ID, issue the following statement: mysql>  SELECT MAX(ID) FROM INFORMATION_SCHEMA.COLLATIONS; 1995 •A character may have many weights. This is an expansion. Example: The German letter  ’ß’  (SZ ligature, or SHARP S) has a weight of  0x0FEA0FEA . •Many characters may have one weight. This is a contraction. Example:  ’ch’  is a single letter in Czech and has a weight of  0x0EE2 . •The  ID  column of the  INFORMATION_SCHEMA.COLLATIONS  table. •The  Id  column of  SHOW COLLATION  output. •The  charsetnr  member of the  MYSQL_FIELD C API data structure. •The  number  member of the  MY_CHARSET_INFO  data structure returned by the mysql_get_character_set_info() C API function. mysql>  SET NAMES ’utf8’ COLLATE ’utf8_unicode_ci’; Query OK, 0 rows affected (0.11 sec) mysql>  SELECT HEX(’ß’), HEX(WEIGHT_STRING(’ß’)); +-----------+--------------------------+ | HEX(’ß’) | HEX(WEIGHT_STRING(’ß’)) | +-----------+--------------------------+ | C39F | 0FEA0FEA | +-----------+--------------------------+ 1 row in set (0.00 sec) mysql>  SET NAMES ’utf8’ COLLATE ’utf8_czech_ci’; Query OK, 0 rows affected (0.09 sec) mysql>  SELECT HEX(’ch’), HEX(WEIGHT_STRING(’ch’)); +-----------+--------------------------+ | HEX(’ch’) | HEX(WEIGHT_STRING(’ch’)) | +-----------+--------------------------+ | 6368 | 0EE2 | +-----------+--------------------------+ 1 row in set (0.00 sec) Miscellaneous collations 10.14.2 Choosing a Collation ID