Code page 866 (CCSID 866)[2] (CP 866, "DOS Cyrillic Russian")[3] is a code page used under DOS and OS/2[4] in Russia to write Cyrillic script.[5][6] It is based on the "alternative code page" (Russian: Альтернативная кодировка) developed in 1984 in IHNA AS USSR and published in 1986 by a research group at the Academy of Science of the USSR.[7] The code page was widely used during the DOS era because it preserves all of the pseudographic symbols of code page 437 (unlike the "Main code page" or Code page 855) and maintains alphabetic order (although non-contiguously) of Cyrillic letters (unlike KOI8-R). Initially this encoding was only available in the Russian version of MS-DOS 4.01 (1990), but with MS-DOS 6.22 it became available in any language version.
The WHATWG Encoding Standard, which specifies the character encodings permitted in HTML5 which compliant browsers must support,[8] includes Code page 866.[9] It is the only single-byte encoding listed which is not named as an ISO 8859 part, Mac OS specific encoding, Microsoft Windows specific encoding (Windows-874 or Windows-125x) or KOI-8 variant.[9] Authors of new pages and the designers of new protocols are instructed to use UTF-8 instead.[10]
Two very similar but not identical encodings are standardised in GOST R 34.303-92[11] as KOI-8 N1 and KOI-8 N2 (not to be confused with the original KOI-8).
Character set
Each non-ASCII character is shown with its equivalent Unicode code point. The first half (code points 0–127) of this table is the same as that of code page 437.
There existed a few variants of the code page, but the differences were mostly in the last 16 code points (240–255).
Alternative code page
The original version of the code page by Bryabrin et al. (1986)[7] is called the "Alternative code page" (Russian: Альтернативная кодировка), to distinguish it from the "Main code page" (Russian: Основная кодировка) by the same authors. It supports only Russian and Bulgarian. It is mostly the same as code page 866, except for codes F2hex through F7hex (which code page 866 changes to Ukrainian and Belarusian letters) and codes F8hex through FBhex (where code page 866 matches code page 437 instead). The differing row is shown below.
An unofficial variant with code points 240–255 identical to code page 437. However, the letter Ёё is usually placed at 240 and 241.[18] This version supports only Russian and Bulgarian. The differing row is shown below.
Different from compliant code page 866 to match OEM-US
GOST R 34.303-92
The GOST R 34.303-92 standard defines two variants, KOI-8 N1 and KOI-8 N2. These are not to be confused with the KOI-8 encoding, which they do not adhere to.
KOI-8 N2
KOI-8 N2 is the more extensive variant and matches code page 866 and the Alternative code page except for the last row or stick.[c] For this last row, it supports letters for Belarusian and Ukrainian in addition to Russian, but in a layout unrelated to code page 866 or 1125. Notably the Russian Ё/ё (which was unchanged between the Alternative code page and code page 866) is also in a different location. KOI-8 N2's final stick is shown below.[11]
Different from code page 866 and Alternative code page
KOI-8 N1
The other variant, KOI-8 N1, is a subset of KOI-8 N2 which omits the non-Russian Cyrillic letters and mixed single/double lined box-drawing characters, leaving them empty for further internationalization (compare with code page 850). The affected sticks are shown below.[11]
The KBL code page, unofficially known as Code page 771,[19] is the earliest DOS character encoding for Lithuanian.[20] It mostly matches code page 866 and the Alternative code page, but replaces the last row and some block characters with letters from the Lithuanian alphabet not otherwise present in ASCII. The Russian Ё/ё is not supported,[20] similarly to KOI-7.
A modified version, Code page 773, which replaces the Cyrillic letters with Latvian and Estonian letters, also exists.[20]
Different from code page 866 and Alternative code page
LST 1284
Lithuanian Standard LST 1284:1993, known as Code page 1119 or unofficially as Code page 772,[19] mostly matches the "modified" Code page 866, except for the addition of quotation marks in the last row and the replacement of the mixed single-double box-drawing characters with Lithuanian letters (compare code page 850). Unlike KBL, the Russian Ё/ё is retained.
It accompanies LST 1283 (Code page 774/1118), which encodes the additional Lithuanian letters at the same locations as LST 1284, but is based on Code page 437 instead. It was later superseded by LST 1590-1 (Code page 775),[19] which encodes these Lithuanian letters in the same locations, but does not include Cyrillic letters, replacing them with Latvian and Estonian letters.[20]
Ukrainian standard RST 2018-91 is designated by IBM as Code page 1125 (CCSID 1125),[25] abbreviated CP1125, and also known as CP866U, CP866NAV or RUSCII.[26] It matches the original Alternative code page for all points except for F2hex through F9hex inclusive, which are replaced with Ukrainian letters.[27] Code page/CCSID 1131[28][29] matches code page 866 for all points except for F8hex, F9hex, and FChex through FEhex inclusive, which are replaced with otherwise-missing Ukrainian and Belarusian letters, in the process displacing the bullet character (∙) from F9hex to FEhex.[30][31] The differing rows are shown below.
IBM code page 1125 (Ukrainian standard RST 2018-91)[27][32][33][34]
Also, the so-called CP 866ukr code page is a modified version of CP866 with the replacement of Ўў by Іі. Unlike CP1125, it maintains full compatibility of Ukrainian letters with CP866, although Ґґ is missing. It is not included in the standard Windows distributions, but some users install a home-made patch[38] that allows using this encoding to work in command-line programs (such as FAR Manager) with filenames containing the Cyrillic Іі.
Hryvnia variants
FreeDOS code page 30040 is a variant of code page 866 which replaces the currency sign (¤) at byte 0xFB with the hryvnia sign (₴, U+20B4).
FreeDOS code page 30039 is a variant of code page 1125 which makes the same replacement.
IBM code page/CCSID 848 is a variant of code page/CCSID 1125 with the euro sign at FDhex, replacing ¤.[42][43][44]
IBM code page/CCSID 849 is a variant of code page/CCSID 1131 with the euro sign at FBhex, replacing ¤.[45][46][47]
Lehner–Czech modification
An unofficial modification used in software developed by Michael Lehner and Peter R. Czech. It replaces three mathematic symbols with guillemets and the section sign which are commonly used in the Russian language. (Lehner and Czech created a number of alternative character sets for other European languages as well, including one based on CWI-2 for Hungarian, a Kamenicky-based one for Czech and Slovak, a Mazovia variant for Polish and a seemingly-unique encoding for Lithuanian. The modified row is shown below.
A Latvian variant, supported by Star printers and FreeDOS, is code page 3012 (earlier FreeDOS called it code page 61282). This encoding is nicknamed "RusLat".[48]
Before Microsoft's final code page for Russian MS-DOS 4.01 was registered with IBM by Franz Rau of Microsoft as CP866 in January 1990, draft versions of it developed by Yuri Starikov (Юрий Стариков) of Dialogue were still called code page 900 internally. While the documentation was corrected to reflect the new name before the release of the product, sketches of earlier draft versions still named code page 900 and without Ukrainian and Belarusian letters, which had been added in autumn 1989, were published in the Russian press in 1990.[50] Code page 900 slipped through into the distribution of the Russian MS-DOS 5.0 LCD.CPI codepage information file.[51]
Notes
^Includes distinctly Ukrainian and Rusyn letters Є and Ї, but no І distinct from Latin I, and implements Soviet orthography, i.e. omits Ґ. These are added in some modifications.
^Includes uniquely Belarusian Ў, but no І distinct from Latin I (although this is added in some modifications).
^i.e. codes 240 through 255, or F0hex through FFhex
^"8.2.2.3. Character encodings". HTML 5.1 2nd Edition. W3C. User agents must support the encodings defined in the WHATWG Encoding standard, including, but not limited to […]