You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The character encoding between client and server is automatically detected upon connection (provided that the Connector/J connection properties characterEncoding and connectionCollation are not set).
As well if the server collation is not set to "utf8_general_ci" and that collation is not expected then unexpected results might occur.
In addition the documentation for useUnicode states that...
Should only be used when the driver can't determine the character set mapping, or you are trying to 'force' the driver to use a character set that MySQL either doesn't natively support.
I suggest these defaults are removed to allow the client to freely auto-detect the character set and collation from the server and avoid setting potentially unexpected and undesirable defaults.
The text was updated successfully, but these errors were encountered:
As a follow up, these current defaults actually stops utfmb4 from being used even with a properly configured MySQL v5.7 and the latest Connector/J version.
I can confirm that utf8mb4 works without these settings! Adding the following parameters to the connection URL can be a workaround (as they override the values in DBPlugin) until play's default config is changed/removed :
I can confirm that utf8mb4 works without these settings! Adding the following parameters to the connection URL can be a workaround (as they override the values in DBPlugin) until play's default config is changed/removed :
Can't start in PROD mode with errors
Database error
A database error occurred : Cannot connected to the database[default], Unsupported character encoding ''
/ play.exceptions.DatabaseException / Cannot connected to the database[default], Unsupported character encoding ''
Play Version (1.5.x / etc)
1.5.2
Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)
MacOS 10.14.4
JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
Library Dependencies
Connector/J v5.1.47
Behaviour
Play currently adds the following default parameters to the connection URL:
The Connector/J 5.1 documentation on charsets does not recommend these properties are set instead preferring...
As well if the server collation is not set to "utf8_general_ci" and that collation is not expected then unexpected results might occur.
In addition the documentation for
useUnicode
states that...I suggest these defaults are removed to allow the client to freely auto-detect the character set and collation from the server and avoid setting potentially unexpected and undesirable defaults.
The text was updated successfully, but these errors were encountered: