FS#60164 - [bugtracker/Flyspray] Switch the database tables from utf8 to utf8mb4

Attached to Project: Arch Linux
Opened by Batou (Batou) - Saturday, 22 September 2018, 22:56 GMT
Last edited by Evangelos Foutras (foutrelis) - Thursday, 27 September 2018, 05:20 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: I've just reported a bug about emojis not displaying properly in Chromium and got an error when I hit "Add this task". I've encountered this error years ago myself and know what the root cause is. Arch's install of Flyspray backend probably uses MySQL (or one of the forks) and tables were specified as utf8. That's bad because utf8 in MySQL is not really utf8 and MySQL devs cheated and reduced the amount of bytes that you can use (only 3 instead of 4 bytes). To get proper utf8 support so all characters can be properly stored, use utf8mb4 which is the true utf8 format. That's why these weird errors pop up.

Error:

Query {INSERT INTO `flyspray_tasks` ( task_id, date_opened, last_edited_time, project_id, item_summary, detailed_desc, opened_by, percent_complete, task_type, item_status, product_category, product_version, closedby_version, operating_system, task_severity, task_priority, mark_private, due_date, closure_comment, anon_email ) VALUES .... Failed! (Incorrect string value: '\xF0\x9F\x8D\x94\x0D\x0A...' for column 'detailed_desc' at row 1)


Additional info:
N/A


Steps to reproduce:
Paste an emoji and hit "Add this task" or just comment with an emoji.
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Thursday, 27 September 2018, 05:20 GMT
Reason for closing:  Fixed
Additional comments about closing:  🤔

Loading...