Oracle 5.0 Reference Manual page 2914

Table of Contents

Advertisement

MySQL 5.0 FAQ: MySQL Chinese, Japanese, and Korean Character Sets
For bug reports regarding such failures, we might ask you to follow up with
Then we can determine whether the client encoding is correct.
• Make sure that the problem is not with the browser or other application, rather than with MySQL.
Use the
client program (on Windows: mysql.exe) to accomplish this task. If
mysql
correctly but your application doesn't, then your problem is probably due to system settings.
To find out what your settings are, use the
resemble what is shown here:
mysql>
SHOW VARIABLES LIKE 'char%';
+--------------------------+----------------------------------------+
| Variable_name
+--------------------------+----------------------------------------+
| character_set_client
| character_set_connection | utf8
| character_set_database
| character_set_filesystem | binary
| character_set_results
| character_set_server
| character_set_system
| character_sets_dir
+--------------------------+----------------------------------------+
8 rows in set (0.03 sec)
These are typical character-set settings for an international-oriented client (notice the use of
Unicode) connected to a server in the West
for MySQL).
Although Unicode (usually the
to Latin, it is often not what your operating system utilities support best. Many Windows users find
that a Microsoft character set, such as
If you cannot control the server settings, and you have no idea what your underlying computer is,
then try changing to a common character set for the country that you're in
or
= People's Republic of China;
gbk
or
= anywhere). Usually it is necessary to change only the client and connection and
ucs2
utf8
results settings. There is a simple statement which changes all three at once:
example:
SET NAMES 'big5';
Once the setting is correct, you can make it permanent by editing
you might add lines looking like these:
[mysqld]
character-set-server=big5
[client]
default-character-set=big5
It is also possible that there are issues with the API configuration setting being used in your
application; see Why does my GUI front end or browser not display CJK characters correctly...? for
more information.
B.11.3: What problems should I be aware of when working with the Big5 Chinese character set?
MySQL supports the Big5 character set which is common in Hong Kong and Taiwan (Republic of
China). MySQL's
big5
character set. We changed to this character set starting with MySQL version 4.1.16 / 5.0.16 (as a result
of Bug #12476). For example, the following statements work in current versions of MySQL, but not in
old versions:
mysql>
CREATE TABLE big5 (BIG5 CHAR(1) CHARACTER SET BIG5);
SHOW VARIABLES
| Value
| utf8
| latin1
| utf8
| latin1
| utf8
| /usr/local/mysql/share/mysql/charsets/ |
variant on Unix, and the
utf8
cp932
= Taiwan; sjis, ujis, cp932, or
big5
is in reality Microsoft code page 950, which is very similar to the original
2894
statement, whose output should
(latin1
is a West Europe character set and a default
ucs2
for Japanese Windows, is suitable.
my.cnf
SELECT
HEX('ペ');.
mysql
|
|
|
|
|
|
|
|
variant on Windows) is preferable
(euckr
= Korea;
= Japan;
eucjpms
NAMES. For
SET
or my.ini. For example
displays
utf8
gb2312
big5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents