Home >Backend Development >PHP Tutorial >Implementation of utf8 encoding in php
As shown below, I am looking for an implementation method. I have searched in many places, but the encoding is wrong. The code itself is utf8 encoded. How to implement utf8 encoding of strings? ? ?
As shown below, I am looking for an implementation method. I have searched in many places, but the encoding is wrong. The code itself is utf8 encoded. How to implement utf8 encoding of strings? ? ?
The htmlentities function converts characters into HTML entities
html_entity_decode converts HTML entities back into charactersecho html_entity_decode('哈');
//ha
The UTF-8 conversion in chinaz is wrong, it is actually unicode
This can be done like this. You enter the Chinese characters you want to convert in the Baidu input box, then search, copy the URL of the current address box, and paste it into the text document. What follows wd is the UTF-8 encoding of the Chinese characters. Each byte is separated by %, and general Chinese characters are encoded in 3 bytes.