Content deleted Content added
Matthiaspaul (talk | contribs) →References: improved ref |
m →Support in operating systems: Improve CONFIG.SYS samples |
||
(26 intermediate revisions by 11 users not shown) | |||
Line 1:
{{short description|Code page supported natively by a hardware device}}
{{anchor|Fontpage|Display|Printer|Default}}In computing, a '''hardware code page''' ('''HWCP''') refers to a [[code page]] supported natively by a hardware device such as a [[display adapter]] or [[printer (computing)|printer]]. The [[glyph]]s to present the characters are stored in the [[alphanumeric character generator]]'s resident read-only memory (like [[Read-only memory|ROM]] or flash) and are thus not user-changeable.<ref name="Paul_2001_CPSwitchFD"/><ref name="XyWrite_2009"/><ref name="Phoenix_1991_BIOS"/> They are available for use by the system without having to load any [[computer font|font]] definitions into the device first. Startup messages issued by a [[Personal computer|PC]]'s [[System BIOS]] or displayed by an [[operating system]] before initializing its own code page switching logic and font management and before switching to [[graphics mode]] are displayed in a computer's '''default hardware code page'''.▼
{{use dmy dates|date=July 2019|cs1-dates=y}}
{{use list-defined references|date=January 2022}}
{{anchor|Fontpage|Display|Printer|Default}}
▲
==Code page assignments==
In North American [[IBM-compatible PC]]s, the hardware code page of the display adapter is typically [[code page 437]].<ref name="
In contrast to this, printers frequently support several user-switchable character sets, often including various variants of the 7-bit [[ISO/IEC 646]] character sets such as [[code page 367]] ("[[ISO/IEC 646-US]] / [[ASCII]]"<ref name="Paul_2001_CPSwitchFD"/>), sometimes also a couple of 8-bit code pages like [[code page 437]],<ref name="Fujitsu_1994_DL6400_DL6600"/><ref name="NEC_1990_P90"/><ref name="Epson_1991_GQ"/> [[code page 850|850]],<ref name="Fujitsu_1994_DL6400_DL6600"/><ref name="NEC_1990_P90"/><ref name="Epson_1991_GQ"/>
==Support in operating systems==
When operating systems initialize their code page switching logic, they need to know but have no means to determine the previously active hardware code page by themselves. Therefore, for code page switching to work correctly, the hardware code page needs to be specified.<ref name="Paul_2001_CPSwitchFD"/><ref name="Caldera_1998_USER-9"/><ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_2001_NWDOSTIP"/>
Under [[DOS]] and [[Windows 9x]] this is accomplished by specifying the hardware code page as a parameter (hwcp) to the [[device driver]]s
If multiple hardware code pages are supported in OEM issues, the first hardware code page (hwcp1) in the list specifies the default hardware code page:
If no hardware code page(s) are specified, these drivers default either to a dummy code page number 999<ref name="Paul_2001_CPSwitchFD"/><ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_2001_NWDOSTIP"/> or assume the hardware code page to be equal to the
In many English-speaking countries, the primary code page is either 437 (f.e. in the US) or 850 (f.e. in the UK, Ireland and Canada),<ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_2001_NWDOSTIP"/> so that, without specifying a different code page, the system would often assume one of these to be the corresponding device's default hardware code page as well.<ref name="Paul_2001_CPSwitchFD"/>
If a hardware code page does not match one of those with official code page assignments, an arbitrary number from the range 57344–61439 (E000h–EFFFh) for [[user-definable code page]]s or 65280–65533 (FF00h–FFFDh) for [[private use code page]]s could be specified per [[IBM CDRA]] to give the operating system a non-conflictive "handle" to select that code page.
[[Arabic MS-DOS|Arabic]] and [[Hebrew MS-DOS]] do not use DISPLAY.SYS and PRINTER.SYS, but provide similar facilities using
==OEM code pages==
Hardware code pages are also [[OEM code page]]s. The designation "OEM", for "[[original equipment manufacturer]]", indicates that the character set could be changed by the manufacturer to meet different markets.<ref name="Chen_2005_CP"/><ref name="Chen_2005_OEM"/>
However, OEM code pages do not necessarily reside in ROM, but include so called
==See also==
Line 36 ⟶ 40:
==Notes==
{{
<ref group="nb" name="Escape_sequence_Epson_NEC">On [[Epson]], [[NEC]] and [[Fujitsu]] [[ESC/P]] compatible printers, the [[escape sequence]] to switch to various hardware code pages is <code>ESC R (n)</code> with (n) = 0..254 being a code associated with specific character sets. The range of supported codes depends on the printer model and installed font options.</ref>
<ref group="nb" name="NB_OmniGo_300">The "International English" version of the [[HP OmniBook 300]] uses [[code page 850]] (rather than the more common [[code page 437]]) as hardware code page.</ref>
Line 42 ⟶ 46:
==References==
{{
<ref name="NEC_1990_P90">{{cite book |title=Pinwriter P90 Bedienungshandbuch |language=
<ref name="Epson_1991_GQ">{{cite book |title=Programmierung des GQ-Modus für Epson-Seitendrucker |language=
<ref name="Epson_1992_EPL-4300">{{cite book |title=Epson EPL-4300 Bedienungs-Handbuch |language=
<ref name="NEC_1992_Flyer">{{citation |title=NEC Pinwriter. Ein Maßstab in der Profiklasse. |language=
<ref name="NEC_1993_EPROMs">{{cite book |title=Pinwriter Familie - Pinwriter - Epromsockel - Zusätzliche Zeichensätze / Schriftarten |language=
<ref name="Caldera_1998_USER-9">{{cite book |title=Caldera DR-DOS 7.02 User Guide |chapter=Chapter 9: Configuring the System |publisher=[[Caldera, Inc.]] |date=1998 |orig-date=1993, 1997 |chapter-url=http://www.drdos.net/documentation/usergeng/09ugch9.htm#807 |
<ref name="Caldera_1998_USER-17">{{cite book |title=Caldera DR-DOS 7.02 User Guide |chapter=Chapter 17: Setting Up Code Page Switching |publisher=[[Caldera, Inc.]] |date=1998 |orig-date=1993, 1997 |chapter-url=http://www.drdos.net/documentation/usergeng/
<ref name="Paul_1997_NWDOSTIP">{{cite book |title=NWDOS-TIPs — Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds |id=MPDOSTIP |author-first=Matthias R. |author-last=Paul |date=1997-07-30 |edition=3 |version=Release 157 |language=de |url=http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm |access-date=2012-01-11 |url-status=live |archive-url=https://web.archive.org/web/20160522014302/http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm |archive-date=2016-05-22}} (NB. NWDOSTIP.TXT is a comprehensive work on [[Novell DOS 7]] and [[OpenDOS 7.01]], including the description of many undocumented features and internals. It is part of the author's yet larger MPDOSTIP.ZIP collection maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the NWDOSTIP.TXT file.)</ref>
<ref name="
<ref name="Paul_2001_CPSwitchFD">{{cite web |title=Changing codepages in FreeDOS |author-first=Matthias R. |author-last=Paul |date=2001-08-15 |access-date=2016-06-06 |url=http://www.freedos.org/technotes/technote/txt/141.txt |type=Technical design specification
<ref name="Paul_2002-09-05">{{cite web |title=Technical info on undocumented DOS country info for LCASE, ARAMODE and CCTORC records |author-first=Matthias R. |author-last=Paul |date=2002-09-05 |work=FreeDOS development list fd-dev at Topica |url=http://permalink.gmane.org/gmane.os.freedos.devel/364 |access-date=2016-05-26 |url-status=dead |archive-url=https://web.archive.org/web/20160527142512/http://permalink.gmane.org/gmane.os.freedos.devel/364 |archive-date=2016-05-27}}</ref>
▲<ref name="Paul_2001_CPSwitchFD">{{cite web |title=Changing codepages in FreeDOS |author-first=Matthias |author-last=Paul |date=2001-08-15 |access-date=2016-06-06 |url=http://www.freedos.org/technotes/technote/txt/141.txt |type=Technical design specification based on fd-dev post [http://marc.info/?l=freedos-dev&m=99788711909602&w=2<!-- https://archive.is/20141001010931/http://marc.info/?l=freedos-dev&m=99788711909602&w=2 -->] |dead-url=yes |archive-url=https://web.archive.org/web/20160606182501/http://www.freedos.org/technotes/technote/txt/141.txt |archive-date=2016-06-06 |quote=[…] The […] active system codepage […] sometimes also called global codepage […] is the codepage currently in use for the [[DOS kernel]], for example the collating order and other [[I18N]] tables depend on this codepage. While in most cases the system codepage reflects the codepage used for devices such as console ([[DISPLAY.SYS]]), printers ([[PRINTER.SYS]]), and keyboard ([[KEYB.COM]]), this is not a requirement as there are means to switch the individual device codepages without changing the system codepage (for example using [[MODE (DOS command)|MODE]]). Further, in dealing with [[National Language Support|NLS]] issues, it is important to distinguish between the currently active, the hardware, and the [[primary code page|primary codepage]]s for any device and/or the system. The hardware codepage is the default codepage supported by a device after initialization of the hardware. It normally defaults to [[Code page 437|437]] for the console, but some European clones have [[Code page 850|850]] stored in the video font ROMs, and I have been told that some Czech [[Color Graphics Adapter|CGA]] and [[Monochrome Display Adapter|MDA]] cards had [[Kamenický encoding|Kamenicky]] codepage 867 (aka [[Wordperfect]] codepage 895) stored in their ROMs. Most printers default to [[Code page 367|367]] ([[ISO-646-US]] 7-bit) or 437 on power up, and the default system, or global, codepage for the system is always 437 under [[DR-DOS]] […] but under [[MS-DOS]]/[[PC DOS]] it reflects the codepage entry in [[COUNTRY (CONFIG.SYS directive)|COUNTRY]]=country,codepage,filespec where it must be one of the codepages valid for the given country as per [[COUNTRY.SYS]] filespec - this is 437 (or 850 on newer systems) in most cases, but not necessarily. The default country is 1 (USA), the default filespec is "\COUNTRY.SYS", and if no filespec is found the system will work with the statically pre-initialized data in the kernel which is the data for the USA in most cases. If no codepage is given with COUNTRY, the [[DOS BIOS]] will search for the first codepage entry for a given country (or 1), this is called the primary codepage. The codepage value of 0 is used internally to retrieve this codepage, and for the COUNTRY.SYS file parsers in the DOS BIOS and [[NLSFUNC]], a codepage value of zero means "match any codepage, whatever comes first for the given country code". So, it depends on the order of codepage entries in the COUNTRY.SYS file if the system will default to 437, 850, or something else. […] However, some Arabic and Hebrew [[Hercules Graphics Card|HGC]] and CGA cards have multiple hardware fonts, so called fontpages, […] so that a device may support multiple hardware codepages at the same time. The corresponding fontpage functions are INT 2Fh/AD41h and INT 2Fh/AD42h. […] COUNTRY.SYS and [[KEYBOARD.SYS]] contain only two codepage entries for a given country in Western issues of DOS. (In [[Arabic MS-DOS|Arabic]] and [[Hebrew MS-DOS|Hebrew]] issues there can be up to 8 codepages for one country […]) […] When you specify a line like: [[DEVICE (CONFIG.SYS directive)|DEVICE]]=…\display.sys con=(ega,437,1) […] DISPLAY.SYS is told that 437 should be assumed to be the hardware codepage of the display adapter. This is necessary to be known by DISPLAY.SYS because it will use different mechanisms to switch to the software [[prepared code page|prepared codepage]]s and the hardware codepage, and there is no way to retrieve the info about the hardware codepage by itself. When the requested codepage is equal to the hardware codepage declared here, DISPLAY.SYS will use the method to switch to the hardware codepage, otherwise it will attempt to look up the font info in its internal buffer. […]}}</ref>
<ref name="Paul_2002-
<ref name="
<ref name="
<ref name="
<ref name="
<ref name="
<ref name="
<ref name="
<ref name="
<ref name="
<ref name="Fujitsu_1994_DL6400_DL6600">{{cite book |title=Fujitsu DL6400/DL6600 Dot Matrix Printer User's Manual |publisher=[[Fujitsu Limited]] |date=April 1994 |id=C147-E015-01EN |url=http://www.fujitsu.com/downloads/COMP/fcpa/printers/dl6400_user-manual.pdf |access-date=2016-06-14 |
<ref name="Wilton_1987">{{cite book |title=Programmer's guide to the PC & PS/2 video systems |author-first=Richard |author-last=Wilton |date=1987 |edition=
▲<ref name="Fujitsu_1994_DL6400_DL6600">{{cite book |title=Fujitsu DL6400/DL6600 Dot Matrix Printer User's Manual |publisher=[[Fujitsu Limited]] |date=April 1994 |id=C147-E015-01EN |url=http://www.fujitsu.com/downloads/COMP/fcpa/printers/dl6400_user-manual.pdf |access-date=2016-06-14 |dead-url=no |archive-url=https://web.archive.org/web/20160614143230/http://www.fujitsu.com/downloads/COMP/fcpa/printers/dl6400_user-manual.pdf |archive-date=2016-06-14}}</ref>
<ref name="
▲<ref name="Wilton_1987">{{cite book |title=Programmer's guide to the PC & PS/2 video systems |author-first=Richard |author-last=Wilton |date=1987 |edition=1st |publisher=[[Microsoft Press]] |isbn=1-55615-103-9}} (NB. The second edition does no longer discuss the [[Hercules InColor Card|InColor]] and [[Multi-Color Graphics Array|MCGA]] cards at detail level.)</ref>
<ref name="
<ref name="
<ref name="Ferraro_1994">{{cite book |title=Programmer's Guide to the EGA, VGA and Super VGA Cards |author-first=Richard F. |author-last=Ferraro |edition=
<ref name="Paul_2001_COUNTRY">{{cite web |title=DOS COUNTRY.SYS file format |type=COUNTRY.LST file |author-first=Matthias R. |author-last=Paul |date=2001-06-10 |edition=1.44 |orig-date=1995 |url=http://www.columbia.edu/~em36/wpdos/MatthiasPaulCPI.zip<!-- not an official distribution archive, but contains an older version of COUNTRY.LST --> |access-date=2016-08-20 |url-status=live |archive-url=https://web.archive.org/web/20160420065252/http://www.columbia.edu/~em36/wpdos/MatthiasPaulCPI.zip |archive-date=2016-04-20}}</ref>
▲<ref name="Ferraro_1994">{{cite book |title=Programmer's Guide to the EGA, VGA and Super VGA Cards |author-first=Richard F. |author-last=Ferraro |edition=3rd |date=August 1994 |publisher=[[Addison-Wesley Publishing Company, Inc.]] |isbn=0-201-62490-7 |id={{EAN|9780201624908}}}}</ref>
<ref name="
<ref name="
<ref name="
<ref name="Haralambous_2007_CPI">{{cite book |title=Fonts & Encodings |url=https://archive.org/details/fontsencodings00hara_390 |url-access=limited |author-first=Yannis |author-last=Haralambous |translator-first=P. Scott |translator-last=Horne |___location=Sebastopol, California, USA |publisher=[[O'Reilly Media, Inc.]] |date=September 2007 |edition=1 |isbn=978-0-596-10242-5 |pages=[https://archive.org/details/fontsencodings00hara_390/page/n621 601]–602, 611}}</ref>
▲<ref name="AEB_2001_CPI">{{cite web |title=CPI fonts |author-first=Andries Evert |author-last=Brouwer |author-link=Andries Evert Brouwer |date=2001-02-10 |version=0.2 |url=https://www.win.tue.nl/~aeb/linux/kbd/font-formats-3.html |access-date=2016-09-22 |dead-url=no |archive-url=https://web.archive.org/web/20160922165133/https://www.win.tue.nl/~aeb/linux/kbd/font-formats-3.html |archive-date=2016-09-22}}</ref>
<ref name="
<ref name="Hart_1985">{{cite journal |author-first1=Glenn A. |author-last1=Hart |author-first2=Jim |author-last2=Forney |title=Video Board Reviews: Persyst BoB Color Adapter |journal=[[PC Magazine]] |date=1985-02-19 |publisher=[[Ziff Davis, Inc.]] |pages=121–133 |url=https://books.google.com/books?id=Q2ad61ZUYQMC&pg=PA132
▲<ref name="Hart_1985">{{cite journal |author-first1=Glenn A. |author-last1=Hart |author-first2=Jim |author-last2=Forney |title=Video Board Reviews: Persyst BoB Color Adapter |journal=[[PC Magazine]] |date=1985-02-19 |pages=121–133 |url=https://books.google.com/books?id=Q2ad61ZUYQMC&pg=PA132 |publisher=[[Ziff Davis, Inc.]]}}</ref>
<ref name="Derfler_1985">{{cite journal |author-first=Frank J. |author-last=Derfler, Jr. |title=Expansion Options: Persyst Color Combo: Fit for an XT |journal=[[PC Magazine]] |date=1985-10-29 |url=https://books.google.com/books?id=jBnPebByBGkC&pg=PA195 |pages=196–199 |publisher=[[Ziff Davis, Inc.]] |access-date=2017-08-12}}</ref>
<ref name="CW_1988">{{cite journal |url=http://www.computerwoche.de/a/grafik-und-netzwerk-auf-einer-karte,1154889 |access-date=2016-11-24 |journal=[[Computerwoche]] |language=
<ref name="Hercules_1988">{{cite journal |date=1988-05-31 |journal=[[PC Magazine]] |url=https://books.google.com/books?id=voPUUGTC56UC&pg
<ref name="NEC_1983_APC">{{cite book |title=Advanced Personal Computer - MS-DOS System Programmer's Guide |publisher=[[NEC Corporation]] |author=
|id=part number 819-000104-3001 |edition=REV 00 |url=http://bitsavers.informatik.uni-stuttgart.de/pdf/nec/APC/NEC_APC_MS-DOS_System_Programmers_Guide_Sep83.pdf |access-date=2016-11-25 |
<ref name="HP_1985_PP">{{cite book |title=Hewlett-Packard - Technical Reference Manual - Portable PLUS |date=August 1985 |edition=1 |id=45559-90001 |publisher=[[Hewlett-Packard Company]], Portable Computer Division |___location=Corvallis, OR, USA |url=https://archive.org/details/bitsavers_hpportableblePLUSTechnicalReferenceManualAug1985_25919880 |access-date=2016-11-27
<ref name="HP_1986_PP">{{cite book |title=Hewlett-Packard - Technical Reference Manual - Portable PLUS |date=December 1986 |orig-
<ref name="HP_1991_95LXUG">{{cite book |title=HP 95LX User's Guide |publisher=[[Hewlett-Packard Company]], Corvallis Division |___location=Corvallis, OR, USA |edition=2 |date=June 1991 |orig-
<ref name="HP_1996_200LXUG">{{cite book |title=HP 200LX User's Guide |publisher=[[Hewlett-Packard Singapore (Private) Limited]], Asia-Pacific Personal Computer Division |___location=Singapore |edition=1 |date=October 1996
<ref name="Sargent_1988_Sirius">{{cite book |title=Assemblersprache und Hardware des IBM PC/XT/AT |language=
}}
== External links ==
* {{cite web |url=https://www.vogons.org/viewtopic.php?f=46&t=44883 |title=Non-US character ROMs from MDA/CGA/Hercules cards? |date=2015-09-14 |access-date=2016-06-09 |
{{Character encoding}}
Line 97 ⟶ 100:
{{DEFAULTSORT:Hardware code page}}
[[Category:DOS code pages]]
[[Category:Character encoding]]
|