DevKits

ASCII 175

Macron (¯)

Latin-1 Supplement

Latin-1 character.

Common uses & context

Decimal 175 (0xAF) is Macron, part of the Latin-1 Supplement (128–255). Latin-1 character. It renders as '¯' and its binary byte is 10101111.

This is where single-byte ASCII ends and encoding matters. In Latin-1 (ISO-8859-1) '¯' is the single byte 0xAF. In UTF-8 — today's default for the web — the same character is the multi-byte sequence 0xC2 0xAF. 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+00AF, and in HTML you can write it as ¯ or ¯.

All encodings at a glance

Decimal175
Hexadecimal0xAF
Octal0257
Binary10101111
HTML numeric entity¯
HTML named entity¯
URL encoding%AF
UTF-8 bytes0xC2 0xAF

Code snippets

JavaScript

String.fromCharCode(175); // "¯"
175.toString(16); // "af"

Python

chr(175)           # control char ¯
ord(chr(175))      # 175
hex(175)           # '0xaf'

HTML

&macr;   <!-- named entity -->
&#175;   <!-- numeric entity -->

Programming notes

  • Single byte 0xAF in Latin-1, but the multi-byte sequence 0xC2 0xAF in UTF-8 — never assume one byte per character above code 127.
  • Unicode code point U+00AF; HTML entity &macr;.
  • 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+00AF. In UTF-8 it encodes to the byte sequence 0xC2 0xAF. In legacy Latin-1 (ISO-8859-1) it is a single byte 0xAF, which is why Latin-1 files often appear as mojibake when interpreted as UTF-8.

Frequently asked questions

What character is ASCII code 175?

ASCII code 175 is the character '¯' (Macron). In hexadecimal it is 0xAF, in octal 0257, and in binary 10101111.

What is 0xAF in ASCII?

Hexadecimal 0xAF equals decimal 175, which is the character '¯' (Macron). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0xAF = 175) and look up that code point.

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

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

Is '¯' part of standard ASCII?

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

Nearby codes

Encode & convert this character