Skip to content

Commit 9355039

Browse files
committed
server: changes default encoding from UTF8_GENERAL_CI to UTF8MB4_UNICODE_CI
http://stackoverflow.com/a/766996/977422
1 parent bd413f3 commit 9355039

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ When establishing a connection, you can set the following options:
194194
* `password`: The password of that MySQL user.
195195
* `database`: Name of the database to use for this connection (Optional).
196196
* `charset`: The charset for the connection. This is called "collation" in the SQL-level
197-
of MySQL (like `utf8_general_ci`). If a SQL-level charset is specified (like `utf8mb4`)
198-
then the default collation for that charset is used. (Default: `'UTF8_GENERAL_CI'`)
197+
of MySQL (like `utf8mb4_unicode_ci`). If a SQL-level charset is specified (like `utf8mb4`)
198+
then the default collation for that charset is used. (Default: `'UTF8MB4_UNICODE_CI'`)
199199
* `timezone`: The timezone used to store local dates. (Default: `'local'`)
200200
* `connectTimeout`: The milliseconds before a timeout occurs during the initial connection
201201
to the MySQL server. (Default: `10000`)

lib/ConnectionConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function ConnectionConfig(options) {
5353
this.maxPacketSize = 0;
5454
this.charsetNumber = (options.charset)
5555
? ConnectionConfig.getCharsetNumber(options.charset)
56-
: options.charsetNumber||Charsets.UTF8_GENERAL_CI;
56+
: options.charsetNumber||Charsets.UTF8MB4_UNICODE_CI;
5757

5858
// Set the client flags
5959
var defaultFlags = ConnectionConfig.getDefaultFlags(options);

0 commit comments

Comments
 (0)