Computing.Net > Forums > Windows NT > Echoing Special Characters

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Echoing Special Characters

Reply to Message Icon

Name: Jonny1234
Date: January 8, 2005 at 04:16:58 Pacific
OS: NT/2K/XP
CPU/Ram: P4/256
Comment:

Hi,

I'm using a for loop in a command script to read lines from a file. I am then echoing each line as part of a sentence, to the screen.

But some of the lines in the file contain special characters, so when I try to echo them to the screen, I get an error.

For example, when I try to echo the string:

J |\\| O N N |_ /\\ Y" <

I get the error:

'\\' is not recognized as an internal or external command,
operable program or batch file.

But this is just a specific example; I don't always know which special
characters there will be.

Is there a way of echoing a special-character string read from a file, to the screen, without getting an error?

Many Thanks,
Jonny



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: January 10, 2005 at 02:01:56 Pacific
Reply:

Hi Jonny,

No way I know of to echo special chars.

I troed to set a var and echo the var.

It didn't help.

You can copy filename con > nul

This is not "echoing" but depending on what you're trying to do may be an acceptable work-around.

HTH


M2


If at first you don't succeed, you're about average.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows NT Forum Home


Sponsored links

Ads by Google


Results for: Echoing Special Characters

Getting desperate now www.computing.net/answers/windows-nt/getting-desperate-now/12744.html

Need help with net use for logon script www.computing.net/answers/windows-nt/need-help-with-net-use-for-logon-script/18006.html

Problem with notepad display www.computing.net/answers/windows-nt/problem-with-notepad-display/13967.html