<%Language="VBScript"%>

<%Session.LCID=1033
myText = "dette er en test...anna"
x=Text2Ascii(myText)
y=Ascii2Text(x)

response.write "Orginaltext:[" & myText & "]"
response.write "ASCII-kod:[" & x & "]"
response.write "Tillbaka till orginaltext:[" & y & "]"

Function Text2Ascii(Texten)
ascii-sträng
 Textlen = Len(Texten)
 For p = 1 To Textlen
 If p <> Textlen Then separator = "," Else separator = ""
 tmp = tmp & Asc(Mid(Texten, p, 1)) & separator
 Next
 Text2Ascii = tmp
End Function

Function Ascii2Text(Texten)
textsträng
 tmpArray = Split(Texten, ",")
 For p = 0 To UBound(tmpArray)
 tmp = tmp & Chr$(tmpArray(p))
 Next
 Ascii2Text = tmp
End Function
%>

Skrevet av Sindre Mathisen 2001