Character Codes

Introduction

Using ANSI, ASCII, code pages, control codes, UTF-8 and more!

One day I got to thinking about how the screen colours could be changed at the DOS command prompt. ANSI, ASCII, and Unicode characters and commands could be called by using different character code pages. I decided to see if things had changed and how it would be done today.

I was surprised how confusing doing this was. The problem for me was the different character sets and the different ways of encoding them. Admittedly I probably made this more difficult that in could have been by only using Notepad and the command prompt rather than a programming editor.

The character code pages are fairly common, what is not is how to use them. For example, several sites will say "enter the ecape character then type the character code," or show something like "<ESC>[32m" but do not explain that the "<ESC>" part is not literal text but special key presses to tell Notepad and other programs that what follows is to be acted on and not used as literal text.

This page is a more practical guide to entering the escape codes and using the character sets. Other sites goes into the differences between the character sets and the technical differences between the character encoding. ANSI, ASCII, Unicode, 7-bit and 8-bit codes and so on. This page gives a brief summary of that, but the main focus is using them.


ANSI & ASCII

Beginnings

The American Standards Association (ASA), now the American National Standards Institute (ANSI), began work on the American Standard Code for Information Interchange (ASCII) in October 1960. The encoding scheme had origins in the 5-bit telegraph codes invented by Émile Baudot, but there were other 5-bit and 6-bit character encodings in use. To try and standardize these sets, they chose a 7-bit encoding system, mainly to help keep down on the cost of data transmission but 7-bit confined ASCII to 128 characters.

The first 32 ASCII characters (0 - 31) and the last one (127), were reserved for control codes for printers, teleprinters, and other devices which allowed for just 95 printable characters, and so of course, English was the language used for these. The first version of ASCII was introduced in 1963 and a revised version in 1967, with the last revision being in 1986.

In the 1970s ANSI introduced a set of control codes for terminal displays and keyboards. The control codes codes can control the text and background colours of the screen, the cursor position and even the screen mode which controlled the number of columns seen on the screen. The codes for the keyboard could emulate any key press including the function keys. This meant that scripts could be written to remap keyboard keys or a macro produced to emulate a series of key presses.

Extended ASCII

There really is no such term as "Extended ASCII" because ANSI did not verify any of the character sets that were developed from their original 7-bit ASCII.

In the 1970s, 8-bit processors were being produced and developers realized the original 7-bit ASCII could be extended to include an extra bit which meant an additional 128 characters could be incorporated. There was no oversight so manufacturers and developers felt free to use these extra 128 character spaces however they wanted. Most used them to be able to use there own language characters.

IBM had created their own 8-bit ASCII for use with their Extended Binary Coded Decimal Interchange Code (EBCDIC) computer systems. To differentiate between their own ASCII codes, they coined the term "code pages" and started numbering them. They also brought some order to the industry by assigning numbers to other manufactuer's 8-bit ASCII systems as well. Microsoft used the same term and numbering for their Disk Operating System. In the 1990s, IBM and Microsoft stopped cooperating so closely and started numbering the code pages differently to each other.

There are now over 1,000 code pages available, one reason why Unicode is now so popular.

MS DOS & Windows

The original MS DOS was introduced in August 1981 and did not include ANSI support. MD DOS v2 was released in March 1983, that and all future editions of it, included the ansi.sys device driver that could use the ANSI terminal control codes. Ansi.sys was not loaded by default but could easily be loaded by editing the config.sys file.

No version of Windows natively supported the ANSI codes until the Windows 10 version 1511 update of November 2015 and is enabled by default.


Code Pages

A code page is is a table or list of character codes and their corresponding glyphs or characters. Microsoft Learn lists the 152 code pages available on Windows systems, but there are just a few that I am interested in; 437 which is the default code page for North America, and 65001 which is the UTF-8 Unicode code page. It would be nice if everyone would use UTF-8 with its 154,998 characters in version 16, but there are too many legacy programs and OEMs for this to happen.

CHCP

The CHCP command gives or sets the current code page. CHCP on its own will return the current code page, CHCP followed by a valid code page ID will change the code page to that ID. If the ID does not match a valid code page then the message "Invalid code page" is displayed.

