Answer the question
In order to leave comments, you need to log in
How to properly store UNICODE character code?
I ran into a problem that when sending a message with a unicode picture (for example \xF0\x9F\x91\x8F) from pure php to the telegram bot, the user receives a picture. And if I save the image code in a separate cell, then when I get it from the database and send it to telegram, I get not a picture, but a text with a code (\xF0\x9F\x91\x8F).
image codes apps.timwhitlock.info/emoji/tables/unicode
Answer the question
In order to leave comments, you need to log in
In general, the problem becomes clearer:
var_dump($row['Unicode']);
var_dump("\xF0\x9F\x92\xA8");
string(16) "\xF0\x9F\x92\x83"
string(4) "" - the picture is displayed here, but for some reason it is not displayed in the toaster.
The question is how to convert the text stored in the database into code?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question