DevKits

ASCII 165

Yen Sign (¥)

Latin-1 Supplement

Latin-1 character.

Common uses & context

Decimal 165 (0xA5) is Yen Sign, part of the Latin-1 Supplement (128–255). Latin-1 character. It renders as '¥' and its binary byte is 10100101.

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

All encodings at a glance

Decimal165
Hexadecimal0xA5
Octal0245
Binary10100101
HTML numeric entity¥
HTML named entity¥
URL encoding%A5
UTF-8 bytes0xC2 0xA5

Code snippets

JavaScript

String.fromCharCode(165); // "¥"
165.toString(16); // "a5"

Python

chr(165)           # control char ¥
ord(chr(165))      # 165
hex(165)           # '0xa5'

HTML

&yen;   <!-- named entity -->
&#165;   <!-- numeric entity -->

Programming notes

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

Frequently asked questions

What character is ASCII code 165?

ASCII code 165 is the character '¥' (Yen Sign). In hexadecimal it is 0xA5, in octal 0245, and in binary 10100101.

What is 0xA5 in ASCII?

Hexadecimal 0xA5 equals decimal 165, which is the character '¥' (Yen Sign). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0xA5 = 165) and look up that code point.

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

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

Is '¥' part of standard ASCII?

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

Nearby codes

Encode & convert this character