Two-dimensional code
After scanning, parsing is garbled.
After the UrlEncode is the following content
%c2%b0%c3%99%c2%b6%c3%88%c2%b0%c3%99%c2%bf%c3%86%c2%a3%c2%ad%c2%b6%c3%be%c3%8e%c2%ac%c3%82%c3%ab%c2%b4%c3%8a% C3%8c%c3%b5
I use scans to parse, but I can.
Content is "Baidu encyclopedia-two-dimensional code entry"
Is this code processed? How do you get the real results?
Reply to discussion (solution)
Http://cli.im/deqr
Using this parser is also
$s = '%c2%b0%c3%99%c2%b6%c3%88%c2%b0%c3%99%c2%bf%c3%86%c2%a3%c2%ad%c2%b6%c3%be%c3%8e%c2%ac%c3%82%c3%ab%c2%b4%c3% 8a%c3%8c%c3%b5 '; $s = urldecode ($s); Echo utf8_decode ($s);
Baidu Encyclopedia-two-dimensional code entry
The solved string is GBK encoded.
The great God appeared to solve the problem immediately,
Now there is a question, how should I judge when should use Utf8_decode?
So you can see that, okay?
$s = '%c2%b0%c3%99%c2%b6%c3%88%c2%b0%c3%99%c2%bf%c3%86%c2%a3%c2%ad%c2%b6%c3%be%c3%8e%c2%ac%c3%82%c3%ab%c2%b4%c3% 8a%c3%8c%c3%b5 '; $s = urldecode ($s), if (mb_check_encoding (' Utf-8 ')) { $n = 0; for ($i =0; $i
strlen ($s)/2 * 0.8) $s = utf8_decode ($s);} echo $s;
In fact, the number of%c in the original string is the same.
I have just tried to use Mb_detect_encoding (Utf8_decode (' Assad asda ') = = ' ASCII ' to judge the need for
I don't know if this is accurate.