Jump to content

Microsoft Compiled HTML Help: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Digita (talk | contribs)
Removing link(s) to "XCHM": Removing links to deleted page XCHM.
 
(287 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
{{short description|Online help format by Microsoft}}
{{Unreferenced|date=November 2007}}'''Microsoft Compiled HTML Help''' is a proprietary format for [[Help (online)|online help]] files, developed by [[Microsoft]] and first released in [[1997]] as a successor to the [[Microsoft WinHelp]] format. It was first introduced with the release of [[Windows 98]], and is still supported and distributed through [[Windows XP]] and Vista platforms.
{{Infobox file format
| name = Microsoft Compiled HTML Help
| icon =
| logo =
| screenshot =
| caption =
| extension = .chm
| mime = application/vnd.ms-htmlhelp<ref>{{cite web |last=Techtonik |first=Anatoly |title=application/vnd.ms-htmlhelp |url=https://www.iana.org/assignments/media-types/application/vnd.ms-htmlhelp |date=11 April 2006 |accessdate=7 March 2012}}</ref>
| type code =
| uniform type =
| magic =
| owner = [[Microsoft]]
| released = 1997
| latest release version = 1.4<ref>{{cite web|title=Microsoft HTML Help 1.4|url=https://msdn.microsoft.com/en-us/library/windows/desktop/ms670169(v=vs.85).aspx|website=Windows Dev Center|publisher=Microsoft|accessdate=10 January 2017}}</ref>
| latest release date =
| genre =
| container for =
| contained by =
| extended from =
| extended to = [[Microsoft Reader|.lit]]
| standard =
| url =
}}
{{Infobox software
| name = Microsoft Compiled HTML Help
| screenshot_size = 300px
| developer = [[Microsoft]]
| replaces = [[Microsoft WinHelp]]
| replaced_by = [[Microsoft Help 2]]
| operating system = [[Microsoft Windows]]
| genre = [[Help system]]
}}
'''Microsoft Compiled HTML Help''' is a [[Microsoft]] proprietary [[online help]] format, consisting of a collection of [[HTML]] pages, an index and other navigation tools. The files are compressed and deployed in a binary format with the extension .CHM, for Compiled HTML. The format is often used for [[software documentation]].


It was introduced as the successor to [[Microsoft WinHelp]] with the release of [[Windows 95#Internet Explorer|Windows 95 OSR 2.5]]<ref>{{note|a}}since IE 4 is bundled with OSR 2.5, hence adding the CHM file support for the first time{{note|a}}</ref> and consequently, [[Windows 98]]. Within the Windows NT family, the CHM file support is introduced in [[Windows NT 4.0]]<ref>{{Cite web|url=https://docs.microsoft.com/en-us/security-updates/securitybulletins/2002/ms02-055|title=Microsoft Security Bulletin MS02-055 - Critical|website=docs.microsoft.com|language=en|access-date=2020-10-29}}</ref><ref>{{Cite web|url=https://seclists.org/fulldisclosure/2004/Jul/679|title=Full Disclosure: HtmlHelp - .CHM File Heap Overflow|website=seclists.org|language=en|access-date=2020-10-29}}</ref><ref>{{note|a}}The information available is scarce, but any VM installation of WinNT 4.0 appears to give .CHM file support out of the box. It seems like it wasn't introduced in
HTML Help files are made with [[help authoring tool]]s. [[Microsoft]] ships the [http://www.microsoft.com/downloads/details.aspx?familyid=00535334-c8a6-452f-9aa0-d597d16580cc&displaylang=en Help Workshop] with supported versions of [[Microsoft Windows]] and makes the tool available for free download. There are also a lot of third-party help authoring tools available.
in Windows NT 3.51 due to NT 3.51 being intentionally limited to Internet Explorer 16-bit versions{{note|a}}</ref> and is still supported in [[Windows 11]].<ref>{{Cite web|url=https://community.spiceworks.com/topic/1961503-solved-windows-10-chm-help-files-showing-up-blank|title=[SOLVED] Windows 10 CHM Help Files showing up blank. - Spiceworks|website=community.spiceworks.com|language=en|access-date=2020-10-29}}</ref> Although the format was designed by Microsoft, it has been successfully [[Reverse engineering|reverse-engineered]] and is now supported in many document viewer applications.


==History==
The [[Microsoft Reader]] .LIT file format is basically a modification of the HTML Help CHM format.
{| class="wikitable" border="1"
!Month
!Year
!Description
|-
|February
|1996
|[[Microsoft]] announces plans to stop development of WinHelp and start development on HTML Help.
|-
|August
|1997
|HTML Help 1.0 (HH 1.0) is released with [[Internet Explorer 4]].
|-
|February
|1998
|HTML Help 1.1a ships with [[Windows 98]].
|-
|January
|rowspan=2|2000
|HTML Help 1.3 ships with [[Windows 2000]].
|-
|July
|HTML Help 1.32 releases with [[Internet Explorer 5|Internet Explorer 5.5]] and [[Windows Me]].
|-
|October
|rowspan=2|2001
|HTML Help 1.33 releases with [[Internet Explorer 6]] and [[Windows XP]].
|-
|March
|At the WritersUA (formerly WinWriters) conference, Microsoft announces plans for a new help platform, Help 2, which is also HTML based.
|-
|January
|2003
|Microsoft decides not to release [[Microsoft Help 2]] as a general Help platform.
|}


Microsoft has announced that they do not intend to add any new features to HTML Help.<ref>{{cite web |title=Microsoft HTML Help Downloads |url=http://msdn.microsoft.com/en-us/library/ms669985 |publisher=Microsoft |accessdate=6 March 2012}}</ref>
In [[2002]], Microsoft announced some security risks associated with the .CHM format, as well as some security bulletins and patches <ref>[http://www.winwriters.com/security.htm WinWriters - Security and Microsoft Help<!-- Bot generated title -->]</ref>. They have since announced their intentions not to develop the .CHM format further, and will be moving to a new generation of Windows Help called [[Microsoft Assistance Markup Language]] in the [[Windows Vista]] operating system.

==History==
* February 1996 – [[Microsoft]] announced plans to stop development of WinHelp and start development on HTML Help.
* August 1997 – HTML Help 1.0 (HH 1.0) was released with [[Internet Explorer 4]].
* February 1998 – HTML Help 1.1a shipped with [[Windows 98]].
* January 2000 – HTML Help 1.3 shipped with [[Windows 2000]].
* July 2000 – HTML Help 1.32 released with [[Internet Explorer 5|Internet Explorer 5.5]] and [[Windows Me]].
* October 2001 – HTML Help 1.33 released with [[Internet Explorer 6]] and [[Windows XP]].
* March 2001 – At the [[WritersUA]] (formerly WinWriters) conference, Microsoft announced plans for a new help platform Help 2, also HTML based.
* January 2003 – Microsoft decided not to release [[Microsoft Help 2]] as a general Help platform.


==File format==
==File format==
Help is delivered as a binary file with the .chm extension. It contains a set of HTML files, a [[hyperlink]]ed table of contents, and an index file. The file format has been reverse-engineered and documentation of it is freely available.<ref>{{cite web |last=Wise |first=Paul |last2=Wing |first2=Jed |title=Unofficial (Preliminary) HTML Help Specification |url=http://www.nongnu.org/chmspec/latest/index.html |year=2005 |accessdate=15 August 2012 }}</ref><ref>{{cite web |last=Palade |first=Alexandru |title=Archive::Chm |url=https://metacpan.org/pod/Archive::Chm |year=2005 |accessdate=22 July 2014 }}</ref>
A CHM help file has a ".chm" extension. It has a set of web pages written in a subset of [[HTML]] and a [[hyperlink]]ed table of contents. CHM format is optimized for reading, as files are heavily indexed. All files are compressed together with [[LZX (algorithm)|LZX compression]]. Most CHM browsers have the capability to display a table of contents outside of the body text of the help file.


The file starts with bytes "ITSF" (in ASCII), for "Info-Tech Storage Format". The format has been partially reverse engineered and there are [http://www.speakeasy.org/~russotto/chm/chmformat.html container] and [http://chmspec.nongnu.org/latest/ internal files] specifications available.
The file starts with bytes "ITSF" (in [[ASCII]]), for "Info-Tech Storage Format", which is the internal name given by Microsoft to the generic storage file format used for CHM files.<ref>{{Cite web|title=Virus Bulletin :: Chamber of horrors|url=https://www.virusbulletin.com/virusbulletin/2006/10/chamber-horrors/|access-date=2022-01-05|website=www.virusbulletin.com}}</ref>


CHM files support the following features:
On Windows computers, this help file can be [[Compiler|compiled]] using <tt>hhc.exe</tt>, which is distributed at no charge with the [[HTML Help Workshop]].
* Data compression (using [[LZX]])
* Built-in search engine
There are some [[open source]] tools which can read and explore these files (see for example [http://xchm.sourceforge.net xCHM], [http://www.kchmviewer.net/ KchmViewer], [http://gnochm.sourceforge.net/ GnoCHM], [http://chmox.sourceforge.net/ Chmox for OS X], [http://sourceforge.net/projects/chamonix/ Chamonix for OS X], [[Help Explorer Viewer]], or the [[Firefox]] add-on [http://addons.mozilla.org/firefox/addon/3235 CHM Reader]), but they lack various features of the [[Microsoft Windows]] tools, most importantly a write support.
* Ability to merge multiple .chm help files
* Extended character support, although it does not fully support [[Unicode]].<ref>{{cite web|title=INFO: Limited Unicode Support in HTML Help|url=http://support.microsoft.com/kb/269766/|publisher=Microsoft|date=11 April 2001|accessdate=17 March 2012|archive-url=https://web.archive.org/web/20160313203857/https://support.microsoft.com/en-us/kb/269766/|archive-date=13 March 2016}}</ref>


==Use in Windows applications==
==Advantages==
The [[Microsoft Reader]]'s .lit file format is a modification of the HTML Help CHM format. CHM files are sometimes used for e-books.<ref>{{cite book| title=Handbook of Data Compression
* File size smaller than plain HTML
| first1=David |last1=Salomon |first2=Giovanni |last2=Motta |first3=David (CON) |last3=Bryant
* Range of formatting options that HTML gives for text presentation
| edition = 5th, illustrated
* Ability to search the full text
| publisher=Springer
* Ability to assemble several CHM files into one file with common TOC, index and search (see MSDN)
| year = 2009
* Ability to Generate TOC and Topic Folders containing International Characters standard HTML Help will not generate these correctly.
| isbn=978-1-84882-902-2
| url=https://archive.org/details/handbookofdataco0000salo
| url-access=registration
}}</ref>


[[Sumatra PDF]] supports viewing CHM documents since version 1.9.
==Applications==


Various applications, such as HTML Help Workshop and [[7-Zip]] can decompile CHM files. The hh.exe utility on Windows and the extract_chmLib utility (a component of chmlib) on Linux can also decompile CHM files.
This format was originally intended only for encoding help files, but other uses have since been found. It is very handy for packing saved HTML pages in one compact and browsable archive and for creating compact [[e-book]]s. Some people use it to keep personal notes, because it can organize them in an ordered hierarchical table and allows quick text searching.


Microsoft's HTML Help Workshop and Compiler generate CHM files by instructions stored in a HTML Help project. The file name of such a project has the extension .HHP and the file is just a text with the [[INI file]] format.<ref>{{cite web |last=Wise |first=Paul |last2=Wing |first2=Jed |title=Unofficial (Preliminary) HTML Help Specification INI formats|url=http://chmspec.nongnu.org/latest/INI.html#HHP |year=2005 |accessdate=1 February 2018 }}</ref>
==Extracting to HTML==


The [[Free Pascal]] project has a compiler (chmcmd) that can create CHM files in a multiplatform way.
On Windows, a CHM file can be extracted to plain HTML with the command:
hh.exe -decompile ''extracted'' ''filename.chm''
This will decompress all files embedded in <code>''filename.chm''</code> to folder <code>''extracted''</code>.


==Use in non-Windows applications==
or by using HTML Help Workshop. <!-- Can PowerCHM do this? -->
Read support:
* GTK: {{SourceForge|gnochm|GnoCHM}}, [http://code.google.com/p/chmsee CHMsee], [https://github.com/ojuba-org/chmviewkit chmviewkit]
* Qt: [[Okular]], [http://www.kchmviewer.net/ kchmviewer], {{SourceForge|kchm|KCHM}}
* Java: {{SourceForge|chmpane|CHMPane}}
* iOS: [https://itunes.apple.com/us/app/chmate-neue-chm-reader-reloaded/id335157929?mt=8 CHMate Neue], [http://www.robinlu.com/ichm iChm] {{Webarchive|url=https://web.archive.org/web/20180121210630/http://www.robinlu.com/ichm |date=2018-01-21 }}, [https://itunes.apple.com/us/app/chmplus-pro-chm-reader/id441521818?ls=1&mt=8 ChmPlus], [https://sites.google.com/site/readchm/ ReadCHM] {{Webarchive|url=https://web.archive.org/web/20140323184506/https://sites.google.com/site/readchm/ |date=2014-03-23 }}
* Android: [https://play.google.com/store/apps/details?id=com.kingreader.framework&feature=search_result KingReader]{{dead link|date=June 2017 |bot=InternetArchiveBot |fix-attempted=yes }}, [https://web.archive.org/web/20140919063747/https://play.google.com/store/apps/details?id=org.hystudio.android.chm Chm Reader], [https://play.google.com/store/apps/details?id=com.chaozh.iReader&feature=search_result iReader]
* Mac OS X: [http://www.robinlu.com/ichm iChm] {{Webarchive|url=https://web.archive.org/web/20180121210630/http://www.robinlu.com/ichm |date=2018-01-21 }} (Discontinued), [https://itunes.apple.com/us/app/chmplus-chm-reader/id588628901?ls=1&mt=12 ChmPlus] (Discontinued), [http://chmox.sourceforge.net/ CHMox](PowerPC apps no longer supported), [http://code.google.com/p/archmock/ ArCHMock] (Discontinued), [http://www.enolsoft.com/chm-to-epub-for-mac.html CHM to EPUB] {{Webarchive|url=https://web.archive.org/web/20190329171517/https://www.enolsoft.com/chm-to-epub-for-mac.html |date=2019-03-29 }} (Discontinued), [https://itunes.apple.com/us/app/clearview-reader/id557090104 Clearview Reader]
* Other / Cross-platform: xCHM, {{SourceForge|archmage|arCHMage}}, [https://www.linux-apps.com/p/998057 DisplayCHM]
* Amiga: [http://aminet.net/search.php?query=libmspack libmspack] on [[Aminet]]


Read/write support:
On Windows, as a hack, select the topmost Topic, right-click and select Print. On the popup dialog, select "Print this heading and all subtopics.", click OK. Before selecting a printer, look in %HOMEPATH%\Local Settings\Temp for a file named ~hh*.htm. This is the concatinated HTML. The image reference will refer back to the .chm file at the time of the "print".
* [[Lazarus (IDE)]]/[[Free Pascal]] (for a [[doxygen]] like tool, a separate [[command-line]] [[compiler]] in 2.6.0+, and a simple viewer in Lazarus)


==See also==
On Linux systems which use apt as a packaging tool, a CHM file is extracted to plain HTML with (first command is for a [[Debian]] based OS)
{{Wikibookspar|Windows Programming|Compiled HTML Help}}
$ sudo apt-get install libchm-bin
* [[WinHelp]]
$ extract_chmLib tero.chm tero/
* [[Microsoft Help 2]]

* [[Comparison of documentation generators]]
Another useful set of tools for CHM files in non-Windows environments is the [http://www.speakeasy.org/~russotto/chm/ CHM Tools Package]. It's available as source code, and includes a program, chmdump, which extracts the HTML from a CHM file into a separate directory.

It's also available for [[Mac OS X]] via [[MacPorts]].

If MacPorts is installed on your system, you can type:
$ sudo port install chmdump

at a Terminal prompt to install the package. You can then extract a CHM file with:
$ chmdump chmfile.chm outdir

==Known problems==
Some CHM files behave poorly under IE7. Printing Topics will crash the CHM viewer on malformed HTML.


==References==
==References==
{{Reflist|2}}
<references/>


==See also==
==External links==
*[[Windows Help|Microsoft WinHelp]]
*[[Microsoft Help 2]]

== External links ==
* [http://savannah.nongnu.org/projects/chmspec GNU Savannah Unofficial HTML Help Specification]
* [http://msdn2.microsoft.com/en-us/library/bb267846.aspx HTML Help Web Page on MSDN]
* [http://msdn2.microsoft.com/en-us/library/bb267846.aspx HTML Help Web Page on MSDN]
* [http://msdn2.microsoft.com/en-us/library/bb165722(VS.80).aspx Microsoft Help 2 Reference] (part of Visual Studio SDK for VS7.1 and VS8.0)
* [http://msdn2.microsoft.com/en-us/library/bb165722(VS.80).aspx Microsoft Help 2 Reference] (part of Visual Studio SDK for VS7.1 and VS8.0)
* [http://www.helpware.net/htmlhelp/hh_info.htm History of HTML Help]
* [https://web.archive.org/web/20060718005033/http://www.helpware.net/htmlhelp/hh_info.htm History of HTML Help]
* [http://www.nongnu.org/chmspec/latest/index.html Unofficial (Preliminary) HTML Help Specification] (the linked ITSF specification has been moved to [http://www.russotto.net/chm/chmformat.html the Russotto.net domain])
* [http://chmox.sourceforge.net/ Chmox] Reader for the [[Mac OS X]] platform
* [http://trexinc.sourceforge.net/chmview.php chmview]
* [http://www.chmlib.com Free Online Library Of Help Files]
* [http://xchm.sourceforge.net/ xchm, cross-platform GUI front-end to chmlib]
* [http://www.kchmviewer.net/ A Qt/KDE based viewer of CHM files]
* [http://www.drexplain.com/press/chm-files-the-page-cannot-be-displayed-error/ Typical solutions for problems with accessing and displaying CHM files]
* [http://code.google.com/p/chm2pdf/ A free, open CHM to PDF converter for Linux/Unix]
* [http://gnochm.sourceforge.net/index.html GnoCHM is a CHM file viewer for Gnome [[Linux]].]
* [http://www.help-explorer.com Help Explorer Viewer and Help Explorer Server for viewing of different compiled help file formats and publishing on the Web.]


{{Microsoft Windows components}}

{{DEFAULTSORT:Microsoft Compiled Html Help}}
[[Category:Internet Explorer]]
[[Category:Technical communication]]
[[Category:Technical communication]]
[[Category:Online help]]
[[Category:Online help]]

[[de:CHM (Dateiformat)]]
[[es:Microsoft_Compiled_HTML_Help]]
[[fr:Microsoft Compressed HTML]]
[[it:Microsoft Compressed HTML Help]]
[[ja:Microsoft Compiled HTML Help]]
[[pl:HTML Help]]
[[ru:HTMLHelp]]
[[sr:CHM]]
[[zh:CHM]]

Latest revision as of 22:29, 7 April 2024

Microsoft Compiled HTML Help
Filename extension
.chm
Internet media type
application/vnd.ms-htmlhelp[1]
Developed byMicrosoft
Initial release1997
Latest release
1.4[2]
Extended to.lit
Microsoft Compiled HTML Help
Developer(s)Microsoft
Operating systemMicrosoft Windows
PredecessorMicrosoft WinHelp
SuccessorMicrosoft Help 2
TypeHelp system

Microsoft Compiled HTML Help is a Microsoft proprietary online help format, consisting of a collection of HTML pages, an index and other navigation tools. The files are compressed and deployed in a binary format with the extension .CHM, for Compiled HTML. The format is often used for software documentation.

It was introduced as the successor to Microsoft WinHelp with the release of Windows 95 OSR 2.5[3] and consequently, Windows 98. Within the Windows NT family, the CHM file support is introduced in Windows NT 4.0[4][5][6] and is still supported in Windows 11.[7] Although the format was designed by Microsoft, it has been successfully reverse-engineered and is now supported in many document viewer applications.

History[edit]

Month Year Description
February 1996 Microsoft announces plans to stop development of WinHelp and start development on HTML Help.
August 1997 HTML Help 1.0 (HH 1.0) is released with Internet Explorer 4.
February 1998 HTML Help 1.1a ships with Windows 98.
January 2000 HTML Help 1.3 ships with Windows 2000.
July HTML Help 1.32 releases with Internet Explorer 5.5 and Windows Me.
October 2001 HTML Help 1.33 releases with Internet Explorer 6 and Windows XP.
March At the WritersUA (formerly WinWriters) conference, Microsoft announces plans for a new help platform, Help 2, which is also HTML based.
January 2003 Microsoft decides not to release Microsoft Help 2 as a general Help platform.

Microsoft has announced that they do not intend to add any new features to HTML Help.[8]

File format[edit]

Help is delivered as a binary file with the .chm extension. It contains a set of HTML files, a hyperlinked table of contents, and an index file. The file format has been reverse-engineered and documentation of it is freely available.[9][10]

The file starts with bytes "ITSF" (in ASCII), for "Info-Tech Storage Format", which is the internal name given by Microsoft to the generic storage file format used for CHM files.[11]

CHM files support the following features:

  • Data compression (using LZX)
  • Built-in search engine
  • Ability to merge multiple .chm help files
  • Extended character support, although it does not fully support Unicode.[12]

Use in Windows applications[edit]

The Microsoft Reader's .lit file format is a modification of the HTML Help CHM format. CHM files are sometimes used for e-books.[13]

Sumatra PDF supports viewing CHM documents since version 1.9.

Various applications, such as HTML Help Workshop and 7-Zip can decompile CHM files. The hh.exe utility on Windows and the extract_chmLib utility (a component of chmlib) on Linux can also decompile CHM files.

Microsoft's HTML Help Workshop and Compiler generate CHM files by instructions stored in a HTML Help project. The file name of such a project has the extension .HHP and the file is just a text with the INI file format.[14]

The Free Pascal project has a compiler (chmcmd) that can create CHM files in a multiplatform way.

Use in non-Windows applications[edit]

Read support:

Read/write support:

See also[edit]

References[edit]

  1. ^ Techtonik, Anatoly (11 April 2006). "application/vnd.ms-htmlhelp". Retrieved 7 March 2012.
  2. ^ "Microsoft HTML Help 1.4". Windows Dev Center. Microsoft. Retrieved 10 January 2017.
  3. ^ ^ since IE 4 is bundled with OSR 2.5, hence adding the CHM file support for the first time^
  4. ^ "Microsoft Security Bulletin MS02-055 - Critical". docs.microsoft.com. Retrieved 2020-10-29.
  5. ^ "Full Disclosure: HtmlHelp - .CHM File Heap Overflow". seclists.org. Retrieved 2020-10-29.
  6. ^ ^ The information available is scarce, but any VM installation of WinNT 4.0 appears to give .CHM file support out of the box. It seems like it wasn't introduced in in Windows NT 3.51 due to NT 3.51 being intentionally limited to Internet Explorer 16-bit versions^
  7. ^ "[SOLVED] Windows 10 CHM Help Files showing up blank. - Spiceworks". community.spiceworks.com. Retrieved 2020-10-29.
  8. ^ "Microsoft HTML Help Downloads". Microsoft. Retrieved 6 March 2012.
  9. ^ Wise, Paul; Wing, Jed (2005). "Unofficial (Preliminary) HTML Help Specification". Retrieved 15 August 2012.
  10. ^ Palade, Alexandru (2005). "Archive::Chm". Retrieved 22 July 2014.
  11. ^ "Virus Bulletin :: Chamber of horrors". www.virusbulletin.com. Retrieved 2022-01-05.
  12. ^ "INFO: Limited Unicode Support in HTML Help". Microsoft. 11 April 2001. Archived from the original on 13 March 2016. Retrieved 17 March 2012.
  13. ^ Salomon, David; Motta, Giovanni; Bryant, David (CON) (2009). Handbook of Data Compression (5th, illustrated ed.). Springer. ISBN 978-1-84882-902-2.
  14. ^ Wise, Paul; Wing, Jed (2005). "Unofficial (Preliminary) HTML Help Specification INI formats". Retrieved 1 February 2018.

External links[edit]