The following batch file will save the current code page ID to a variable, it will then set the code page to 65001, which is the Unicode UTF-8 code page, then reset it back to whatever code page ID was saved.

@echo off
set newcpage=65001 
For /f "tokens=2 delims=:" %%g in ('chcp') Do set oldcpage=%%g
set oldcpage=%oldcpage: =%
echo.
echo The current code page ID is %oldcpage% and has been saved
chcp %newcpage% > null
For /f "tokens=2 delims=:" %%g in ('chcp') Do set cpagenow=%%g
set cpagenow=%cpagenow: =%
echo The code page has now been set to code page ID %cpagenow%
chcp %oldcpage% > null
For /f "tokens=2 delims=:" %%g in ('chcp') Do set cpagenow=%%g
set cpagenow=%cpagenow: =%
echo The code page has now been reset to code page ID %cpagenow%
Output of the above batch file

Output of the above batch file

The lines starting with chcp and ending with > null carries out the command bu redirects the screen output of the command to the null device which suppresses the text output.

The lines such as set cpagenow=%cpagenow: =% are there because the variable set in the for loop has a leading space which this line of code removes.

Changes made with CHCP are not permanent. As soon as the terminal window is closed the code page reverts back to what they were before.

CHARMAP

The CHARMAP command opens a character map utility. Various character maps, including Windows:Western and Unicode, can be opened from a dropdown and viewed by font.

The charmap utility

The charmap utility

The bottom status section of the charmap screen shows both the Unicode U+ code and the ALT codes to be entered to produce the selected character. Not all characters have a corresponding ALT code.

Permanent Change

Both the Stack Overflow and Super User sites have instructions for permanently changing the code page to 65001 (UTF-8).

Be careful of editing the Windows Registry! At least one of the registry edits has been reported as stopping Windows from starting properly. The other methods may cause some programs from displaying properly as they were meant to be used with the local code pages.

The safest method seems to be to open Window's Region settings and enable the "Enable Unicode UTF-8 for worldwide language support" checkbox.

Window's Region settings

Window's Region settings


Using the ASCII Codes - Not what I expected

Using the CHCP command at a command prompt I can tell that the Windows 11 I have uses code page 437. The list of characters for that can be found on the ASCII Codes or Wikipedia website.

The character set is in three groups. 0 to 31 are control characters, 32 to 127 are the standard ASCII character set; and 127 to 255 are the extended character set. The standard character set are the characters that can be found on most keyboards.

Suppose I wanted to use the beamed eighth note (♫) and pilcrow (¶) from the control character section, the ampersand (&) and at (@) from the standard section and the inverted question mark (¿), full block (█) and upper case omega (Ω) characters from the extended character section. The character representations here are the Unicode representations of the characters as this is a Unicode UTF-8 encoded page.

Decimal Character Character Name
14 Beamed Eighth Note (Control - SO, Shift out)
20 pilcrow (Control - Device Control 4)
38 & Ampersand
64 @ At
168 ¿ Inverted Question Mark
219 Full Block
234 Ω Upper Case Omega

By pressing the the Alt key while typing the various decimal codes the following is produced in Notepad:

Code page 437 characters in Notepad

Code page 437 characters in Notepad

So far, so good, but when I added echo to the front of this line of characters, saved it as a batch file and ran it, this was the output I got:

ΓÖ½ ┬╢'┬┐'

I tried various things, saving the file with both UFT-8 and ANSI encoding, changing the font, and changing the code page but nothing I did resembled anything like the characters in code page 437. Looking around, I found the CP437 display on console and Terminal font & codepage 437 discussions. What I was trying to do was never going to work without a lot of character code translation and remapping.

The moral of all this is to wherever possible use Unicode UTF-8 encoding!


Unicode

Most think of Unicode as being relatively new but the idea took root in 1987 when engineers from Xerox and Apple, and a little later Sun Microsystems, Microsoft and other companies got together and started to think about a universal character set. The first Unicode standard was released in 1991, with the second in 1992.

Unicode is a universal character set that defines all the characters needed for writing the majority of languages in use on computers. Unicode is a superset of all other encoded computer character sets. The Unicode Standard covers (almost) all characters, punctuations, and symbols in the world and enables processing, storage, and transport of text independent of platform and language.

