Weird characters breaks creating ticket

Moderator: crythias

Post Reply
sakul123
Znuny newbie
Posts: 13
Joined: 14 Mar 2017, 07:19
Znuny Version: OTRS 3/4/5
Real Name: Sakul

Weird characters breaks creating ticket

Post by sakul123 »

Hello,

I have issue when there is a special characters like emoji (like smiley, heart break, angry etc) or Chinese language, otrs fails to create article.
We are using mysql enter prise edition and using utf8mb4 character set.

mysql Ver 14.14 Distrib 5.7.18, for Linux (x86_64) using EditLine wrapper

Code: Select all

mysql> SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
+--------------------------+--------------------+
| Variable_name            | Value              |
+--------------------------+--------------------+
| character_set_client     | utf8mb4            |
| character_set_connection | utf8mb4            |
| character_set_database   | utf8mb4            |
| character_set_filesystem | binary             |
| character_set_results    | utf8mb4            |
| character_set_server     | utf8mb4            |
| character_set_system     | utf8               |
| collation_connection     | utf8mb4_unicode_ci |
| collation_database       | utf8mb4_unicode_ci |
| collation_server         | utf8mb4_unicode_ci |
+--------------------------+--------------------+
10 rows in set (0.00 sec)

I get this error

Code: Select all

Incorrect string value: '\xF0\x9F\x91\xBD\xF0\x9F...' for column 'a_body' at row 1, SQL: 'INSERT INTO article (ticket_id, article_type_id, article_sender_type_id, a_from, a_reply_to, a_to, a_cc, a_subject, a_message_id, a_message_id_md5, a_in_reply_to, a_references, a_body, a_content_type, content_path, valid_id, incoming_time, create_time, create_by, change_time, change_by) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
        '2017-08-01 04:19:41'
    , ?,
        '2017-08-01 04:19:41'
    , ??)'
Any help on this is much appreciated.

Thanks in advance
You do not have the required permissions to view the files attached to this post.
Thanks
Best Regards
Sakul
OTRS 3/4/5 Centos/RHEL/Ubuntu/Fedora Mysql
Post Reply