在PHP中如何删除表情符号代码?
问题描述:
用户有时会在我的BBS中输入一些表情符号,但是我使用的是MySQL 5.0版,该版本无法存储表情符号代码(作为UTF).
Users sometimes input some emoji in my BBS, but I am using MySQL version 5.0 which cannot store emoji code (as UTF).
我现在无法将MySQL升级到5.5,因此,有什么安全的方法可以过滤表情符号代码吗?
I can not upgrade MySQL to 5.5 right now, so is there any safe way to filter the emoji code?
答
首先,我不知道如何删除表情符号代码.
First, I don't know how to remove emoji code.
如果无法升级到mysql5.5,则使用blob
类型存储文本将解决您的问题.
If you can't upgrade to mysql5.5, storing your text using the blob
type will resolve your problem.