Unicode is a character set where each character has a unique decimal number. UTF-8 is an encoding standard. It converts the decimal numbers of a Unicode character and converts it into a binary format so it can be stored.

Adding Unicode characters to Notepad is relatively easy as Notepad is Unicode enabled. The numbers must be entered using the keypad numbers, not the normal keyboard numbers and numlock must be on. If neccessary the encoding of a Notepad file can be changed using the encoding dropdown.

Notepad encoding

Notepad encoding

Using Unicode UTF-8 Characters

Suppose I wanted to show the symbols for the four suites of a pack of cards, spades, clubs, hearts, and diamonds. These symbols are part of the Unicode character set, so using Window's charmap utility or one of the many of the online Unicode lookup tables such as the ones at Charset, Unicode, Unicode Explorer, W3Schools, Wikipedia, and others.

What you should find is something as below

Decimal Hex U+ Character HTML Entity Character Name
9824 U+2660 spades Black Spade Suit
9827 U+2663 clubs Black Club Suit
9829 U+2665 hearts Black Heart Suit
9830 U+2666 diams Black Diamond Suit

Sometimes the decimal codes are referred to as L or ALT codes. This is probably because entering the codes involves holding down the ALT key.

I use the line <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> in the head of the pages of my site and that should mean that any browser that supports UTF-8 encoding should show the Unicode characters properly. I do not know of any browsers that do not and I have tested the pages in Chrome, Edge, Firefox, and Opera and those show them properly.

Using tables such as the one above there are several methods of inserting the characters on this page. The decimal numbers van be used preceeded by &# and ending with ; or the Hex U+ codes can be used by using &#x followed by the characters after the U+ or I can simply copy and paste the characters themselves. Using all three methods as in:

<p>Decimal - &#9824; &#9827; &#9829; &#9830; U+ Hex - &#x2660; &#x2663; &#x2665; &#x2666; Copied characters - ♠ ♣ ♥ ♦ HTML Entities - &spades; &clubs; &hearts; &diams;</p>

Results in:

Decimal - ♠ ♣ ♥ ♦ U+ Hex - ♠ ♣ ♥ ♦ Copied characters - ♠ ♣ ♥ ♦ HTML Entities - ♠ ♣ ♥ ♦

The same characters can be used in Notepad files and batch files, but not at the command prompt, but the methods of entering them are different depending on if the decimal or UTF-8 codes are used:

To enter the decimal version of the character code, Press the Alt key and then use the keypad numbers to enter the code. The NumLock must be on for this to work.

To enter the U+ hex version, enter the hex code and then press the Alt + X key together. The main keyboard or the keypad can be used to enter the numbers.

As with the HTML pages described above, the characters can simply be copied and pasted from elsewhere, even this webpage.

The following batch file saves the current code page ID, changes the code page ID to 65001, displays the card suit symbols, then resets the code page ID back to whatever it was when the script started:

@echo off
For /f "tokens=2 delims=:" %%g in ('chcp') Do set oldcpage=%%g
set oldcpage=%oldcpage: =%
chcp 65001 > null
echo The playing card suits: ♠ ♣ ♥ ♦
chcp %oldcpage% > null

The code must be changed to 65001, as the characters cannot be interpreted as they should. For example, using code page 437 produces this output:

The playing card suits: ΓÖá ΓÖú ΓÖÑ ΓÖª


Box Drawing & Block Characters

I have never had much cause to use non-English characters but I always liked the idea I could use the Extended ASCII box drawing characters in batch files. In DOS and code page 437. There are 57 such characters, from decimal codes 176 to 223 (ASCII Codes and Wikipedia).

Unicode uses the same characters and expanded the selection. There are 128 box drawing characters, these are U+2500, decimal 9472 to U+ 257F, decimal 9599 (Charset, W3Schools, Wikipedia). There are 32 block drawing characters, from U+2580, decimal 9600 to U+259F, decimal 9631 (Charset, W3Schools, Wikipedia). Of course there are thousands of other non-language specific characters and symbols.

The same characters can be used in Notepad files and batch files, but not at the command prompt, but the methods of entering them are different depending on if the decimal or UTF-8 codes are used:

