[code]<script>
function chinesefromutf8url(strutf8)
{
var bstr = "";
var noffset = 0;
// processing point on strutf8
if( strutf8 == "" )
return "";
strutf8 = strutf8.tolowercase();
noffset = strutf8.indexof("%e");
if( noffset == -1 )
return strutf8;
while( noffset != -1 )
{
bstr += strutf8.substr(0, noffset);
strutf8 = strutf8.substr(noffset, strutf8.length - noffset);
if( strutf8 == "" ¦ ¦ strutf8.length < 9 ) // bad string
return bstr;
bstr += utf8codetochinesechar(strutf8.substr(0, 9));
strutf8 = strutf8.substr(9, strutf8.length - 9);
noffset = strutf8.indexof("%e");
utf-8编码转换成gb2312
内容版权声明:除非注明,否则皆为本站原创文章。