Results 1 to 11 of 11
Apr 14, 2011, 09:08 #1
- Join Date
- Apr 2011
- Albany, NY
- 0 Post(s)
- 0 Thread(s)
ASP replace word special chars in string variables
Monthly I receive a calendar of events for posting on 2 web sites.(word document)
1. I open the word doc and paste the events into the first site (SharePoint site)
2. I then export the sharepoint calendar into an access DB
3. I then use classic ASP to take the events out of the export DB and
add them to the live DB on the second site.
Here’s where I run into problems:
When I extract the events from the export DB into ASP string variables, I need to find word special chars such as smart quotes and replace them with regular quotes. This is because if I leave them, they display on the web as a small square (unrecognized character).
I have tried the following code to replace the special chars:
titleeNew = replace(titleeNew, "“", """")
titleeNew = replace(titleeNew, "”", """")
titleeNew = replace(titleeNew, "'", "'")
titleeNew = replace(titleeNew, "’", "'")
Unfortunately the special characters I’m looking to replace are not being found in my string variable. I even tried the inSTR function to see if the special characters exist in the string and get back position 0, which means that even though the special chars are in the export DB, when I query them from the DB, somehow they are not ending up in the string variable.
What can I do?