KOI8-U KOI8-U (Ukrainian Cyrillic) Legacy & Platform-Specific
The Ukrainian-adapted extension of KOI8-R, adding the specific Cyrillic letters Ukrainian needs that Russian doesn't use.
What it is
KOI8-U extends KOI8-R to properly support Ukrainian, which uses several Cyrillic letters (ґ, є, і, ї) not present in the Russian alphabet that KOI8-R was originally designed around. It preserves KOI8-R's core design — including the same 7-bit-transliteration-fallback resilience feature — while filling in a handful of previously-unused byte positions with the additional Ukrainian-specific letters.
Byte structure
| Byte range | Content |
|---|---|
| 0x00–0x7F | Identical to ASCII |
| 0xC0–0xFF | Cyrillic letters, mostly matching KOI8-R, with additional Ukrainian-specific letters filling previously unused positions |
Why your text is garbled (symptom → cause)
| Symptom | Likely cause |
|---|---|
| Ukrainian-specific letters (ґ, є, і, ї) display incorrectly while other Cyrillic text is fine | Text is KOI8-U but read as KOI8-R — the two are nearly identical except for these specific added characters |
| Ukrainian Cyrillic text is entirely unreadable | Broader encoding mismatch — text may be Windows-1251 or another Cyrillic encoding rather than KOI8-U at all |
Compatibility & gotchas
- Nearly identical to KOI8-R — the two share almost all byte assignments, differing mainly in the small number of positions filled with Ukrainian-specific letters, making mislabeling between them an easy, often low-visibility mistake for text that doesn't happen to use those specific characters.
- Inherits KOI8-R's 7-bit-transliteration-fallback design — the same resilience characteristic that made KOI8-R useful on 8-bit-unsafe early network infrastructure applies here too.
- Largely superseded by UTF-8 in current Ukrainian-language software, though legacy KOI8-U data persists in older Unix-originated archives, similar to KOI8-R's legacy footprint.
Fixing it
- Command-line conversion:
iconv -f KOI8-U -t UTF-8 input.txt -o output.txt
Comparison
| Encoding | Key difference from KOI8-U |
|---|---|
| KOI8-R | The Russian-focused base encoding, missing Ukrainian-specific letters |
| Windows-1251 | Also covers Ukrainian Cyrillic letters, but with an entirely different byte layout and no 7-bit-fallback design |
| UTF-8 | Full Unicode coverage, the modern default |
FAQ
What's the difference between KOI8-U and KOI8-R?
KOI8-U adds Ukrainian-specific Cyrillic letters (ґ, є, і, ї) that KOI8-R, built around the Russian alphabet, doesn't include — otherwise the two encodings share nearly identical byte assignments.
Does KOI8-U have the same 7-bit fallback design as KOI8-R?
Yes — it inherits KOI8-R's deliberate byte-layout resilience feature, where stripping the high bit degrades Cyrillic text into readable Latin transliteration rather than pure garbage.
Fun fact
KOI8-U's close relationship to KOI8-R reflects a broader pattern in Cyrillic-script encoding history — rather than designing entirely separate encodings per Slavic language, several extensions and variants (KOI8-U among them) chose to build directly on KOI8-R's existing structure, trading some design purity for practical compatibility with already-deployed KOI8-R infrastructure.