Hardware code page: Difference between revisions

Content deleted Content added
bypass disamb
Yobot (talk | contribs)
m WP:CHECKWIKI error fixes using AWB (12020)
Line 2:
 
==Code page assignments==
In North American [[IBM-compatible PC]]s, the hardware code page of the display adapter is typically [[code page 437]]. However, various (Eastern) European, Arabic, Middle Eastern and Asian PCs used a number of other code pages as their hardware code page,<ref name="Paul_2001_CPSwitchFD"/> including [[code page 100]] ("Hebrew"),<ref name="Paul_2002-09-05"/> [[code page 151|151]] ("Nafitha Arabic"),<ref name="Paul_2002-12-04"/> [[code page 367|367]] ("[[ISO/IEC 646|ISO/IEC 646-IRV]] / [[ASCII]]"),<ref name="Paul_2001_CPSwitchFD"/> [[code page 850|850]] ("Multilingual"), encodings like "[[Mazovia encoding|Mazovia]]", "[[Kamenický encoding|Kamenický]]",<ref name="NEC_1992_FlyerPaul_2001_CPSwitchFD"/><ref name="Paul_2001_CPSwitchFDNEC_1992_Flyer"/> "[[MIK code page|MIK]]", and others. Most display adapters support a single 8-bit hardware code page only.<ref name="Paul_2001_CPSwitchFD"/> At most, the hardware code page to be activated was user-selectable via [[jumper (computing)|jumper]]s or [[CMOS setup]]. However, some of the display adapters designed for Eastern European, Arabic and Hebrew PCs supported multiple software-''switchable'' hardware code pages, also named '''font pages'''.<ref name="Paul_2001_CPSwitchFD"/>
 
In contrast to this, printers often support a reasonable amount of user-switchable character sets, often including various variants of the 7-bit [[ISO/IEC 646]] character sets, sometimes also a couple of 8-bit code pages like [[code page 850]],<ref name="NEC_1990_P90"/> [[code page 852|852]],<ref name="NEC_1993_EPROMs"/> [[code page 855|855]],<ref name="NEC_1993_EPROMs"/> [[code page 860|860]],<ref name="NEC_1990_P90"/> [[code page 863|863]],<ref name="NEC_1990_P90"/> [[code page 865|865]],<ref name="NEC_1990_P90"/> and [[code page 866|866]].<ref name="NEC_1993_EPROMs"/> Printers for the Eastern European or Middle Eastern markets sometimes supported other locale-specific hardware code pages to chose from.
 
==Support in operating systems==
When operating systems initialize their codepage switching logic, they need to know but have no means to determine the previously active hardware code page.<ref name="Caldera_1998_USERPaul_2001_CPSwitchFD"/><ref name="Paul_1997_NWDOSTIPCaldera_1998_USER"/><ref name="Paul_2001_NWDOSTIPPaul_1997_NWDOSTIP"/><ref name="Paul_2001_CPSwitchFDPaul_2001_NWDOSTIP"/> Under [[DOS]] this was accomplished by specifying the hardware codepage as a parameter to the [[device driver]]s [[DISPLAY.SYS]] and [[PRINTER.SYS]] (hwcp) in CONFIG.SYS:
 
: <tt>DEVICE=...\DISPLAY.SYS CON=(type,hwcp,n|(n,m))</tt><ref name="Caldera_1998_USERPaul_2001_CPSwitchFD"/><ref name="Paul_1997_NWDOSTIPCaldera_1998_USER"/><ref name="Paul_2001_NWDOSTIPPaul_1997_NWDOSTIP"/><ref name="Paul_2001_CPSwitchFDPaul_2001_NWDOSTIP"/>
 
