How do I handle MySQL word symbols?
How do I handle MySQL word symbols?
The MySQL field is text, the word symbol will be automatically disconnected from here, the contents of the following cannot be put into storage. Using the Addslashes function is not valid.
The word symbol is the character that is finer than the mouth word, does not know whether it is garbled or cannot be displayed.
------to solve the idea----------------------
$s = ' 44cq6iup55czvevbteidtuwon+ibi+ ezvewpjemmipcfmyjwn5mi44cr5pys5p2l6yo96kab552h5lqg44cc56qb54s25p2l5lqg6io25y6f6jul55m955qe5y+n6aai8j+ Ygvcfmillpkfljyrlpjznmotvvizkvadov5norqnnvqtph4znmotnllfku6pnkibku6zmgi7kuyjmtlvwn5iz5y2b5lqu5asp55qe5pwi5p6c77ym5bcx5piv 6l+z5lmi54mb6yc84pym54wn6l+z5liq6lal5yq/5lil5y6777ym5lia5liq55ax56il5lin5q2i5asn5lia5liqy3vw5lqg5zcn8j+ysei/ mewwseayr+idtuwon+ibi+ezves4uuwvpei/mes5ioebq+eahoaev+aej++8gfcfkyrwn5gk5lia55ax56il5peg5pwi6yca5qy+ 77yb5bcx5piv5pyj5bqv5rcu4pymd2vpegluonn1bglumdkwoa== ';
$s = base64_decode ($s);
Echo $s, php_eol;
Preg_match_all ('/./u ', $s, $m);
Print_r ($m [0]);
Echo Bin2Hex ($m [0][13]);
f09f9988
This is a emoji emoji and needs to be set to UTF8MB4 to save
If your MySQL version is low and does not support UTF8MB4, you can change it by string substitution
Before warehousing
$text = Preg_replace_callback ('/[\xf0-\xf7].{ 3}/', function ($r) {return [email protected] '. Base64_encode ($r [0]);}, $text);
Get out of the library and change it back.