var str:String = "中文字符";
var encodeStr:String = encodeURI(str)
var decodeStr:String = decodeURI(encodeStr);
trace(encodeStr);//输出:%E4%B8%AD%E6%96%87%E5%AD%97%E7%AC%A6
trace(decodeStr);//输出:中文字符
var escapeStr:String = escape(str)
var unescapeStr:String = unescape(escapeStr);
trace(escapeStr);//输出:%u4E2D%u6587%u5B57%u7B26
trace(unescapeStr);//输出:中文字符
trace(unescape(encodeStr));//输出:????????????(乱码)
trace(decodeURI(escapeStr));//报错:URIError: Error #1052: 传递给 decodeURI 函数的 URI 无效。