-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Problem with utf8mb4_polish_ci #1286
Comments
Please provide a reproducible example. |
Table: The same insert to the same database (even the same query) from other app (PHP) is working properly. I'm working on samll, integration app in Go. The first thought was about XML, because my integration app is processing a lot of XML files. But no - I'm also trying just type query like in example in db.Exec() above. |
SOLVED on Go Programming Language Facebook group. Reason - my new local environment was not set properly and I had to check charset on PHP's MySQL session etc. and I found many differences between server and local env and that was the problem. So - everything was ok with go-sql-driver. |
Hi. At first - sorry for my english level. I have similar problem to #745 but in my case
SELECT @@collation_connection
returns proper collation. My tables / columns were corectly created (charset=utf8mb4, collation=utf8mb4_polish_ci).Anyway, queries like this:
insert, err := db.Exec("INSERT INTO podstawowe_dostawcze (id_podstawowe, rodzaj_ogloszenia) VALUES (NULL, 'sprzedaż')")
gives me sprzeda? instead of sprzedaż.
I don't have this problem within my app (PHP). I choosed Go for small app for integration (my PHP app with external company's app), because there is a lot of data to process, so PHP is not best choice for something like that. But I'm a begginer in Golang world, so maybe that wasn't best choice either. :D
To sum up - I can't see polish characters when I'm inserting data to database through go-sql-driver.
go version go1.17.2 windows/amd64
MySQL 5.7.31
[email protected]
Windows 10
The text was updated successfully, but these errors were encountered: