blob: 0b2efeb48c9f19d2ffe4aa7528e00a352c0f379a [file] [log] [blame]
Georg Brandl9087b7f2008-05-18 07:53:01 +00001:mod:`html.entities` --- Definitions of HTML general entities
2=============================================================
3
4.. module:: html.entities
5 :synopsis: Definitions of HTML general entities.
6.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
7
8
9This module defines three dictionaries, ``name2codepoint``, ``codepoint2name``,
10and ``entitydefs``. ``entitydefs`` is used by the :mod:`htmllib` module to
11provide the :attr:`entitydefs` member of the :class:`html.parser.HTMLParser`
12class. The definition provided here contains all the entities defined by XHTML
131.0 that can be handled using simple textual substitution in the Latin-1
14character set (ISO-8859-1).
15
16
17.. data:: entitydefs
18
19 A dictionary mapping XHTML 1.0 entity definitions to their replacement text in
20 ISO Latin-1.
21
22
23.. data:: name2codepoint
24
25 A dictionary that maps HTML entity names to the Unicode codepoints.
26
27
28.. data:: codepoint2name
29
30 A dictionary that maps Unicode codepoints to HTML entity names.