DevKits

ASCII 178

Superscript Two (²)

Latin-1 Supplement

Latin-1 character.

All encodings at a glance

Decimal178
Hexadecimal0xB2
Octal0262
Binary10110010
HTML numeric entity²
HTML named entity²
URL encoding%B2
UTF-8 bytes0xC2 0xB2

Code snippets

JavaScript

String.fromCharCode(178); // "²"
178.toString(16); // "b2"

Python

chr(178)           # control char ²
ord(chr(178))      # 178
hex(178)           # '0xb2'

HTML

&sup2;   <!-- named entity -->
&#178;   <!-- numeric entity -->

Unicode & UTF-8 note

In Unicode this is U+00B2. In UTF-8 it encodes to the byte sequence 0xC2 0xB2. In legacy Latin-1 (ISO-8859-1) it is a single byte 0xB2, which is why Latin-1 files often appear as mojibake when interpreted as UTF-8.

Nearby codes