From 11c1f8499d1cd5d0909f3cb88626618c5761d195 Mon Sep 17 00:00:00 2001 From: Jens Schulze Date: Wed, 17 Feb 2016 13:15:51 +0100 Subject: [PATCH] If character doesn't match, append Variation Selector U+FE0F, and try again --- lib/php/src/Client.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/php/src/Client.php b/lib/php/src/Client.php index 9938b0167..4c6417db0 100644 --- a/lib/php/src/Client.php +++ b/lib/php/src/Client.php @@ -355,11 +355,16 @@ public function toShortCallback($m) if (!in_array($unicode, $unicode_replace)) { - $unicode = substr($m[1], 0, 4); + $unicode .= "\xEF\xB8\x8F"; if (!in_array($unicode, $unicode_replace)) { - return $m[0]; + $unicode = substr($m[1], 0, 4); + + if (!in_array($unicode, $unicode_replace)) + { + return $m[0]; + } } }