I am making a batch file that uses these characters:
˧ ˥ ˪ ˫
It is not working, it just terminates itself. I have seen people use characters like this:
Å
It isnt the character but it turns into a character, can someone give me a list of these, shows the type of letter above and what it turns into?
The characters you can use depend on the console codepage that is set. You can see it with
chcp
. On many systems it's 850 or 437. You can then look up the characters in that code page or find one that supports the characters you need and usechcp
in your batch file to set it early on.Note though that this is a setting for the process, so if someone needs to continue working with the console window afterwards it might not be nice to change their drapes to another colour. Also code page 65001 is UTF-8, but has a set of problems and drawbacks that make it rather tricky to use.
Note also that Notepad is not a useful text editor for writing batch files that need more than ASCII, because the legacy encoding in the non-console part of Windows is a different one. This might be what you mean that Å turns into another character.
If you want to write console batch files that use those characters, you need an editor that will save the batch file using the console's code page. To check what that is, type:
This is the result for my US Windows system.
A good editor is Notepad++. Set that encoding in the editor (Encoding, Character sets, Western European, OEM-US) and copy the following characters into it:
Save the file as
test.bat
and run it from the console:When you open the file again in Notepad++, it is possible that you will see something like:
Since there is no indication in the file what code page the characters in it represent, Notepad++ may choose the so-called
ANSI
code page. On US Windows that isWindows-1252
. Just select theOEM-US
encoding again to display it properly.You just need this equivalences file that works in any text editor, including the standard Windows Notepad:
Copy this table into a text file, that you must save as Unicode encoding. Then, when you want to insert a character in your Batch file, just choose the one below the graphic char you want to show.
Note: These characters are correct for code pages 850 or 437.
This table was copied from this answer.