因为chrome 同内核的浏览器会把URL编码为UTF8,MSIE 默认不会,所以先要判断一下
int count = 0;
for (int i = 0; i < referer_orign.size(); i++)
{
if (referer_orign[i] == '%')
{
++count;
}
if (count >= 3)
{
//if (referer_orign.find("MSIE") == string::npos || referer_orign.find("msie") == string::npos)
params = Utils::decodeURL(params);//decode for utf-8
break;
}
}
基本思路是吧 UTF8转换为UTF16(Unicode) 再转换为ASCII
网页脚本login.lua
local t={};
function t:doRequest(p)
local name = p["name"];
if name=="我" then
return "用户:"..name .." 登陆 成功 " ;
end
return "用户:"..name .." 登陆 失败 " ;
end
return t;