回复 10楼 sdta
老师,真是太厉害了
有些学校的“类中所含专业”数据不完整
查看了源代码也有注释:<!-- 用jstl的fn标签库对传过来的专业中的'、'进行替换成<br/> -->
这部分数据只转存了254个字符,有缺失或有乱码字符
如:
mc = "北京大学" ? mc bm1 = encodeURI(mc) ? "一次编码:"+bm1 bm2 = encodeURI(bm1) ? "二次编码:"+bm2 ? "一次解码:"+decodeURI(bm2) ? "二次解码:"+decodeURI(decodeURI(bm2)) RETURN FUNCTION encodeURI(cUnencoded) LOCAL jsCode, oSC TEXT TO jsCode TEXTMERGE NOSHOW PRETEXT 7 function encode(unencoded) { return encodeURIComponent(unencoded).replace(/'/g,"%27").replace(/"/g,"%22"); } ENDTEXT oSC = CREATEOBJECT("ScriptControl") oSC.Language = "JavaScript" oSC.AddCode(jsCode) RETURN oSC.run("encode", cUnencoded) ENDFUNC FUNCTION decodeURI(cEncoded) LOCAL jsCode, oSC TEXT TO jsCode TEXTMERGE NOSHOW PRETEXT 7 function decode(encoded) { return decodeURIComponent(encoded.replace(/\+/g, " ")); } ENDTEXT oSC = CREATEOBJECT("ScriptControl") oSC.Language = "JavaScript" oSC.AddCode(jsCode) RETURN oSC.run("decode", cencoded) ENDFUNC