• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Saving a BAT file as Unicode with Windows XP?

Kelemvor

Lifer
Howdy,

I'm trying to make a simple menu in a Batch file through Notepad and am having a problem. I want to use Unicode characters so I can make a border around the menu. I can set it up and such but when I save it through Notepad, it tells me that I have to save it as Unicode for it to retain the ascii characters (alt + code). So I do that and it saves fine.

However, when I then try to run the BAT file, I get an error that

'¦' is not recognized as an internal or external command

It's like it's putting some character at the beginning of the file that Windows can't interpret.

Anyone know how I can make this work? I can save it as ANSI and the menu works fine but I don't get the borders that I want because ANSI removes the special characters.

Thanks.

Also, I tried saving it as Unicode, Unicode big endian, and UTF-8.
Unicode and big endian give the error above and the file doesn't even run.
UTF-8 lets the file run but the ascii characters don't show up. Instead I get:
GòÜGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGòÉGò¥
instead of
+---------------------+

 
Originally posted by: Kelemvor
Howdy,

I'm trying to make a simple menu in a Batch file through Notepad and am having a problem. I want to use Unicode characters so I can make a border around the menu. I can set it up and such but when I save it through Notepad, it tells me that I have to save it as Unicode for it to retain the ascii characters (alt + code). So I do that and it saves fine.

However, when I then try to run the BAT file, I get an error that

'¦' is not recognized as an internal or external command

It's like it's putting some character at the beginning of the file that Windows can't interpret.

Anyone know how I can make this work? I can save it as ANSI and the menu works fine but I don't get the borders that I want because ANSI removes the special characters.

Thanks.

The extra characters are the standard unicode text header on the top of the file. AFAIK the cmd interpreter doesnt handle them properly, so you couldnt use notepad to edit the file....

 
So what do I use to make the file then? Is there a different editor to use or some way to eave it as plain text but type in the ascii characters via their codes inline?
 
Have you tried using MS-DOS EDIT.COM? Then use ALT and then a three-digit code on the numeric keypad to enter the upper-ASCII characters "raw". That might work.
 
Back
Top