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

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 in question. 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:

The character set is a dynamic character set, but you do not
have a configuration file for it. In this case, you should
install the configuration file for the character set from a
new MySQL distribution.

If your character set index file does not contain the name for
the character set, your program displays an error message. The
file is named Index.xml and the message
is:

Character set 'charset_name' is not a compiled character set and is not
specified in the '/usr/share/mysql/charsets/Index.xml' file

To solve this problem, you should either get a new index file
or manually add the name of any missing character sets to the
current file.

You can force client programs to use specific character set as
follows: