2017动漫10月新番列表:怎么样把网页内的内容批量的进行Unicode编码

来源:百度文库 编辑:神马品牌网 时间:2024/05/12 06:39:51
怎么样把网页内的内容批量的进行Unicode编码,有工具或者办法的推荐下,谢谢!
有不有类似的工具?手动麻烦,太多文件了!

先把网页的内容定义到一个比如page里面~

也就是说只有而且必须到
<%=page%>才输出网页的全部代码
那么定义unicode函数然后进行编码

<%
function chinese2unicode(Str)
dim i
dim Str_one
dim Str_unicode
if(isnull(Str)) then
exit function
end if
for i=1 to len(Str)
Str_one=Mid(Str,i,1)
Str_unicode=Str_unicode&chr(38)
Str_unicode=Str_unicode&chr(35)
Str_unicode=Str_unicode&chr(120)
Str_unicode=Str_unicode& Hex(ascw(Str_one))
Str_unicode=Str_unicode&chr(59)
next
chinese2unicode=Str_unicode
end function
%>
<%=chinese2unicode(page)%>