Character Set Configuration
816
<p>G</p>
<p>\u0047</p>
10.5. Character Set Configuration
You can change the default server character set and collation with the
--character-set-
server
[403]
and
--collation-server
[403]
options when you start the server. The collation must
be a legal collation for the default character set. (Use the
SHOW COLLATION
statement to determine
which collations are available for each character set.) See
Section 5.1.3, “Server Command Options”
.
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:
[client]
character-sets-dir=/usr/local/mysql/share/mysql/charsets
[client]
character-sets-dir="C:/Program Files/MySQL/MySQL Server 5.0/share/charsets"
• The character set is a complex character set that cannot be loaded dynamically. In this case, you
must recompile the program with support for the character set.
For Unicode character sets, you can define collations without recompiling by using LDML notation.
See
Section 10.4.4, “Adding a UCA Collation to a Unicode Character Set”
.
• 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:
[client]
default-character-set=
charset_name
This is normally unnecessary. However, when
character_set_system
[443]
differs from
character_set_server
[443]
or
character_set_client
[441]
, and you input characters
manually (as database object identifiers, column values, or both), these may be displayed incorrectly in
output from the client or the output itself may be formatted incorrectly. In such cases, starting the mysql
client with
--default-character-set=system_character_set
[266]
—that is, setting the client
character set to match the system character set—should fix the problem.
For
MyISAM
tables, you can check the character set name and number for a table with
myisamchk -
dvv tbl_name
.
10.6. MySQL Server Time Zone Support
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...