Function MakeSafeName(ByVal sString)
Dim i, c, sNewString
sString = Trim(LCase(sString))
Const sSpec = "öåä&üéèáà/\$£*"
Const sConv = "oaaoueeaa--SLx"
For i = 1 To Len(sSpec)
sString = Replace(sString, Mid(sSpec, i, 1), Mid(sConv, i, 1))
Next 'i
For i = 1 To Len(sString)
c = Mid(sString, i, 1)
Select Case c
Case "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", _
"k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", _
"v", "w", "x", "y", "z", "_", "-", _
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
sNewString = sNewString & c
Case Else
sNewString = sNewString & "x"
End Select
Next 'i
MakeSafeName = sNewString
End Function
Response.Write MakeSafeName("fkfk#%/%;åäö")