Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing special character ’

Status
Not open for further replies.

minli98

IS-IT--Management
Aug 30, 2005
178
US
Hi,

Does anyone know why when I run #chr(asc(’))# I get â instead of the original character ? FYI, this character is the single quote in Microsoft Word. I am trying to replace it with the regular single-quote ' but I am having a hard time. I tried using #replace(strVal,"’","'","all")# but it didn't work.

Many thanks.

Min
 
Sorry, a small typo in the original post.

Does anyone know why when I run #chr(asc("’"))# I get â instead of the original character ? FYI, this character is the single quote in Microsoft Word. I am trying to replace it with the regular single-quote ' but I am having a hard time. I tried using #replace(strVal,"’","'","all")# but it didn't work.

Many thanks.

Min
 
Google for "Smart Quotes". It's a special character that gets interpreted by Word as left-slant/right-slant, like

“Hello” ‘Hello’ (I pasted this from Word. Load it into a hex editor and inspect the hex value of the characters.)

Use the replace() function to fix these.

Phil H.
-----------
A virtual machine ate my accounting data. I transferred it to a physical box, then I beat it to smithereens with a sledgehammer. I feel better.
 
Thanks. I figured it out.

Rgds,
Min
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top