'此函数生成简体字库
function gb()
dim i,j,r,t
r=""
for i=161 to 247
for j=&Ha1 to &Hfe
r=r&chr("&H" & hex(i) & hex(j))
next
r=r&chr(13)&chr(10)
next
gb=r
end function
繁體字庫
save "big5.txt",big5()
function big5()
dim i,j,r,t
r=""
for i=&H81 to &HFE
for j=&HA1 to &HFE
r=r&chr("&H" & hex(i) & hex(j))
next
for j=&H40 to &H7E
r=r&chr("&H" & hex(i) & hex(j))
next
r=r&chr(13)&chr(10)
next
big5=r
end function
function save(filename,str)
dim fs
set fso=server.createobject("scripting.filesystemobject")
set fs=fso.createTextFile(server.mappath(filename),true,true)
fs.write str
fs.close
set fso=nothing
set fs=nothing
end function
困扰了我二整天一整夜的问题,终于得到了解决。
受到cooly大侠的启发,终于知道了chr函数原来还可以返回汉字
调用格式 chr([hex_value])
hex_value:必须是16进制数字 形式如:&H后跟具体数字
如:&HFFFE表示 65534
简体转繁体的函数大概是很难出来了。