1

Hey I am trying to convert this unicode :

U+1F61D

into this character:

 

But I am unable to find a suitable way to do this in php, this site https://r12a.github.io/apps/conversion/ is converting it very easily.

To solve this I follow the instruction explain in this question : How to convert Emoji from Unicode in PHP?

When I tried this code I am getting weird character. I am unable to understand how to generate surrogate.

I am using this code:

echo json_decode('"\u1F61D"');

This gives me this character:

ὡD

Here I want to generate surrogates for the above unicode so my question is different.

Community
  • 1
  • 1
  • If you're trying to use json_decode, you'll need to grab the javascript variant from that file. `json_decode('"\uD83D\uDE1D"')` gives you the emoji you want. – castis Feb 03 '17 at 18:29
  • the question is how can i do that can I do it in php –  Feb 03 '17 at 18:32

0 Answers0