Esto es lo mismo que tu código pero usando expresiones regulares
Código:
Sub comprobar()
Dim c, x
c = Request.Form("campo")
x = limpiar(f,"[\.\,\_\-\;\:?¿!¡\ ]")
End Sub
Function limpiar(texto, patron)
Dim t
t = texto
If len(t)>0 Then
Set RegularExpressionObject = New RegExp
With RegularExpressionObject
.Pattern = patron
.IgnoreCase = True
.Global = True
End With
t = RegularExpressionObject.Replace(t, "")
Set RegularExpressionObject = nothing
End If
limpiar = t
End Function
Prueba ahora a cambiar el patron por este: " [0-9a-fxA-FX][0-9a-fxA-FX]" Y pasaselo a una cadena hexadecimal.
:)
Un saludo