If no hardware code page was specified, these drivers defaulted either to a dummy code page number 999<ref name="Paul_1997_NWDOSTIPPaul_2001_CPSwitchFD"/><ref name="Paul_2001_NWDOSTIPPaul_1997_NWDOSTIP"/><ref name="Paul_2001_CPSwitchFDPaul_2001_NWDOSTIP"/> or assumed the hardware code page to be equal to the [[primary code page]] (the first codepage listed in [[COUNTRY.SYS]] files for a particular country as specified by the [[CONFIG.SYS]] [[COUNTRY (CONFIG.SYS directive)|COUNTRY]] directive).<ref name="Paul_2001_CPSwitchFD"/>
 
==OEM code pages==
Line 24:
<references>
<ref name="NEC_1990_P90">{{cite book |title=Pinwriter P90 Bedienungshandbuch |language=German |edition=00 11/90 |publisher=[[NEC Deutschland GmbH]] |author=<!--Staff writer(s); no by-line.--> |type=Printed manual |date=1990}}</ref>
<ref name="NEC_1992_Flyer">{{citecitation |title=NEC Pinwriter. Ein Maßstab in der Profiklasse. |language=German |edition=P-EAM-D-5/92 |publisher=[[NEC Deutschland GmbH]] |author=<!--Staff writer(s); no by-line.--> |type=Printed 11-page color flyer about NEC Pinwriters P20/P30, P60/P70 and P90 |date=1992}}</ref>
<ref name="NEC_1993_EPROMs">{{cite book |title=Pinwriter Familie - Pinwriter - Epromsockel - Zusätzliche Zeichensätze / Schriftarten |language=German |publisher=[[NEC Deutschland GmbH]] |author=<!--Staff writer(s); no by-line.--> |date=1993 |edition=00 3/93 |type=Printed reference manual for optional font and codepage [[EPROM]]s for [[NEC Pinwriter]]s, including custom variants}}</ref>
<ref name="Caldera_1998_USER">{{cite book |title=DR-DOS 7.02 User Guide |chapter=Chapter 9 Configuring the System |publisher=[[Caldera, Inc.]] |date=1998 |url=http://www.drdos.net/documentation/usergeng/uglontoc.htm |access-date=2013-08-10 |dead-url=no |archive-url=https://web.archive.org/web/20160607164317/http://www.drdos.net/documentation/usergeng/09ugch9.htm |archive-date=2016-06-07}}</ref>
Line 31:
<ref name="Paul_2001_NWDOSTIP">{{cite book |title=NWDOS-TIPs &mdash; Tips &amp; Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds |work=MPDOSTIP |author-first=Matthias |author-last=Paul |date=2001-04-09 |edition=edition 3, release 183 |language=German |type=e-book}}</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] |dead-url=no |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). Further, in dealing with NLS issues, it is important to distinguish between the current active, the hardware, and the primary codepages 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 437 for the console, but some European clones have 850 stored in the video font ROMs, and I have been told that some Czech CGA and MDA cards had Kamenicky codepage 867 (aka Wordperfect codepage 895) stored in their ROMs. Most printers default to 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=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 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 and Hebrew issues there can be up to 8 codepages for one country [...]) [...] When you specify a line like: 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 codepages 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-09-05">{{citecitation |title=Technical info on undocumented DOS country info for LCASE, ARAMODE and CCTORC records |author-first=Matthias |author-last=Paul |date=2002-09-05 |publisher=FreeDOS development list fd-dev at Topica |url=http://permalink.gmane.org/gmane.os.freedos.devel/364 |access-date=2016-05-26 |dead-url=no |archive-url=https://web.archive.org/web/20160527142512/http://permalink.gmane.org/gmane.os.freedos.devel/364 |archive-date=2016-05-26}}</ref>
<ref name="Paul_2002-12-04">{{cite web |title=DISPLAY CON: |author-first=Matthias |author-last=Paul |date=2002-12-04 |publisher=FreeDOS development list freedos-dev |url=https://marc.info/?l=freedos-dev&m=103902610816421&w=2 |dead-url=no |access-date=2016-06-07}}</ref>
</references><references/>
Line 38:
 
{{DEFAULTSORT:Hardware code page}}
 
[[Category:DOS code pages]]
[[Category:Character sets]]