Adding a Character Set
805
You can select which language the server uses for error messages using the instructions in this
section.
To start
mysqld
with a particular language for error messages, use the
--language
[410]
or
-
L
option. The option value can be a language name or the full path to the error message file. For
example:
shell>
mysqld --language=swedish
Or:
shell>
mysqld --language=/usr/local/share/swedish
The language name should be specified in lowercase.
By default, the language files are located in the
share/mysql/LANGUAGE
directory under the MySQL
base directory.
For information about changing the character set for error messages (rather than the language), see
Section 10.1.6, “Character Set for Error Messages”
.
You can change the content of the error messages produced by the server using the instructions in
the MySQL Internals manual, available at
MySQL Internals: Error Messages
. If you do change the
content of error messages, remember to repeat your changes after each upgrade to a newer version of
MySQL.
10.3. Adding a Character Set
This section discusses the procedure for adding a character set to MySQL. The proper procedure
depends on whether the character set is simple or complex:
• If the character set does not need special string collating routines for sorting and does not need
multi-byte character support, it is simple.
• If the character set needs either of those features, it is complex.
For example,
greek
and
swe7
are simple character sets, whereas
big5
and
czech
are complex
character sets.
To use the following instructions, you must have a MySQL source distribution. In the instructions,
MYSET
represents the name of the character set that you want to add.
1. Add a
<charset>
element for
MYSET
to the
sql/share/charsets/Index.xml
file. Use the
existing contents in the file as a guide to adding new contents. A partial listing for the
latin1
<charset>
element follows:
<charset name="latin1">
<family>Western</family>
<description>cp1252 West European</description>
...
<collation name="latin1_swedish_ci" id="8" order="Finnish, Swedish">
<flag>primary</flag>
<flag>compiled</flag>
</collation>
<collation name="latin1_danish_ci" id="15" order="Danish"/>
...
<collation name="latin1_bin" id="47" order="Binary">
<flag>binary</flag>
<flag>compiled</flag>
</collation>
...
</charset>
The
<charset>
element must list all the collations for the character set. These must include at
least a binary collation and a default (primary) collation. The default collation is often named using
Содержание 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 ...