I am receiving messages from Facebook Messenger to my PHP server.
I json_decode
the request like this:
$facebookRequest = json_decode( file_get_contents('php://input'), true );
After that, the emojis in the text all come out as these strange characters, and not as Hex or Unicode formats.
The characters don't even post correctly here so here is a screenshot of them:
that's from a simple smiley face.
Now I can reverse the text through json_encode
then I get: \u00f0\u009f\u0098\u0080
.
Is there a better way to handle emojis passing through json_decode
?