I am facing certain problems with emojies like:
我面临着一些问题,例如:
- Looking for a consolidated library which can handle all the available emoji.
- It should also support all the available platforms.
- How to save quoted printed characters in the database?
寻找可以处理所有可用表情符号的统一库。
它还应该支持所有可用的平台。
如何在数据库中保存带引号的打印字符?
Looking for someone who can answer these question or help me out.
寻找可以回答这些问题或帮助我的人。
Thanks,
1 个解决方案
#1
If you will store the emoji in a MySQL table, you will need CHARACTER SET utf8mb4
. In PHP, use set_charset('utf8mb4') if you are using mysqli_*
, or add specify that charset in the dsn if using PDO. If using html, have a meta tag that specifies utf-8
.
如果要将表情符号存储在MySQL表中,则需要CHARACTER SET utf8mb4。在PHP中,如果使用mysqli_ *,请使用set_charset('utf8mb4'),或者如果使用PDO,则在dsn中添加指定charset。如果使用html,请使用指定utf-8的元标记。
#1
If you will store the emoji in a MySQL table, you will need CHARACTER SET utf8mb4
. In PHP, use set_charset('utf8mb4') if you are using mysqli_*
, or add specify that charset in the dsn if using PDO. If using html, have a meta tag that specifies utf-8
.
如果要将表情符号存储在MySQL表中,则需要CHARACTER SET utf8mb4。在PHP中,如果使用mysqli_ *,请使用set_charset('utf8mb4'),或者如果使用PDO,则在dsn中添加指定charset。如果使用html,请使用指定utf-8的元标记。