[wp-trac] [WordPress Trac] #35293: Emoji Regex in wp_encode_emoji() is wildly inaccurate

WordPress Trac noreply at wordpress.org
Mon Sep 25 05:27:00 UTC 2017


#35293: Emoji Regex in wp_encode_emoji() is wildly inaccurate
-------------------------------------+--------------------------
 Reporter:  pento                    |       Owner:  pento
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  4.9
Component:  Emoji                    |     Version:  4.2
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  performance
-------------------------------------+--------------------------

Comment (by pento):

 Replying to [comment:44 peterwilsoncc]:
 > I was able to recreate the above forcing `wpdb:has_cap( 'utf8mb4' )` to
 return `false`, ie forcing the database to use utf8.

 I can reproduce this behaviour like this, but I can't reproduce it if it I
 also convert the `wp_posts.post_content` character set to `utf8`.
 `wp_insert_post` HTML encodes the character according to the
 `post_content` field character set, not the DB connection character set.
 Things are going to get weird if your connection is `utf8` but your
 database is `utf8mb4`, just like it does with any mis-matched
 connection/storage character sets.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35293#comment:45>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list