MySQL deposit emoji expression now for???. According to the online version of the MySQL character set to UTF8MB4, or invalid, displayed as garbled. Has anyone ever met you?
Reply to discussion (solution)
Emoji expression is an extended utf-16 encoding
You can post base64 encoded strings that contain emoji expressions.
And see if I can help you out.
Emoji expression is an extended utf-16 encoding
You can post base64 encoded strings that contain emoji expressions.
And see if I can help you out.
This is the expression base64 the data after the save. 8j+yhpcfmim=. Version * bother to look!. Now many applications support this expression input, just do not know how to save.
It should be said that instead of using the UTF8MB4 character set, I don't know why you can't.
Given that there are not many emoji characters in the text, you can replace them with a regular
$text = Base64_decode (' 8j+yhpcfmim= '); Echo $text = Preg_replace_callback ('/[\xf0-\xf7].{ 3}/', function ($r) {return ' @E '. Base64_encode ($r [0]);}, $text);
@E8J +yha== @E8J +ygw==
It's going to be a reverse conversion.
$s = Preg_replace_callback ('/@e (. { 6}==)/', function ($r) {return Base64_decode ($r [1]), ' @E8J +yha== @E8J +ygw== '); Var_dump (Base64_decode (' 8j+yhpcfmim= ') = = $s);
BOOL (TRUE)
It should be said that instead of using the UTF8MB4 character set, I don't know why you can't.
Given that there are not many emoji characters in the text, you can replace them with a regular
$text = Base64_decode (' 8j+yhpcfmim= '); Echo $text = Preg_replace_callback ('/[\xf0-\xf7].{ 3}/', function ($r) {return ' @E '. Base64_encode ($r [0]);}, $text);
@E8J +yha== @E8J +ygw==
It's going to be a reverse conversion.
$s = Preg_replace_callback ('/@e (. { 6}==)/', function ($r) {return Base64_decode ($r [1]), ' @E8J +yha== @E8J +ygw== '); Var_dump (Base64_decode (' 8j+yhpcfmim= ') = = $s);
BOOL (TRUE)
Yes, it's depressing. Online all say as long as set as UTF8MB4 on line, but mine is not. The MySQL version is 5.6 .... , Wampserver environment. Is it an environmental problem?
Landlord, I also encountered the same problem, how did you finally solve?