-
-
Notifications
You must be signed in to change notification settings - Fork 137
MySQL Supported Encoding
Ohad Shai edited this page Apr 22, 2019
·
1 revision
Out-of-the-box jasync supported those types of encoding:
UTF_8
US_ASCII
ISO_8859_1
The default one is UTF_8
.
In version 0.9.50
the encoding used for UTF-8 was changed from utf8mb3
to utf8mb4_unicode_ci
. Effectively, it allows passing UTF chars of up to 4 bytes, Including emoji's.
In case you would like to use other charsets there are 2 options:
- Configure
Charset
andCharsetMapping
via configuration and connection construction. This methods is a bit tricky but supported. You can see here the usage: https://github.com/jasync-sql/jasync-sql/blob/master/mysql-async/src/main/java/com/github/jasync/sql/db/mysql/util/CharsetMapper.kt - Add a JVM property:
-DjasyncMysqlUTF8Collation=83
(or replace 83 with the one you want to use). This will change the default encoding itself.
For more details you can see the PR: https://github.com/jasync-sql/jasync-sql/pull/115
List of unicode charsets can be seen here: https://dev.mysql.com/doc/refman/8.0/en/charset-mysql.html