Hello,
How can I use Emoji in phpList? When I send a mail with an Emoji in it it will show like this: ???
Regards,
CD
Hello,
How can I use Emoji in phpList? When I send a mail with an Emoji in it it will show like this: ???
Regards,
CD
Hi, thanks for your reply. Yes I used the smileys before, but that is not the same as Emoji. Hope someone can help me get emoji working.
I tested emoji in my environment.
It seems emoji showing well.
phplist
mail client
I don’t have any problems with Emoji in preview mode. When I send the mail they will change to ???
And in your image you are using/ showing the smileys. I mean the Emoji’s. So please read my question in the fist post again
@CD130 Why emojis do not display properly has been discussed before on this forum. Just search to find the earlier posts.
Thanks for reply I can’t find an old discussion with the search option. Maybe I’m doing something wrong?
@CD130 Searching for “emoji” gives me several results.
Thanks, I already checked all the results and can’t find the answer how to add Emoji in a mail in phpList
Hello, @CD130
At least, you needs the following steps.
(I tried the following but I can’t store emoji properly yet. I succeed to store emoji as draft. And send a mail.)
utf8mb4
character encoding in your database. (add my.cnf
configuration)utf8mb4
instead of utf8
phpList Mantis
Specified key was too long; max key length is 767 bytes
utf8
-> utf8mb4
in public_html/lists/admin/mysqli.inc
.Emoji use four-bytes character in UTF-8 encoding.
You need to use utf8mb4
encoding instead of utf8
in your database.
like the following
show variables like '%char%';
+--------------------------+----------------------------+
| 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 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)
show create table phplist_message
....
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 // <- Not utf8
Wow!! So this works fine?? Why the makers of phpList won’t change this in the standard version? Then can everybody use Emojis in the mails
Hello, @CD130
I don’t test all features. But, I succeed to send an email with Emoji.
I’m not sure whether all user needs to use Emoji. Generally, It requires more storage space.
And, It requires a database migration. (schema change.)
It will break compatibility.
It is possible to convert a phplist installation already installed to “emoji” capable by doing the following:
To change database codification method:
ALTER DATABASE
database_name
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_unicode_ci;
To change tables codification method:
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;`
For more information about this topic:
As always, be aware that you should make backups prior to any commands that make this kind of change on the database.
Thanks @racribeiro! Definitely going to try this
@racribeiro I really appreciate your solution!
Manually encoding stopped working recently. This is the better way.
For anyone else who enabled emojis and has since upgraded, you may find some emojis save while others are converted to question marks (??).
Since mysqli.inc is replaced during an upgrade, you need to restore the changes indicated in Step 1 of the post above by @racribeiro