DevKits

ASCII 185

Superscript One (¹)

Latin-1 Supplement

Latin-1 character.

Common uses & context

Decimal 185 (0xB9) is Superscript One, part of the Latin-1 Supplement (128–255). Latin-1 character. It renders as '¹' and its binary byte is 10111001.

This is where single-byte ASCII ends and encoding matters. In Latin-1 (ISO-8859-1) '¹' is the single byte 0xB9. In UTF-8 — today's default for the web — the same character is the multi-byte sequence 0xC2 0xB9. Treating a Latin-1 byte as UTF-8 (or vice versa) is the usual reason accented letters and symbols turn into mojibake like é or €. The Unicode code point is U+00B9, and in HTML you can write it as ¹ or ¹.

All encodings at a glance

Decimal185
Hexadecimal0xB9
Octal0271
Binary10111001
HTML numeric entity¹
HTML named entity¹
URL encoding%B9
UTF-8 bytes0xC2 0xB9

Code snippets

JavaScript

String.fromCharCode(185); // "¹"
185.toString(16); // "b9"

Python

chr(185)           # control char ¹
ord(chr(185))      # 185
hex(185)           # '0xb9'

HTML

&sup1;   <!-- named entity -->
&#185;   <!-- numeric entity -->

Programming notes

  • Single byte 0xB9 in Latin-1, but the multi-byte sequence 0xC2 0xB9 in UTF-8 — never assume one byte per character above code 127.
  • Unicode code point U+00B9; HTML entity &sup1;.
  • If '¹' shows as mojibake, the encoding declared and the encoding used disagree — align both on UTF-8.

Unicode & UTF-8 note

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

Frequently asked questions

What character is ASCII code 185?

ASCII code 185 is the character '¹' (Superscript One). In hexadecimal it is 0xB9, in octal 0271, and in binary 10111001.

What is 0xB9 in ASCII?

Hexadecimal 0xB9 equals decimal 185, which is the character '¹' (Superscript One). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0xB9 = 185) and look up that code point.

How do I write the character with code 185 in code?

In JavaScript use String.fromCharCode(185); in Python use chr(185); in HTML use the numeric entity &#185; or the named entity &sup1;. In a URL it is percent-encoded as %B9, and in UTF-8 it is stored as the byte sequence 0xC2 0xB9.

Is '¹' part of standard ASCII?

No. Standard ASCII covers codes 0–127 only. '¹' is code 185, part of the Latin-1 Supplement (128–255, sometimes called "extended ASCII"). It is a single byte 0xB9 in Latin-1 but a multi-byte sequence (0xC2 0xB9) in UTF-8.

Nearby codes

Encode & convert this character