## 10.14.4.3 Diagnostics During Index.xml Parsing 

</collation> 

The MySQL server generates diagnostics when it finds problems while parsing the Index.xml  file: 

•Unknown tags are written to the error log. For example, the following message results if a collation definition contains a <aaa>  tag: 

[Warning] Buffered warning: Unknown LDML tag: ’charsets/charset/collation/rules/aaa’ 

•If collation initialization is not possible, the server reports an “Unknown collation”  error, and also generates warnings explaining the problems, such as in the previous example. In other cases, when a collation description is generally correct but contains some unknown tags, the collation is initialized and is available for use. The unknown parts are ignored, but a warning is generated in the error log. 

•Problems with collations generate warnings that clients can display with SHOW WARNINGS . Suppose that a reset rule contains an expansion longer than the maximum supported length of 6 characters: 

## 10.15 Character Set Configuration 

<reset>abcdefghi</reset> <i>x</i> 

An attempt to use the collation produces warnings: 

mysql> SELECT _utf8’test’ COLLATE utf8_test_ci; ERROR 1273 (HY000): Unknown collation: ’utf8_test_ci’ mysql> SHOW WARNINGS; +---------+------+----------------------------------------+ | Level | Code | Message | +---------+------+----------------------------------------+ | Error | 1273 | Unknown collation: ’utf8_test_ci’ | | Warning | 1273 | Expansion is too long at ’abcdefghi=x’ | +---------+------+----------------------------------------+ 

The MySQL server has a compiled-in default character set and collation. To change these defaults, use the --character-set-server  and --collation-server  options when you start the server. See Section 5.1.7, “Server Command Options” . The collation must be a legal collation for the default character set. To determine which collations are available for each character set, use the SHOW COLLATION statement or query the INFORMATION_SCHEMA COLLATIONS  table. 

If you try to use a character set that is not compiled into your binary, you might run into the following problems: 

•If your program uses an incorrect path to determine where the character sets are stored (which is typically the share/mysql/charsets  or share/charsets  directory under the MySQL installation directory), this can be fixed by using the --character-sets-dir  option when you run the program. For example, to specify a directory to be used by MySQL client programs, list it in the [client]  group of your option file. The examples given here show what the setting might look like for Unix or Windows, respectively: 

[client] character-sets-dir=/usr/local/mysql/share/mysql/charsets 

[client] character-sets-dir="C:/Program Files/MySQL/MySQL Server 8.0/share/charsets" 

•If the character set is a complex character set that cannot be loaded dynamically, you must recompile the program with support for the character set. 

