Oracle 5.0 Reference Manual page 2099

Table of Contents

Advertisement

and newer, and
automatically uses the encoding specified by the server. For more information, see
"Server Character Set and
For example, to use 4-byte UTF-8 character sets with Connector/J, configure the MySQL server with
character_set_server=utf8mb4
connection string. Connector/J will then autodetect the UTF-8 setting.
To override the automatically detected encoding on the client side, use the
property in the URL used to connect to the server.
To allow multiple character sets to be sent from the client, use the UTF-8 encoding, either by
configuring
through the
When specifying character encodings on the client side, use Java-style names. The following table lists
MySQL character set names and the corresponding Java-style names:
Table 20.26. MySQL to Java Encoding Name Translations
MySQL Character Set Name
ascii
big5
gbk
sjis
cp932
gb2312
ujis
euckr
latin1
latin2
greek
hebrew
cp866
tis620
cp1250
cp1251
cp1257
macroman
macce
utf8
ucs2
20.3.5.5. Connecting Securely Using SSL
Connector/J (JDBC) Reference
character_set
Collation".
as the default server character set, or by configuring the JDBC driver to use UTF-8
utf8
characterEncoding
Warning
Do not issue the query
detect that the character set has changed, and will continue to use the character
set detected during the initial connection setup.
system variable for server versions older than 4.1.0. The driver
[443], and leave
characterEncoding
property.
Java-Style Character Encoding Name
US-ASCII
Big5
GBK
SJIS (or Cp932 or MS932 for MySQL
Server < 4.1.11)
Cp932 or MS932 (MySQL Server >
4.1.11)
EUC_CN
EUC_JP
EUC_KR
Cp1252
ISO8859_2
ISO8859_7
ISO8859_8
Cp866
TIS620
Cp1250
Cp1251
Cp1257
MacRoman
MacCentralEurope
UTF-8
UnicodeBig
with Connector/J, as the driver will not
set names
2079
Section 10.1.3.1,
out of the Connector/J
characterEncoding

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents