Back to Character Encoding

ISO-8859-2 ISO-8859-2 (Latin-2, Central European) ISO-8859

The Central European counterpart to Latin-1, covering Polish, Czech, Slovak, Hungarian, Croatian, and other Central/Eastern European languages.

What it is

ISO-8859-2, known as Latin-2, is the Central European sibling in the ISO-8859 family — covering the accented characters and special letters needed for Polish, Czech, Slovak, Hungarian, Slovenian, Croatian, and Romanian, among others. Like Latin-1, it's a fixed 1-byte encoding, ASCII-compatible in the 0x00–0x7F range, with the upper 128 byte values assigned to region-specific letters and symbols.

It saw significant real-world use in Central/Eastern European computing before UTF-8 became universal, and still appears in legacy databases, older exported documents, and some regional software that predates full Unicode adoption.

Byte structure

Byte range Content
0x00–0x7F Identical to ASCII
0xA0–0xFF Central European accented letters (ą, č, ę, ł, ń, ő, ř, ś, ů, ż, and others) and symbols

Why your text is garbled (symptom → cause)

Symptom Likely cause
Polish/Czech/Hungarian letters show as unrelated symbols or boxes Text is genuinely Latin-2 but being read as Latin-1, Windows-1250, or UTF-8 — all assign different characters to the same byte values in the upper range
Correct in an old regional database export, garbled after modern import Legacy Latin-2 data imported into a system defaulting to UTF-8 without an explicit conversion step
Some accented letters correct, others wrong A closely related but distinct encoding (commonly Windows-1250) is being confused with true Latin-2 — the two overlap heavily but aren't identical

Compatibility & gotchas

  • Windows-1250 is the Windows-native near-equivalent and is more common in practice for Central European Windows software — similar relationship to Latin-2 as Windows-1252 has to Latin-1, with differences concentrated in the 0x80–0x9F range.
  • Largely superseded by UTF-8 in current software, but still relevant for reading/migrating legacy regional data, particularly older government, academic, or enterprise systems from Central/Eastern Europe.
  • Distinct from Latin-1 despite the shared naming convention and structure — the two encodings assign completely different characters to most of the upper byte range, so they are not interchangeable.

Fixing it

  • Command-line conversion: iconv -f ISO-8859-2 -t UTF-8 input.txt -o output.txt
  • If unsure whether data is Latin-2 or Windows-1250: test both conversions and compare — the difference will only be visible in specific punctuation/symbol characters in the 0x80–0x9F range, since the accented-letter range (0xA0+) is largely shared.

Comparison

Encoding Key difference from ISO-8859-2
ISO-8859-1 Covers Western rather than Central European languages — different character assignments in the upper byte range entirely
Windows-1250 Windows-native near-equivalent, differing mainly in the 0x80–0x9F range
UTF-8 Full Unicode coverage, variable width, the modern default for any new system

FAQ

What languages does ISO-8859-2 cover?

Polish, Czech, Slovak, Hungarian, Slovenian, Croatian, Romanian, and other Central/Eastern European languages that use Latin-script letters with diacritics not present in Western European languages.

Is ISO-8859-2 the same as Windows-1250?

Close but not identical — they share most of their character assignments (particularly the accented letters), but differ in the 0x80–0x9F range the same way Latin-1 and Windows-1252 differ, since Windows-1250 fills that range with additional printable characters.

Fun fact

The ISO-8859 family was designed as a set of mutually-incompatible single-byte encodings covering different regions, meaning no single ISO-8859 variant could represent, say, both Polish and Greek text simultaneously — a limitation that became one of the strongest practical arguments for Unicode's unified, single-character-set approach over the "one encoding per region" model.