hc98br
ISP
- Aug 14, 2003
- 46
Hi, I'm having difficulty finding a solution to this problem, any help would be wonderful!!
I have some text that has loads of non-ascii characters in it - and I want to take them out, and have found the following code which works lovely!!:
Problem is I don't just want to lose the rouge characters, I want to convert them into HTML friendly character codes (e.g. ⃻ and I'm at a loss.
I tried, objRegExp.Replace(dataRS("description"), Asc("$&")), but it just returns the code of the $.
Many thanks in advance
Ben.
I have some text that has loads of non-ascii characters in it - and I want to take them out, and have found the following code which works lovely!!:
Code:
Dim newDesc
Set objRegExp = New RegExp
objRegExp.Global = True
objRegExp.IgnoreCase = True
objRegExp.Pattern = "[^\x20-\x7E]"
newDesc = objRegExp.Replace(dataRS("description"), "")
Problem is I don't just want to lose the rouge characters, I want to convert them into HTML friendly character codes (e.g. ⃻ and I'm at a loss.
I tried, objRegExp.Replace(dataRS("description"), Asc("$&")), but it just returns the code of the $.
Many thanks in advance
Ben.