Php receives emoji expressions in ios and saves them to the database ????.

Source: Internet
Author: User
Php receives emoji expressions in ios and saves them to the database ????. Php receives emoji expressions in ios and saves them to the database ????. According to the Internet, the database code is changed to utf8mb4. the database version is 5.5.24. asking for advice, urgent, online, etc.


Reply to discussion (solution)

Into ???? Indicates that the encoding cannot be recognized and must be transcoded.
If you can't write
Echo base64_encode ('Emoji emojis data ');
Post result

Php receives emoji expressions in ios and saves them to the database ????. According to the Internet, the database code is changed to utf8mb4. the database version is 5.5.24. asking for advice, urgent, online, etc.
$ Base = base64_encode ("receiving emoji expressions in ios ");
5bqf6K + d54Gr6ZSF8J + Rqw = This is the result
A facial expression is recognized. $ Base = base64_encode ("? ");

Into ???? Indicates that the encoding cannot be recognized and must be transcoded.
If you can't write
Echo base64_encode ('Emoji emojis data ');
Post result
$ Base = base64_encode ("receiving emoji expressions in ios ");
5bqf6K + d54Gr6ZSF8J + Rqw = This is the result
A facial expression is recognized. $ Base = base64_encode ("? ");

Sorry, I cannot see it in my environment.
Echo "\ xf0 \ x9f \ x91 \ xab ";
What can be displayed?
If you know anything, please talk about it or paste a picture.

Sorry, I cannot see it in my environment.
Echo "\ xf0 \ x9f \ x91 \ xab ";
What can be displayed?
If you know anything, please talk about it or paste a picture.
I found an emoji for php on the internet. after converting your \ xf0 \ x9f \ x91 \ xab function, this image is used.

Then you need to replace the regular/\ xf0.../when saving the file.

Then you need to replace the regular/\ xf0.../when saving the file.
I don't know what I receive. How did your \ xf0 \ x9f \ x91 \ xab come from?

This post was last edited by xuzuning at 14:19:46

$ S = '5bqf6k + d54Gr6ZSF8J + Rqw = ';
Echo $ s = base64_decode ($ s );
Print_r (unpack ('H * ', $ s ));

/*
Get
Array
(
[1] => e5ba9fe8af9de781abe99485f09f91ab
)
Among them, e5ba9fe8af9de781abe99133 is a nonsense hot pot.
F09f91ab is the icon
The binary value of 0xf0 is 11110000
According to UTF-8 encoding rules, the number of first 1 is the number of bytes occupied
Therefore, f09f91ab is a whole.
*/

$ S = '5bqf6k + d54Gr6ZSF8J + Rqw = ';
Echo $ s = base64_decode ($ s );
Print_r (unpack ('H * ', $ s ));

/*
Get
Array
(
[1] => e5ba9fe8af9de781abe99485f09f91ab
)
Among them, e5ba9fe8af9de781abe99133 is a nonsense hot pot.
F09f91ab is the icon
The binary value of 0xf0 is 11110000
According to UTF-8 encoding rules, the number of first 1 is the number of bytes occupied
Therefore, f09f91ab is a whole.
*/
Excuse me, how did you turn the e5ba9fe8af9de781abe99485f09f91ab into a nonsense Hot Pot \ xf0 \ x9f \ x91 \ xab. How can this problem be distinguished?

Regular expression rules/\ xf0.0. ../all emoji characters can be found.
It is up to you to decide what to replace.

"\ Xf0 \ x9f \ x91 \ xab" is only a method that represents binary data in a program and cannot be used in data exchange.
For example, you can save '\ xf0 \ x9f \ x91 \ xab' to the database and then return it to \ xf0 \ x9f \ x91 \ xab, which cannot be restored to emoji characters.

Regular expression rules/\ xf0.0. ../all emoji characters can be found.
It is up to you to decide what to replace.

"\ Xf0 \ x9f \ x91 \ xab" is only a method that represents binary data in a program and cannot be used in data exchange.
For example, you can save '\ xf0 \ x9f \ x91 \ xab' to the database and then return it to \ xf0 \ x9f \ x91 \ xab, which cannot be restored to emoji characters.
In fact, I really want to know what the client sends to me. is it binary?


Regular expression rules/\ xf0.0. ../all emoji characters can be found.
It is up to you to decide what to replace.

"\ Xf0 \ x9f \ x91 \ xab" is only a method that represents binary data in a program and cannot be used in data exchange.
For example, you can save '\ xf0 \ x9f \ x91 \ xab' to the database and then return it to \ xf0 \ x9f \ x91 \ xab, which cannot be restored to emoji characters.
In fact, I really want to know what the client sends to me. is it binary?
Right



Regular expression rules/\ xf0.0. ../all emoji characters can be found.
It is up to you to decide what to replace.

"\ Xf0 \ x9f \ x91 \ xab" is only a method that represents binary data in a program and cannot be used in data exchange.
For example, you can save '\ xf0 \ x9f \ x91 \ xab' to the database and then return it to \ xf0 \ x9f \ x91 \ xab, which cannot be restored to emoji characters.
In fact, I really want to know what the client sends to me. is it binary?
Right
Then how should I match the regular expression \ xf0 \ x9f \ x91 \ xab. Please help!

Regular expression rules/\ xf0.0. ../all emoji characters can be found.
It is up to you to decide what to replace.

"\ Xf0 \ x9f \ x91 \ xab" is only a method that represents binary data in a program and cannot be used in data exchange.
For example, you can save '\ xf0 \ x9f \ x91 \ xab' to the database and then return it to \ xf0 \ x9f \ x91 \ xab, which cannot be restored to emoji characters.
Then how should I match the regular expression \ xf0 \ x9f \ x91 \ xab. Please help! How to write an expression ???

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.