public function convertasc(strin)
dim i
convertasc = “”
for i=1 to len(strin)
dim c: c = asc(mid(strin, i, 1))
if abs(c)<128 then
convertasc = convertasc & chrb(c)
else
dim h: h = hex(c)
convertasc = convertasc & chrb(int(“&h” & mid(h, 1, 2)))
convertasc = convertasc & chrb(int(“&h” & mid(h, 3, 2)))
end if
next
end function
dim a: a = convertasc(“hello world!”)
dim b: b = convertasc(“世界你好!”)
response.binarywrite a + b