×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

I Need to change special characters into ASCII Equivalents

I Need to change special characters into ASCII Equivalents

I Need to change special characters into ASCII Equivalents

(OP)
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...

RE: I Need to change special characters into ASCII Equivalents

I guess you know the "Registered Trade mark" is "AE" in the Character map.
and the degree symbol is "B0" (Letter B and the number zero).
you might try
x=ASC(character)      in VBA

RE: I Need to change special characters into ASCII Equivalents

(OP)
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.  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)?

Thanks

Ben

RE: I Need to change special characters into ASCII Equivalents

OK I usually do this but anyway.
I created form in Access and put two text boxes on it.
Then I added a command button and put this code in it.

Text4 = Asc(Text7)

I then opened Character Map and picked the "System" font.
Then I found the Registered Trade Mark (R with a circle around It. Right)
Then I clicked it, Clicked the "Select Button", Clicked the "Copy" button which put it in the Windows Clipboard.
Then went to the Access form and pasted it in Text7.
When I click the command button it put a "174" in Text4.

So dis-regard the post I said above ("Registered Trade mark" is "AE") and use 174, Degree is 176 by the way.
OK
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.  VBA is VBA in most case's.

RE: I Need to change special characters into ASCII Equivalents

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.

Of course, I have no idea if this pertains to what you guys are doing. But, just in case...


dreamboat@nni.com

RE: I Need to change special characters into ASCII Equivalents

(OP)
Doug:

I think what you are saying is useful, but I am not sure how to go about using it.  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).  I don't see how to do this with a form in Access (although I'd be happy to learn)...

Thanks
Ben

RE: I Need to change special characters into ASCII Equivalents

(OP)
Doug:

I think what you are saying is useful, but I am not sure how to go about using it.  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).  I don't see how to do this with a form in Access (although I'd be happy to learn)...

Thanks
Ben

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close