troubleshooting Question

Inserting an ASCII symbol into a command line string from a batch file

Avatar of amendala
amendala asked on
Windows OSWindows BatchMicrosoft Legacy OS
8 Comments1 Solution7085 ViewsLast Modified:
Greetings all -

I'm in a quandry here... I'm not sure how to deal with this.

I've got a textual search and replace command that takes this syntax:
searchandreplace [find string] [replace with string] [filename]

My problem is that the [find string] I want to specify has a copyright symbol in it (the ASCII version, not the textual (C) version).

My issue is that when I cut and paste the command from my batch file onto the command line and run it, the copyright symbol works.  If I run the command from a batch file, it shows up as a goofy other symbol when executed.  I"m assuming this has something to do with the way the Windows command shell (cmd) parses the line of the batch file.

How would I properly put the copyright symbol in the batch file code?  Is there a way to do that?

For instance:

"Copyright [some code here for the symbol] 2007, Yada yada"

Using the ALT-[symbol number] trick doesn't work.  When I execute the batch file, it still doesn't show up properly.  However, if I cut and paste that line onto the command prompt, it works fine.

Ideas?
ASKER CERTIFIED SOLUTION
Steve Knight
IT Consultancy

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros