I use MySQL DB connected to ReTool. The table configured with utf8mb4_unicode_ci but I also tried with utf8_unicode_ci.
When I updated a cell with cyrillic text Контролер кольорового графічного дісплею (Ukrainian language), it successfully updated in the database but in the Retool I see РљРѕРЅС‚СЂРѕР»РµСЂ РєРѕР»СЊРѕСЂРѕРІРѕРіРѕ РіСЂР°С„С–С‡РЅРѕРіРѕ РґС–СЃРїР»РµСЋ
How to fix it?
I added Контролер кольорового графічного дісплею directly into a table in my db (Retool database) and selected it using a query and it works as expected....
When you run the query to get the data, what is the result?
It because my SQL server have v.5.7
After all, utf8mb4 is known to the 8.0 client and the 5.7 server, so both of them recognize it. To understand this behavior, it is necessary to understand that when the client tells the server which character set it wants to use, it really tells the server the default collation for that character set. Therefore, the aforementioned behavior occurs due to a combination of factors:
The default collation for utf8mb4 differs between MySQL 5.7 and 8.0 (utf8mb4_general_ci for 5.7, utf8mb4_0900_ai_ci for 8.0).
When the 8.0 client requests a character set of utf8mb4, what it sends to the server is the default 8.0 utf8mb4 collation; that is, the utf8mb4_0900_ai_ci.
utf8mb4_0900_ai_ci is implemented only as of MySQL 8.0, so the 5.7 server does not recognize it.
Because the 5.7 server does not recognize utf8mb4_0900_ai_ci, it cannot satisfy the client character set request, and falls back to its default character set and collation (latin1 and latin1_swedish_ci).