Reputation: 9794
I am trying to write a VB function to strip unwanted characters from a string. It is for generating a 'clean' url from data that has been inputted into a CMS. Someone has copied and pasted from a Word document and so there appears to be an mdash or ndash in the product title. This results in ─ appearing instead of -
I have tried a Replace(text, Chr(196), Chr(45)) but it isn't working so it can't be 196. Is there a tool or something where I can copy this character and paste it into the tool and it will tell me what char code it is?
Thanks.
Upvotes: 0
Views: 1731
Reputation: 988
You can make your program write out the Character Code using the finction Asc()
Response.write Asc("-")
would write out
45
for example.
Upvotes: 3