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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I Need to change special characters into ASCII Equivalents

Status
Not open for further replies.

bgreenhouse

Technical User
Feb 20, 2000
231
CA
I need to design a macro or something that will recognize symbols such as the registered trademark sign,or the degree symbol and replace them with the appropriate ASCII equivalent code before I tag them in XML.  I have a table of ASCII equivalents, and haven't actually got around to trying to write the macro, but just wondered if anyone had any suggestions...
 
I guess you know the &quot;Registered Trade mark&quot; is &quot;AE&quot; in the Character map. <br>and the degree symbol is &quot;B0&quot; (Letter B and the number zero).<br>you might try <br>x=ASC(character)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in VBA<br>
 
Thanks Doug...I didn't know that about the character map, although I did assume that Word worked on something a little more recent than ASCII.&nbsp;&nbsp;Would those character map codes work with XML and HTML, or are you suggesting that I use them in the VBA code to define the special characters (I'm not sure If you're able to insert something like a degree sign in VBA)?<br><br>Thanks<br><br>Ben
 
OK I usually do this but anyway.<br>I created form in Access and put two text boxes on it.<br>Then I added a command button and put this code in it.<br><br>Text4 = Asc(Text7)<br><br>I then opened Character Map and picked the &quot;System&quot; font.<br>Then I found the Registered Trade Mark (R with a circle around It. Right)<br>Then I clicked it, Clicked the &quot;Select Button&quot;, Clicked the &quot;Copy&quot; button which put it in the Windows Clipboard.<br>Then went to the Access form and pasted it in Text7.<br>When I click the command button it put a &quot;174&quot; in Text4.<br><br>So dis-regard the post I said above (&quot;Registered Trade mark&quot; is &quot;AE&quot;) and use 174, Degree is 176 by the way.<br>OK<br>I use Access and VBA to prove a lot of Code using forms, so you can see the results then paste the proven code in your other project.&nbsp;&nbsp;VBA is VBA in most case's.<br>
 
If you look in character map, bottom, right-hand side, the keystroke is given. To use the keystroke to insert the character, you hold the Alt key down and then type the number. The trick is you must use the numeric keypad to type the number.<br><br>Of course, I have no idea if this pertains to what you guys are doing. But, just in case... <p> <br><a href=mailto: dreamboat@nni.com> dreamboat@nni.com</a><br><a href= </a><br>
 
Doug:<br><br>I think what you are saying is useful, but I am not sure how to go about using it.&nbsp;&nbsp;What I need to do is quickly scan through a document before it is coded into XML, and replace all special characters with ASCII equivalents (such as 176 and 174).&nbsp;&nbsp;I don't see how to do this with a form in Access (although I'd be happy to learn)...<br><br>Thanks<br>Ben
 
Doug:<br><br>I think what you are saying is useful, but I am not sure how to go about using it.&nbsp;&nbsp;What I need to do is quickly scan through a document before it is coded into XML, and automatically replace all special characters with ASCII equivalents (such as 176 and 174).&nbsp;&nbsp;I don't see how to do this with a form in Access (although I'd be happy to learn)...<br><br>Thanks<br>Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top