-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Feature: Set collation method alongside charset #727
Comments
Seems another SQL driver can do it 😄 https://github.com/go-sql-driver/mysql#collation |
Noticed it in the code for this project, pretty sure other SQL drivers handle it correctly. It's a running issue with people assuming defaults for connections and drivers are sane (they're not.. go's http.Client is a good example). Especially when it comes to character sets and collations for SQL connections (never mind the fun with mariadb vs mysql). So if I see one where it's incorrect, it gets mentioned and left for people to find and see if it's been fixed if they run into the same problem. Sadly I don't often have the time to send in a PR to fix it myself. |
I think this has been implemented since this issue was filed. See https://github.com/go-mysql-org/go-mysql?tab=readme-ov-file#collation and the PRs mentioning "collation". @lance6716 @atercattus If any of you agree than we can close this |
closed by #885 |
When creating a connection to the DB you also want to frequently ensure the correct collation method is used in addition to the character set.
ie.
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
vs.
SET NAMES utf8mb4 COLLATE utf8mb4_general_ci
etc.
The text was updated successfully, but these errors were encountered: