charset.school
Encode in Windows-1252

sandbox

Windows-1252 sandbox (encode)

Convert a Unicode code point into a single Windows-1252 (CP1252) byte.

Accepts U+XXXX, 0xXX, decimal, or a single character.

U+20AC
1 byte

Decimal

8364

Hexadecimal

0x80

Binary

10000000

CP1252 range

Range 0x800x9F - the Microsoft extension: 27 printable characters like , , , smart quotes, ... This is where CP1252 differs from Latin-1 (which has C1 controls in that slot). 5 bytes remain unassigned: 0x81, 0x8D, 0x8F, 0x90, 0x9D.

Step-by-step breakdown

  1. 01

    Read the byte value in binary

    Code point U+20AC isn't in an identity range. Look up the CP1252 table to find its byte between 0x80 and 0x9F, then convert to binary.

    10000000
  2. 02

    Convert to hexadecimal

    The binary byte becomes its 2-digit hex value.

    0x80
charset.school

Teaching tool. No tracking, no ads.

Developed by Florent Sorel