欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

asp下为什么韩文字后面显示分号?

程序员文章站 2022-06-17 14:26:31
复制代码 代码如下:function htmlencode(fstring) fstring=replace(fstring,";",";") fstring=re...
复制代码 代码如下:

function htmlencode(fstring)
fstring=replace(fstring,";",";")
fstring=replace(fstring,"<","<")
fstring=replace(fstring,">",">")
fstring=replace(fstring,"\","\")
fstring=replace(fstring,"--","--")
fstring=replace(fstring,chr(9)," ")
fstring=replace(fstring,chr(10),"<br>")
fstring=replace(fstring,chr(13),"")
fstring=replace(fstring,chr(22),"")
fstring=replace(fstring,chr(32)," ")
fstring=replace(fstring,chr(34),""")'双引号
fstring=replace(fstring,chr(39),"'")'单引号
fstring=replacetext(fstring,"([0-9]*);","$1;") '解决韩文字符问题
if issqldatabase=0 then '过滤片假名(日文字符)[\u30a0-\u30ff] by yuzi首创
fstring=escape(fstring)
fstring=replacetext(fstring,"%u30([a-f][0-f])","0$1;")
fstring=unescape(fstring)
end if
htmlencode=fstring
end function