Code page 866 explained

Mime:IBM866
Alias:cp866, 866
Classification:OEM code page, extended ASCII
Extends:US-ASCII
Basedon:Alternative code page
Standard:WHATWG Encoding Standard
Lang:Russian, Bulgarian;
Partial support:
Ukrainian, Belarusian
Otherrelated:(See below)

Code page 866 (CCSID 866)[1] (CP 866, "DOS Cyrillic Russian") is a code page used under DOS and OS/2 in Russia to write Cyrillic script.[2] 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.[3] 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,[4] includes Code page 866.[5] 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. Authors of new pages and the designers of new protocols are instructed to use UTF-8 instead.[6]

Two very similar but not identical encodings are standardised in GOST R 34.303-92[7] 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 (q.v.).

Variants

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)[3] 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.

Modified code page 866

An unofficial variant with code points 240–255 identical to code page 437. However, the letter Ёё is usually placed at 240 and 241.[8] This version supports only Russian and Bulgarian. The differing row is shown below.

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. 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.

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.

Lithuanian variants

KBL

The KBL code page, unofficially known as Code page 771, is the earliest DOS character encoding for Lithuanian.[9] 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, similarly to KOI-7.

A modified version, Code page 773, which replaces the Cyrillic letters with Latvian and Estonian letters, also exists.

LST 1284

Lithuanian Standard LST 1284:1993, known as Code page 1119 or unofficially as Code page 772, 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), which encodes these Lithuanian letters in the same locations, but does not include Cyrillic letters, replacing them with Latvian and Estonian letters.

Ukrainian and Belarusian variants

Ukrainian standard RST 2018-91 is designated by IBM as Code page 1125 (CCSID 1125),[10] abbreviated CP1125, and also known as CP866U, CP866NAV or RUSCII.[11] It matches the original Alternative code page for all points except for F2hex through F9hex inclusive, which are replaced with Ukrainian letters. Code page/CCSID 1131[12] [13] 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.[14] [15] The differing rows are shown below.

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[16] 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.

Euro sign updates

IBM code page/CCSID 808 is a variant of code page/CCSID 866; with the euro sign (€, U+20AC) in position FDhex, replacing the universal currency sign (¤).[17]

IBM code page/CCSID 848 is a variant of code page/CCSID 1125 with the euro sign at FDhex, replacing ¤.[18]

IBM code page/CCSID 849 is a variant of code page/CCSID 1131 with the euro sign at FBhex, replacing ¤.[19]

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.

Latvian variant

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".[20]

FreeDOS

FreeDOS provides additional unofficial extensions of code page 866 for various non-Slavic languages:[21]

Code page 900

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.[22] Code page 900 slipped through into the distribution of the Russian MS-DOS 5.0 LCD.CPI codepage information file.[23]

Further reading

Notes and References

  1. Web site: CCSID 866 information document. https://web.archive.org/web/20160327022230/http://www-01.ibm.com/software/globalization/ccsid/ccsid866.html. 2016-03-27.
  2. Web site: Code page 866 information document. https://web.archive.org/web/20160316232819/http://www-01.ibm.com/software/globalization/cp/cp00866.html. 2016-03-16.
  3. Брябрин В. М., Ландау И. Я., Неменман М. Е. О системе кодирования для персональных ЭВМ // Микропроцессорные средства и системы. — 1986. — № 4. — С. 61–64.
  4. Web site: 8.2.2.3. Character encodings . HTML 5.1 2nd Edition . . User agents must support the encodings defined in the WHATWG Encoding standard, including, but not limited to […].
  5. Web site: Legacy single-byte encodings . Encoding Standard . van Kesteren . Anne . Anne van Kesteren . WHATWG.
  6. Web site: Names and labels . Encoding Standard . van Kesteren . Anne . Anne van Kesteren . WHATWG.
  7. ГОСТ Р 34.303-92. Наборы 8-битных кодированных символов. 8-битный код обмена и обработки информации. = 8-bit coded character sets. 8-bit code for information interchange.
  8. Фигурнов В. Э. IBM PC для пользователя. — 2-е изд. — М.: 1992. — С. 279.
  9. Web site: Rašmenų koduotės . Lietuvių kalba informacinėse technologijose . lt.
  10. Web site: CCSID 1125 information document. https://web.archive.org/web/20141202002732/http://www-01.ibm.com/software/globalization/ccsid/ccsid1125.html. 2014-12-02.
  11. Web site: Review of 8-bit Cyrillic encodings universe . Valentin . Nechayev . 2013 . 2001 . live . https://web.archive.org/web/20161205134629/http://segfault.kiev.ua/cyrillic-encodings/ . 2016-12-05.
  12. Web site: CCSID 1131 information document. https://web.archive.org/web/20160327040306/http://www-01.ibm.com/software/globalization/ccsid/ccsid1131.html. 2016-03-27.
  13. Web site: Code page 1131 information document. https://web.archive.org/web/20160317053255/http://www-01.ibm.com/software/globalization/cp/cp01131.html. 2016-03-17.
  14. Web site: Code page identifiers: CP 01131. IBM Globalization. IBM. https://web.archive.org/web/20160317053255/http://www-01.ibm.com/software/globalization/cp/cp01131.html. 2016-03-17. dead.
  15. Web site: Code Page 01131. https://web.archive.org/web/20150708123408/http://www-03.ibm.com/systems/resources/systems_i_software_globalization_pdf_cp01131z.pdf. 2015-07-08. dead. IBM.
  16. Web site: Linux Wine + Far2l Ukrainian cp866 .
  17. Web site: CCSID 808 information document. https://web.archive.org/web/20141201205309/http://www-01.ibm.com/software/globalization/ccsid/ccsid808.html. 2014-12-01.
  18. Web site: CCSID 848 information document. https://web.archive.org/web/20141201225900/http://www-01.ibm.com/software/globalization/ccsid/ccsid848.html. 2014-12-01.
  19. Web site: CCSID 849 information document. https://web.archive.org/web/20160326215111/http://www-01.ibm.com/software/globalization/ccsid/ccsid849.html. 2016-03-26.
  20. Web site: LC-8021 Dot Matrix Printer, User's Manual. 2020-05-13. 2020-09-29. https://web.archive.org/web/20200929022733/https://www.star-m.jp/eng/service/usermanual/lc8021um.pdf. dead.
  21. Web site: CPIDOS - CPX files (Code Page Information) Pack v3.0 - DOS codepages. FreeDOS. 2018-01-30. https://web.archive.org/web/20180512215037/http://www.fdos.org/kernel/cpi/cpidos.htm. 2018-05-12. dead.
  22. Web site: Yuri . Starikov . 15-летию Russian MS-DOS 4.01 посвящается . 15 Years of Russian MS-DOS 4.01 . Russian . 2005-04-11 . 2014-05-07 . live . https://web.archive.org/web/20161204180814/http://rdos401.org/ . 2016-12-04.
  23. Web site: not an official distribution archive, but contains an older preliminary version of CODEPAGE.LST --> Overview on DOS, OS/2, and Windows codepages . CODEPAGE.LST file . Matthias R. . Paul . 2001-06-10 . 1.59 preliminary . 1995 . 2016-08-20 . live . https://web.archive.org/web/20160420065252/http://www.columbia.edu/~em36/wpdos/MatthiasPaulCPI.zip . 2016-04-20.