I have setup a twiml app in twillio which forward/post all sms (which came to my twillio number) to a domain .
On that domain i can get message body.issue is when some one send emojis in SMS .
for this i did json_encode($sms->body); which show me emojis like this.
“u263aud83dude00ud83dude01ud83dude02ud83dude03” (these are some emojis which came through SMS)
i did json_decode() as well for above text but it not shows me correct emojis icons. it shows like this (☺😀ðŸ˜ðŸ˜‚😃)
Which encoding or decoding i should use please help me.
2
Answers
You just need to follow these steps 1. make sure you have set header("Content-Type: text/html; charset=utf-8"); 2. use this method
it will shows you the emojis icons
See first of all check in your database Collation and set utf8_general_ci after that check your table Collation and set utf8_unicode_ci OR utf8_general_ci