Incorrect string value for MariaDB + utf8mb4 + utf8mb4_uca1400_ai_ci
0
votes
1
answer
655
views
> Incorrect string value:
> \\\'\\\\xCD\\\\xCF\\\\xD7\\\\xA7\\\\xC9\\\\xFA...\\\
Everything on my server should be
Every time I do a server migration I run the following:
SET CHARACTER SET 'utf8';
SET collation_connection = 'utf8mb4_uca1400_ai_ci';
SET GLOBAL collation_connection = 'utf8mb4_uca1400_ai_ci';
SET GLOBAL collation_database = 'utf8mb4_uca1400_ai_ci';
SET GLOBAL collation_server = 'utf8mb4_uca1400_ai_ci';
The
utf8mb4
and utf8mb4_uca1400_ai_ci
so let's go through everything.
My my.ini
file on Windows 10 for MariaDB 11.4.2:
[mysql]
default-character-set = utf8mb4
[mysqld]
datadir=C:/WAMP/MariaDB/data
port=3306
innodb_buffer_pool_size=50M
character-set-server=utf8mb4
character-set-client-handshake = FALSE
collation-server = utf8mb4_uca1400_ai_ci
general-log
general-log-file=C:/WAMP/MariaDB/logs/queries.log
[client]
default-character-set = utf8mb4
port=3306
plugin-dir=C:\WAMP\MariaDB/lib/plugin
The local query I use to verify character sets and collations:
SELECT LOWER(VARIABLE_NAME) AS variable_name
,
GLOBAL_VALUE AS global_value
,
DEFAULT_VALUE AS default_value
FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES
WHERE VARIABLE_NAME LIKE '%CHARACTER_SET_%'
OR VARIABLE_NAME LIKE '%COLLATION_%'
ORDER BY VARIABLE_NAME
ASC;

SHOW CREATE DATABASE
returns in utf8mb4
and utf8mb4_uca1400_ai_ci
.
The column associated with the error uses utf8mb4_uca1400_ai_ci
.
This is for an email message with the subject "[标题]Satisfy all your fantasies about Xianxia's hand tour." 🙄︀ I'm guessing something got lost in translation. I don't have everything maxed out on character sets and collations though I think I've covered most things. So...
What have I not yet correctly set for character sets and/or collation and how do I go about ensuring that everything possible is set to utf8mb4
and utf8mb4_uca1400_ai_ci
?
Asked by John
(769 rep)
Jan 5, 2025, 09:17 AM
Last activity: Jan 7, 2025, 03:09 PM
Last activity: Jan 7, 2025, 03:09 PM