Back
Asciify Logo
Asciify
±³

ASCII 178

Superscript twoDark shade

ASCII 178 is ² on Windows and ▓ in old DOS.

² (Superscript Two) is byte 178 in Windows-1252, Unicode U+00B2. It writes squares in plain text: m², km², E = mc². Python has a trap for it. '5²'.isdigit() returns True, because Unicode counts superscripts as digits, but int('5²') raises ValueError. So an input check built on isdigit() lets the value through and the conversion crashes a line later. Use isdecimal(), which returns False for ², or strip superscripts before parsing. In HTML, ² is an ordinary character and keeps line spacing even, while a 2 wrapped in a sup element can push the lines around it apart. Old DOS had ² too, at 253. In UTF-8 it's C2 B2, which misreads as ². The HTML entity is ².

▓ (Dark Shade) is byte 178 in code page 437, the original IBM PC character set, and maps to Unicode U+2593. It's the densest of the three shades, about three quarters filled, one step short of the solid █ at 219. C code that handles it as a byte has a classic bug. On x86 compilers plain char is signed, so char c = 178 actually stores -78, and a check like if (c == 178) is never true. Compare against (char)178, or read bytes as unsigned char, which also keeps functions like isalpha() from receiving a negative value they aren't defined for. In UTF-8 it's E2 96 93, which a code page 437 console prints as Γûô and a page misread as Windows-1252 shows as â–“. The HTML entity is ▓.

NumberBlock Element

Technical Details

Technical Details

Code Example

</>
#include <stdio.h>
int main(void) {
/* On Windows (code page 1252) byte 178 is ².
Modern terminals expect UTF-8, so print the code point, not the byte. */
printf("\u00B2\n"); /* UTF-8: C2 B2 */
unsigned char b = 178; /* the raw Windows-1252 byte */
printf("%d 0x%02X\n", b, b); /* 178 0xB2 */
return 0;
}

Code Example

</>
#include <stdio.h>
int main(void) {
/* Byte 178 is ▓ only on a console using code page 437
(chcp 437 on Windows, or DOSBox). On a UTF-8 terminal the
lone byte 0xB2 is invalid and prints as garbage, often �. */
putchar(178);
/* char is signed on x86, so a plain char holding 0xB2 is -78.
Use unsigned char when you compare or index by byte value. */
char c = (char)178;
unsigned char u = 178;
printf("\n%d %d\n", c, u); /* -78 178 */
/* Portable: print the Unicode character as UTF-8 instead. */
printf("\u2593\n"); /* E2 96 93 */
return 0;
}

How to Type It

Windows
Hold Alt and type 0178 on the numeric keypad, with Num Lock on. The leading zero picks the Windows code page. Alt+253, without the zero, types it too. No numeric keypad? In Word, type 00B2 and press Alt+X.
Mac
Press Control+Command+Space to open the Character Viewer, then search for "superscript two".
Linux
In GNOME, or any desktop running IBus, press Ctrl+Shift+U, type b2, then Space. With a Compose key set up, press Compose, caret, 2.
Phone
Tap the character at the top of this page to copy it.

How to Type It

Windows
Hold Alt and type 178 on the numeric keypad, with no leading zero. Windows reads it as a DOS code and inserts ▓. No numeric keypad? In Word, type 2593 and press Alt+X.
Mac
Press Control+Command+Space to open the Character Viewer, then search for "dark shade".
Linux
In GNOME, or any desktop running IBus, press Ctrl+Shift+U, type 2593, then Space.
Phone
Phone keyboards have no key for it. Tap the character at the top of this page to copy it.

Frequently Asked Questions

  • Because ¹, ² and ³ come from Latin-1, while ⁰ and ⁴ through ⁹ live in a separate Unicode block that starts at U+2070. A font can include the first three and skip the rest, and then ⁴ gets drawn from a fallback font with a different size and weight. Pick a font that covers that block, or write all exponents one way instead of mixing.

  • m² wherever you can type it, since that's the SI form. sq m is an informal English abbreviation that SI doesn't recognize. Where a field only takes plain ASCII, m2 and m^2 both get used, so pick one and keep it consistent through the whole document.

  • Because ² is a different character from 2, and plain string matching doesn't treat them as equal. NFKC normalization folds ² into 2, so normalize both the stored text and the query before comparing: in Python, `unicodedata.normalize('NFKC', text)` turns 80 m² into 80 m2. Keep the original for display and search the normalized copy.

  • isdigit() accepts any character Unicode counts as a digit, superscripts included, while int() only parses decimal digits. So a check like `if s.isdigit(): int(s)` crashes on input containing ². Use `s.isdecimal()` for the check instead, which returns False for ² and matches what int() actually accepts.

  • French AZERTY keyboards give ² a key of its own, top left, in the spot where US layouts have the backtick. So a shortcut documented as Ctrl+` sits on a key labeled ² in France, and French users hunting for a backtick key won't find one there.

  • The ▓ is the dark shade, which is what 178 means in the DOS table that Alt codes fall back to without a leading zero. Alt+0178 reads Windows-1252 and gives ², and in the DOS table the same sign is Alt+253. The other two superscripts work the same way with the zero: ¹ is Alt+0185 and ³ is Alt+0179.

Frequently Asked Questions

  • Map each pixel onto a ramp that runs from empty to solid: `' ░▒▓█'[v * 5 // 256]` picks one of five characters for a value from 0 to 255. Terminal cells are roughly twice as tall as they are wide, so sample every second row of the image or the art comes out stretched. For dark text on a light background, reverse the ramp.

  • The ▓ is the dark shade, which is what 178 means in the DOS table that Alt codes fall back to without a leading zero. Alt+0178 reads Windows-1252 and gives ², and in the DOS table the same sign is Alt+253. The other two superscripts work the same way with the zero: ¹ is Alt+0185 and ³ is Alt+0179.

@workani&@alexluthor
Privacy & legal

Privacy

No accounts, no ads, no tracking cookies, and no cross-site tracking. The only analytics we keep are faceless — anonymous, aggregated counts of pages and searches, never tied to you. We store no IP addresses, set no tracking cookies, and build no profiles. Cloudflare hosts the site and handles requests for delivery and security.

Full privacy policy·Extension privacy·legal@asciify.dev

Attributions & licenses

Twemoji
© Twitter, Inc and other contributors · CC-BY 4.0
Noto Color Emoji
© Google · Apache 2.0
Fluent UI Emoji
© Microsoft · MIT
OpenMoji
© HfG Schwäbisch Gmünd · CC-BY-SA 4.0
Toss Face
© Viva Republica (Toss) · SIL OFL 1.1
JoyPixels
© JoyPixels Inc. · Free Limited Use License
SerenityOS Emoji
© The SerenityOS Developers · BSD-2-Clause
EmojiTwo
© EmojiTwo contributors · CC-BY 4.0
Apple Color Emoji
© Apple, Inc.
Facebook Emoji
© Meta Platforms, Inc.

Apple and Facebook emoji styles are proprietary and shown here solely for reference and comparison — a common-sense application of nominative-use / fair-use principles. asciify is not affiliated with, endorsed by, or sponsored by Apple, Inc., Meta Platforms, Inc., or any other rights holder listed above. If a rights holder requests removal of their emoji style from this site, it will be removed.

All other vendor emoji are reproduced for reference and comparison under their respective open licenses listed above.

Character names and code points from the Unicode® Standard. Unicode® and the Unicode Logo are registered trademarks of Unicode, Inc.

Privacy
© asciify.dev 2025-2026