Implementation of escape decoding function in JS language under PHP
[code]http://db.gamersky.com/Soft/ShowSoftDown.asp? UrlID=1&SoftID=17161[/code]
encrypted string
GB2312 Code:
[code]
.lt;? Php
function unescape. P; #d; $str, $r);
$ar = $r.#91; 0.#93;
foreach; $k.#93 = iconv (.Quot; UCS-2.quot;.Quot; GBK.quot; pack (.Quot; H4.quot; substr)). R / > >
?.gt;
UTF8 coding:
.lt; php
function unescape ($str). $val.Lt; 0x7F) $ret. = Chr ($val);
else if ($val.Lt; 0x800). {
$ret. = URLDecode (substr ($str, $i, 3));
$i = 2;
>
else $ret. =