DevKits

ASCII 186

Masculine Ordinal Indicator (º)

Latin-1 Supplement

Latin-1 character.

All encodings at a glance

Decimal186
Hexadecimal0xBA
Octal0272
Binary10111010
HTML numeric entityº
HTML named entityº
URL encoding%BA
UTF-8 bytes0xC2 0xBA

Code snippets

JavaScript

String.fromCharCode(186); // "º"
186.toString(16); // "ba"

Python

chr(186)           # control char º
ord(chr(186))      # 186
hex(186)           # '0xba'

HTML

&ordm;   <!-- named entity -->
&#186;   <!-- numeric entity -->

Unicode & UTF-8 note

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

Nearby codes