To enter the decimal version of the character code, Press the Alt key and then use the keypad numbers to enter the code. The NumLock must be on for this to work.

To enter the U+ hex version, enter the hex code and then press the Alt + X key together. The main keyboard or the keypad can be used to enter the numbers.

As with the HTML pages described above, the characters can simply be copied and pasted from elsewhere.

The tables below were drawn by setting the font-family style to monospace and using the decimal codes in HTML:

┌───┬───┐    ╔═══╦═══╗
│   │   │    ║   ║   ║
├───┼───┤    ╠═══╬═══╣
│   │   │    ║   ║   ║
└───┴───┘    ╚═══╩═══╝

As in the previous example, the same characters can be used in Notepad files and batch files, but not at the command prompt, but the methods of entering them are different depending on if the decimal or UTF-8 codes are used:

To enter the decimal version of the character code, Press the Alt key and then use the keypad numbers to enter the code. The NumLock must be on for this to work.

To enter the U+ hex version, enter the hex code and then press the Alt + X key together. The main keyboard or the keypad can be used to enter the numbers.

As with the HTML pages described above, the characters can simply be copied and pasted from elsewhere, even this webpage.

The following batch file saves the current code page ID, changes the code page ID to 65001, displays the boxes, then resets the code page ID back to whatever it was when the script started:

@echo off
For /f "tokens=2 delims=:" %%g in ('chcp') Do set oldcpage=%%g
set oldcpage=%oldcpage: =%
chcp 65001 > null
echo Draw the boxes...
echo ┌───┬───┐    ╔═══╦═══╗
echo │   │   │    ║   ║   ║
echo ├───┼───┤    ╠═══╬═══╣
echo │   │   │    ║   ║   ║
echo └───┴───┘    ╚═══╩═══╝
chcp %oldcpage% > null

The output of the batch file is:

Output of the box drawing batch file

Output of the box drawing batch file

The code must be changed to 65001, as the characters cannot be interpreted as they should. For example, using code page 437 produces this output:

Draw the boxes...
ΓöîΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÉ ΓòöΓòÉΓòÉΓòÉΓòªΓòÉΓòÉΓòÉΓòù
Γöé Γöé Γöé Γòæ Γòæ Γòæ
Γö£ΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöñ ΓòáΓòÉΓòÉΓòÉΓò¼ΓòÉΓòÉΓòÉΓòú
Γöé Γöé Γöé Γòæ Γòæ Γòæ
ΓööΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÿ ΓòÜΓòÉΓòÉΓòÉΓò⌐ΓòÉΓòÉΓòÉΓò¥

Caveats

The following only applies to web pages. The command console and terminal in Windows already uses a monospace font but the code page should be set to 65001 using:

chcp 65001

In web pages, the encosing should be set to UTF-8 using:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Of course there are always going to be certain problems using these characters that are supposed to look contiguous. For most normal text, the actual width of the character makes no difference. In most fonts the lowercase i and j characters are the narrowist with capital W or M being the widest. For any given font at any given size there is no set standard for how wide the individual characters should be.

For monospaced fonts (Typewolf, Wikipedia), although the width of the actual character and its surrounding horizontal space is the same for each of these, there is no standard for how wide they should be.

The font family styling has to be changed to monospace using style="font-family: monospace;". If this is not done then proportional fonts are usually used and the box characters will not line up properly, as below:

┌───┬───┐    ╔═══╦═══╗
│   │   │    ║   ║   ║
├───┼───┤    ╠═══╬═══╣
│   │   │    ║   ║   ║
└───┴───┘    ╚═══╩═══╝

If you are using a WYSIWYG HTML editor, then the characters may not line up properly, whether monospace is specified or not.

Then there is the question of spacing. Until I started this page I had no idea that Unicode contained so many space characters (Charset, Unicode Explorer, Wikipedia). Just to satisfy my own curiosity, here is a table showing the relative widths of them:

