KOI8-R


KOI8-R is an 8-bit character encoding, designed to cover Russian, which uses a Cyrillic alphabet. It also happens to cover Bulgarian, but has not been used for that purpose since CP1251 was accepted. A derivative encoding is KOI8-U, which adds Ukrainian characters. The original KOI-8 encoding was designed by Soviet authorities in 1974.
KOI8 remains much more commonly used than ISO 8859-5, which never really caught on. Another common Cyrillic character encoding is Windows-1251. The use of these older code pages is being replaced with Unicode as a more common way to represent Cyrillic together with other languages.
In Microsoft Windows, KOI8-R is assigned the code page number 20866. In IBM, KOI8-R is assigned code page 878.
KOI8 stands for Kod Obmena Informatsiey, 8 bit which means "Code for Information Exchange, 8 bit".
The KOI8 character sets have the property that the Russian Cyrillic letters are in pseudo-Roman order rather than the normal Cyrillic alphabetical order as in ISO 8859-5 or Unicode. Although this may seem unnatural, it has the useful property that if the 8th bit is stripped, the text is partially readable in ASCII and may convert to syntactically correct KOI7. For instance, "Русский Текст" in KOI8-R becomes rUSSKIJ tEKST if the 8th bit is stripped; attempting to interpret the ASCII string rUSSKIJ tEKST as KOI7 yields "РУССКИЙ ТЕКСТ". KOI8 was based on Russian Morse code, which was created from Latin Morse code based on sound similarities, and which has the same connection to the Latin Morse codes for A-Z as KOI8 has with ASCII.

Character set

The following table shows the KOI8-R encoding. Each character is shown with its equivalent Unicode code point.