ASCII 186
Masculine Ordinal Indicator (º)
Latin-1 Supplement
Latin-1 character.
Common uses & context
Decimal 186 (0xBA) is Masculine Ordinal Indicator, part of the Latin-1 Supplement (128–255). Latin-1 character. It renders as 'º' and its binary byte is 10111010.
This is where single-byte ASCII ends and encoding matters. In Latin-1 (ISO-8859-1) 'º' is the single byte 0xBA. In UTF-8 — today's default for the web — the same character is the multi-byte sequence 0xC2 0xBA. 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+00BA, and in HTML you can write it as º or º.
All encodings at a glance
| Decimal | 186 |
| Hexadecimal | 0xBA |
| Octal | 0272 |
| Binary | 10111010 |
| HTML numeric entity | º |
| HTML named entity | º |
| URL encoding | %BA |
| UTF-8 bytes | 0xC2 0xBA |
Code snippets
JavaScript
String.fromCharCode(186); // "º"
186.toString(16); // "ba"Python
chr(186) # control char º
ord(chr(186)) # 186
hex(186) # '0xba'HTML
º <!-- named entity -->
º <!-- numeric entity -->Programming notes
- ▸Single byte 0xBA in Latin-1, but the multi-byte sequence 0xC2 0xBA in UTF-8 — never assume one byte per character above code 127.
- ▸Unicode code point U+00BA; HTML entity º.
- ▸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+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.
Frequently asked questions
What character is ASCII code 186?
ASCII code 186 is the character 'º' (Masculine Ordinal Indicator). In hexadecimal it is 0xBA, in octal 0272, and in binary 10111010.
What is 0xBA in ASCII?
Hexadecimal 0xBA equals decimal 186, which is the character 'º' (Masculine Ordinal Indicator). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0xBA = 186) and look up that code point.
How do I write the character with code 186 in code?
In JavaScript use String.fromCharCode(186); in Python use chr(186); in HTML use the numeric entity º or the named entity º. In a URL it is percent-encoded as %BA, and in UTF-8 it is stored as the byte sequence 0xC2 0xBA.
Is 'º' part of standard ASCII?
No. Standard ASCII covers codes 0–127 only. 'º' is code 186, part of the Latin-1 Supplement (128–255, sometimes called "extended ASCII"). It is a single byte 0xBA in Latin-1 but a multi-byte sequence (0xC2 0xBA) in UTF-8.