[wp-trac] [WordPress Trac] #27961: Twitter auto-embed fails if tweet contains Emoji icon
WordPress Trac
noreply at wordpress.org
Tue Apr 22 02:08:30 UTC 2014
#27961: Twitter auto-embed fails if tweet contains Emoji icon
--------------------------+------------------------
Reporter: MortimerCat | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Embeds | Version: 3.9
Severity: normal | Resolution: duplicate
Keywords: needs-patch | Focuses: ui
--------------------------+------------------------
Changes (by johnbillion):
* status: new => closed
* resolution: => duplicate
* milestone: Awaiting Review =>
Comment:
Replying to [comment:1 Viper007Bond]:
> This might be a post meta bug.
I've researched this before and the core issue is that emojis are
represented by four bytes, but MySQL's standard UTF-8 character sets can't
handle four byte characters. This results in serialized data in the
database being corrupt if it contains an emoji.
The correct solution is to switch to a `utf8mb4` character set. This is
covered in #21212.
The ugly workaround for plugins interacting with the Twitter API (good
luck) is to base64 encode tweets before storing them in the database,
rather than relying on WordPress' built-in serialization and
unserialization.
Closing as a dupe for now, however it would be great to reopen this to
address is separately if anyone has any good ideas which don't overlap
with #21212.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27961#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list