-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use utf8mb4 as default encoding #1127
Conversation
@@ -855,7 +855,7 @@ public function getDB($test = false) { | |||
} | |||
else { | |||
global $CONN; | |||
$dsn = 'mysql:dbname=' . $CONN['db'] . ";host=" . $CONN['server'] . ";port=" . $CONN['port'] . ";charset=utf8"; | |||
$dsn = 'mysql:dbname=' . $CONN['db'] . ";host=" . $CONN['server'] . ";port=" . $CONN['port'] . ";charset=utf8mb4"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment with the following comment:
# The utf8mb4 is here to force php to connect with utf8, so you can save emoji's or other non ascii chars into the database. If you are running into issues with this line, we could make this configurable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add an item to the changelog.md, you might need to create a header here for the new version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
* FIXED error for unsupported php 8.4 in xdebug (#1134) * FIXED error for unsuported php 8.4 version by upgrading xdebug to version 3.4.0beta1 * temporarily fix by disabling php 8.4 deprecation warnings in apiv2 * Fixed preprocessor skip command bug. (#1126) * Fixed preprocessor skip command bug. * Added changelog entry. * Updated changelog entry version. * Use utf8mb4 as default encoding (#1127) * Use utf8mb4. * Added comment, added changelog entry. --------- Co-authored-by: jessevz <[email protected]> --------- Co-authored-by: gochujang-c <[email protected]>
utf8 defaults to utf8mb3, which can only handle a subset of Unicode. An example which fails is:
If you create a hashlist with this md5 hash and try to import the solution as a pre-crack, you get the following error:
Seems that clients since version 8.0 use this as the default, so removing it from the connection string would then work automatically, but perhaps keep it explicit/other use case?
For changing it server side (if necessary), you could add something like the following to
/etc/my.cnf
:and restart the server.