#5855 (Jane fails to store certain unicode characters)
by Luc Saffre · in Developers · assigned to Luc Saffre
Résumé
For example the EYE symbol (U+1F441). If a rich text field contains this character, you get an error message (1366, "Incorrect string value: '\\xF0\\x9F\\x91\\x81 E...' for column `jane`.`tickets_ticket`.`description` at row 1")
Concepts sous-jacents
Commentaires
- 1 année, 9 mois ago by Luc Saffre about #5855 (Jane fails to store certain unicode characters) : Hehe, the nex EYE char in the demo fixture does it's job: the cron job on LF fails because of it. (IOW i'll remove it again because we don't want our demo sites to be broken).
- 1 année, 9 mois ago by Luc Saffre about #5855 (Jane fails to store certain unicode characters) : I also read [url 10web.io/blog/mysql-error-1366/ How to Fix MySQL Error 1366], which suggests to check:
SHOW VARIABLES LIKE 'character_set_client'; +----------------------+-------+ | Variable_name | Value | +----------------------+-------+ | character_set_client | utf8 | +---------------------... - 1 année, 9 mois ago by Luc Saffre about #5855 (Jane fails to store certain unicode characters) : And also SHOW CREATE DATABASE jane is as expected:
+----------+---------------------------------------------------------------------------------------------+ | Database | Create Database | +----------+------------------------... - 1 année, 9 mois ago by Luc Saffre about #5855 (Jane fails to store certain unicode characters) : And when I "run pm dbshell" and say "SHOW CREATE TABLE tickets_ticket;" it gives me:
tickets_ticket | CREATE TABLE `tickets_ticket` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `modified` datetime(6) DEFAULT NULL, `created` datetime(6) NOT NULL, `ref` varchar(200) DEFAULT NULL, `parent_id` bigint... - 1 année, 9 mois ago by Luc Saffre about #5855 (Jane fails to store certain unicode characters) : The only config on jane file that talks about charset and collation is /etc/mysql/mariadb.conf.d/50-server.cnf and it says:
character-set-server = utf8mb4 collation-server = utf8mb4_general_ci
which should be fine. - 1 année, 9 mois ago by Luc Saffre about #5855 (Jane fails to store certain unicode characters) : I added an EYE character to the comments demo2 fixture. The problem occurs only under MySQL. I guess that we need to read [url dev.mysql.com/doc/refman/8.4/en/charset.html Chapter 12] of the MySQL docs.
- 1 année, 9 mois ago by Luc Saffre about #5855 (Jane fails to store certain unicode characters) : Created new Ticket #5855 (Jane fails to store certain unicode characters).