Decimal Hex U+ Width (10 Characters) HTML Entity Character Name
9, 10, 13, 32 U+0009, U+000A, U+000D, U+0020 ┃ ┃ Tab, NewLine, - , - Character Tabulation, Line Feed, Carriage Return, Space
8202 U+200A ┃          ┃ VeryThinSpace Hair Space
8198 U+2006 ┃          ┃ Six Per Em Space
8201, 8239, 8287 U+2009, U+202F, U+205F ┃          ┃ ThinSpace, - , - Thin Space, Narrow No Break Space, Medium Mathematical Space
8197 U+2005 ┃          ┃ emsp14 Four Per Em Space
160, 8200, 8232, 8233 U+00A0, U+2008, U+2028, U+2029 ┃          ┃ NonBreakingSpace + nbsp, puncsp, - , - No Break Space, Punctuation Space, Line Separator, Paragraph Separator
8196 U+2004 ┃          ┃ emsp13 Three Per Em Space
8192, 8194 U+2000, U+2002 ┃          ┃ - , ensp En Quad, En Space
8199 U+2007 ┃          ┃ numsp, Figure Space
8193, 8195, 12288 U+2001, U+2003, U+3000 ┃          ┃ - , emsp, - Em Quad, Em Space, Ideographic Space

ANSI Control Codes

A surprise writing this page was that the ANSI control codes still work. These codes were introduced for text terminals in the 1970s to control, where possible, the text and background colours and the position of the cursor. Sites such as Computer Help, and Wikipedia have descriptons and tables showing what the escape codes do but are not very good at describing how to insert these commands into the command line or batch files. Sites such as the wonderful Rob van der Woude's do better.

The COLOR command can change the entire text and background colours of the screen; the ANSI control codes change the text and background colours of indvidual portions or lines of text, move the cursor around and a couple of more specialized functions.

In order to use these control squences the terminal has to be instructed that what follows is actually a control squence and is not normal text. This is what the ESCAPE seuences do. After a little trial and error this is what I found:

Command Prompt

The ANSI control codes can be used at the command prompt but they must be echo'd to the screen. To produce the control code use Ctrl + [

To change the text colour to yellow the following command can be used:

