View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0020109 | phpList 3 application | General | public | 01-11-19 14:32 | 02-11-19 11:17 |
Reporter | stefansal | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Product Version | 3.4.7 | ||||
Target Version | 3.4.5-RC1 | Fixed in Version | |||
Summary | 0020109: Upgrade from utf8 to utf8mb4 to store emojis in email messages | ||||
Description | In the current configuration of the MySQL database, many characters (such as emojis) cannot be stored as a message content/subject due to the usage of "utf8" instead of "utf8mb4" as the database charset. We were able to change that behavior by adapting the file "mysqli.inc" in the admin directory and replacing "utf8" with "utf8mb4" at the relevant locations. (See adapted file attached.) Of course in existing installations, the existing database collation has to be changed to "utf8mb4_unicode_ci". We used the SQL command "ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;" to achieve that. We are now able to send emails including these (now common) characters. I would suggest the inclusion of this change in the next update, to allow this functionality commonly. Best, Stefan | ||||
Tags | No tags attached. | ||||
|
mysqli.inc (14,452 bytes) |
|
This should be ok for new installations but I do not think that automatically upgrading existing databases is a good idea. There is a danger of corrupting the database. Also, I found that altering the collation of an existing database did not change the collation of the tables. When a table is created without specifying a collation then the database value is used, but later changing the database value does not cascade down. |
|
Yes, this is a nice change, but it will have to be carefully managed, to avoid data corruption. It is similar to the change we had to do from ISO-8859-1 to UTF-8, which was quite involved. It's one for a wishlist, but not immediately top of the list. |