Latin-1 (ISO-8859-1)

Extends ASCII to 256 characters, covering most Western European languages. The first 256 Unicode codepoints map 1:1 to Latin-1 bytes. Largely superseded by UTF-8 but still common in legacy systems.

ISO-8859-1
Fixed (1 byte)
1987

Byte Structure

Latin-1 (ISO-8859-1) uses fixed 1-byte encoding per character. Characters not in this encoding cannot be represented and must be replaced or transliterated.

When to Use Latin-1 (ISO-8859-1)

Latin-1 is appropriate when working with legacy Western European systems that pre-date Unicode adoption. Its byte values 0x00–0xFF map 1:1 to the first 256 Unicode codepoints, making it a lossless subset of UTF-8 for those characters. Avoid it in new systems; use UTF-8 instead. When reading legacy files, detect the encoding explicitly rather than assuming Latin-1.

Sample Characters in Latin-1 (ISO-8859-1)

The table below shows how a selection of characters are represented in Latin-1 (ISO-8859-1). Bytes are shown in hexadecimal. Characters marked "not supported" cannot be encoded in Latin-1 (ISO-8859-1) and would need to be replaced or transliterated when converting from Unicode.

Character Codepoint Name Bytes (Hex) Bytes (Decimal) Supported
A U+0041 LATIN CAPITAL LETTER A 41 65 Yes
a U+0061 LATIN SMALL LETTER A 61 97 Yes
0 U+0030 DIGIT ZERO 30 48 Yes
$ U+0024 DOLLAR SIGN 24 36 Yes
£ U+00A3 POUND SIGN A3 163 Yes
© U+00A9 COPYRIGHT SIGN A9 169 Yes
U+20AC EURO SIGN not supported
α U+03B1 GREEK SMALL LETTER ALPHA not supported
А U+0410 CYRILLIC CAPITAL LETTER A not supported
U+4E2D not supported
U+3042 HIRAGANA LETTER A not supported
U+263A WHITE SMILING FACE not supported

Working with Latin-1 (ISO-8859-1) in Code

Every major language has built-in support for encoding conversion. The examples below show how to encode a string to Latin-1 (ISO-8859-1) bytes and decode it back to a Unicode string. Always specify the encoding explicitly — never rely on system defaults, which vary by OS and locale.

# Encode a string to latin-1 bytes
text = "Hello, 世界"
encoded = text.encode("ISO-8859-1")

# Decode bytes back to a string
decoded = encoded.decode("ISO-8859-1")
// Convert to latin-1
$bytes = mb_convert_encoding(
    "Hello, 世界",
    "ISO-8859-1",
    "UTF-8"
);

// Convert back to UTF-8
$text = mb_convert_encoding(
    $bytes,
    "UTF-8",
    "ISO-8859-1"
);
// Encode to ISO-8859-1 bytes
const encoder = new TextEncoder(); // UTF-8
const bytes = encoder.encode("Hello, 世界");

// Decode bytes
const decoder = new TextDecoder("ISO-8859-1");
const text = decoder.decode(bytes);
-- Create a database with Latin-1 (ISO-8859-1)
CREATE DATABASE mydb
  ENCODING 'ISO-8859-1'
  LC_COLLATE 'en_US.UTF-8';

-- Check database encoding
SELECT pg_encoding_to_char(encoding)
FROM pg_database
WHERE datname = current_database();

Compare with Other Encodings

See how Latin-1 (ISO-8859-1) differs from other encodings — which characters each supports and how the byte representations compare.