echo Ctrl + [[33m

To use multiple escape commands, separate them with a semicolon. To produce "Warning! Warning! Warning!" with blinking bold yellow text on a red background use:

echo Ctrl + [[1;33;41;5m Warning! Warning! Warning! Ctrl + [[m

Notice the double [[ characters, one produced while pressing the Ctrl key and one without. The final [[m sequence is to turn the control codes off and return to normal text. It is the same as Ctrl + [[0m

The ECHO command has to be used otherwise a warning will be produced saying:

[Character] is is not recognized as an internal or external command, operable program or batch file.

This error message can not be suppressed by redirecting the standard output to null using >NULL or redirecting the error messages to null using 2>NULL. The error message will show and the control code may not work at all.

Batch Files

When testing these scripts, or developing your own, it is important to remember to close the command prompt and start a new one. This is because sometimes results of a script interact with the previous and what you may think is working, is actually not.

Method 1 - Using Ctrl + [

The control eccape characters can be sent from the command prompt to a batch file using a redirect:

echo Ctrl + [ > myfile.bat

The myfile.bat file will then contain a representation of the command character, or a character showing the actual character cannot be found such as ⍰. The rest of the line can then be completed as normal

An entire command line, including the echo can be sent to the file using the same technique using:

echo echo Ctrl + [[1;33;41;5m Warning! Warning! Warning! Ctrl + [[m

Again, notice the two [ characers in the line and the two echo commands. The first echo suppresses the warning message, and the second echo is sent to the myfile.bat file as text. The myfile.bat file now contains:

echo ⍰[1;33;41;5m Warning! Warning! Warning! ⍰[m

The control character inserted into the file can be copied to a different part of the batch file or even copied to a new file and still work as intended. The >> (redirect and append) command can also still be used to add lines to a file.

Method 2 - Using Ctrl + [ and SET

This method is similar to Method 1 to start, but assigns the control squence to a variable that can be reused in the batch file. At a command prompt type:

echo set "ESC=Ctrl + [" > myfile.bat

myfile.bat now contains the line:

set "ESC=⍰"

The %ESC% variable can now be used from inside the batch file to insert the command escape sequence. Using the sequence I have used before, a batch file can now be written as:

@echo off
set "ESC=⍰"
echo %ESC%[1;33;41;5m Warning! Warning! Warning!
echo %ESC%[m

Method 3a - Using For, Prompt and Set

In a batch file type:

@echo off
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do set ESC=%%b
echo %ESC%[1;33;41;5m Warning! Warning! Warning!
echo %ESC%[0m

Method 3b - Using For, Prompt and Set (Simplified)

In a batch file type:

@echo off
for /F %%a in ('echo prompt $E ^| cmd') do set "ESC=%%a"
echo %ESC%[1;33;41;5m Warning! Warning! Warning!
echo %ESC%[0m

These methods work because of the switches that can be used with the prompt command. $H is a backspace and $E is the ANSI escape code (code 27). This code is captured and placed in the ESC variable.

Advantages of these methods are that no interaction is required with the command prompt to write the batch file and the command escape sequence is saved to a variable.

Method 4 - Using Forfiles

In a batch file type:

FORFILES.EXE /P %~dps0 /M %~nxs0 /C "CMD.EXE /C ECHO 0x1B[1;33;41;5m Warning! Warning! Warning!0x1B[0m

This method does not require any interaction with the command prompt and works because forfiles interprets hexadecimal characters (0xdd format) from the command line. To ensure it works just once, the /P (path) parameter is set to the folder the batch file is in using %~dps0 and the /M (search mask matching) parameter is set to the batch file's name and extension using %~nxs0.

Unfortunately, I do not know how to save 0x1B to a variable, so the entire line has to be repeated to change the command escape sequence.


Emojis

Windows has a built-in emoji picker. This is opened by pressing the Windows and full stop, or the Windows and the semicolon key while typing in an application. The utility contains more than a selection of emojis but also kaomoji (Japanese emoticons), and symbols. Any of them can be selected and they will be inserted into the document.

Windows emoji utility

Windows emoji utility

The output of this simple batch file is:

😀👲🎈🍑❤️

What went wrong? The answer is simple, the wrong code page was being used. Instead of using the Unicode UTF-8 page, 65001, it was using the standard 437. Using the command chcp 65001, the emojis now display properly:

😀👲🎈🍑❤️


Windows Terminal

Windows terminal was introduced on May 3, 2019 and Windows 11 users received it with the 22H2 update when it replaced Windows Console. Terminal is a command-line front-end. It can run multiple command-line apps, including text-based shells in a multi-tabbed window. It has out-of-the-box support for Command Prompt, PowerShell, and Bash on Windows Subsystem for Linux (WSL). It can also natively connect to Azure Cloud Shell. Terminal can also run on Windows 10 and is available from the Microsoft Store.

Windows Terminal appearance

Of interest to this page is that various colour schemes can be set, either collectively or for individual shells.
Of course these only apply to the interface not to scripts created with them

Changing the Console colours

Adjusting the Console colours in Windows 10
The Command and PowerShell prompts share the same interface but are adjusted individually


Color Command

The COLOR command has been around since DOS and not a command I used very often. One problem with it is that it is not persistant, the colors given to the command are for the current session only. Another is that it changes the entire console window, there is no way for it to control individual lines of text. One good thing about it is that does not allow you to choose the same color for the background and text.

It works by giving a hexidecimal value for the text or foreground and optionally one for the background. The avilable colours and ther codes are:

Color command colours and codes

Color command colours and codes

The following batch file goes through the background colors, except 0 (black), setting the foreground to 0 (black) for each one.

@ECHO OFF
SETLOCAL enabledelayedexpansion
REM Using a FOR loop to step through a hex string
ECHO.
FOR %%G IN (1 2 3 4 5 6 7 8 9 A B C D E F) DO (
	ECHO. Background colour is %%G
	COLOR %%G0
	PAUSE
)
REM Reset the colors
COLOR

Sources and Resources

The main emphasis on this page was to give a brief explanation of ANSI, ASCII, Unicode, code pages, the various character sets and encoding systems, and more importantly, about using them. The following sites go into greater detail of the various systems or show the character set code pages.

Some web sites appear in multiple sections.

ANSI Control Codes

ANSI escape code (Wikipedia)
ANSI Escape Sequences (GitHub)
ANSI sequences (Rob van der Woude)
ANSI.SYS (Akademia WIT)
ANSI.SYS (Wikipedia)
ANSI.SYS Documentation and Reference (Roy/SAC)
ASCII (SparkFun) - A nice history of ASCII
Console Virtual Terminal Sequences (Microsoft Learn)
How to echo with different colors in the Windows command line (Stack Overflow)
MS-DOS and Windows command line ansi.sys command (Computer Hope)
Unable to use ANSI Escape Sequences in Windows 10 (SuperUser)
Use ANSI colors in the terminal (SS64)

Batch Files

Alt code (Wikipedia)
ANSI sequences (Rob van der Woude)
DOS - String Manipulation (DOSTips)
How to echo with different colors in the Windows command line (Stack Overflow)
Rob van der Woude's Scripting Pages - A wonderful resource for all sorts of scripts
Unable to use ANSI Escape Sequences in Windows 10 (SuperUser)
Unicode input (Wikipedia)

Box Drawing & Block Characters

Block Elements (Wikipedia)
Box-drawing characters (Wikipedia)
Code page 437 (ASCII Codes)
Code page 437 (DeathWombat)
Code page 437 (Wikipedia)
List of monospaced typefaces (Wikipedia)
Monospaced font (Wikipedia)
Regular and Unusual Space Characters (Unicode Explorer)
Top 10 Most Popular Monospaced Fonts (Typewolf)
Unicode spaces (Jukka "Yucca" Korpela)
Unicode UTF-8 - characters 0 (U+0000) to 999 (U+03E7) (Charset)
Unicode UTF-8 - characters 9000 (U+2328) to 9999 (U+270F) (Charset)
UTF-8 Block Elements (W3Schools)
UTF-8 Box Drawings (W3Schools)
Whitespace character (Wikipedia)

Character Set Tables

Alt code (Wikipedia)
Alt Codes for Windows
ASCII (SparkFun) - Includes a nice history of ASCII
ASCII table, ascii codes (ASCII Code)
Code page 437 (ASCII Codes)
Code page 437 (DeathWombat)
Code page 437 (Wikipedia)
HTML Unicode (UTF-8) Reference (W3Schools)
Insert ASCII or Unicode Latin-based symbols and characters (Microsoft Support)
Special ALT Characters (Ted Montgomery)
UTF-8 (Wikipedia)
UTF-8 code page (Charset)

Character Set Usage

Alt code (Wikipedia)
Insert ASCII or Unicode Latin-based symbols and characters (Microsoft Support)
Special ALT Characters (Ted Montgomery)
Unable to use ANSI Escape Sequences in Windows 10 (SuperUser)
Unicode input (Wikipedia)

Code Pages - Explanation

Code page (Wikipedia)
Codepages: Comprehensive list (Aivosto)
ASCII (Wikipedia)
Code Pages (Microsoft Learn)
Code Page Identifiers (Microsoft Learn)
Extended ASCII (Wikipedia)
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (Joel Spolsky)
Unicode Basic Questions (Unicode)
UTF-8 (Wikipedia)
Windows code page (Wikipedia)

History of the Character Sets and Encoding

Code page (Wikipedia)
Everything about Unicode, Code Pages and Character Encoding
ASCII (SparkFun) - A nice history of ASCII
ASCII (Wikipedia)
Extended ASCII (Wikipedia)
MS-DOS (Wikipedia)
Timeline of DOS operating systems (Wikipedia)
UTF-8 (Wikipedia)

Windows Commands and Utilities

Alt code (Wikipedia)
Change CodePage in CMD permanently? (Stack Overflow)
Change default code page of Windows console to UTF-8 (SuperUser)
Chcp command (Computer Hope)
CHCP.com (SS64)
Color (Microsoft Learn)
Color (SS64)
Color command (Computer Hope)
Color schemes in Windows Terminal (Microsoft Learn)
Forfiles (Microsoft Learn)
Forfiles command (Computer Hope)
FORFILES.exe (SS64)
Insert ASCII or Unicode Latin-based symbols and characters (Microsoft Support)
Install and get started setting up Windows Terminal (Microsoft Learn)
Prompt (Microsoft Learn)
PROMPT (SS64)
Prompt command (Computer Hope)
Unicode input (Wikipedia)
Windows Console (Wikipedia)
Windows Terminal (Wikipedia)