summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2003-04-16 09:46:13 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2003-04-16 09:46:13 (GMT)
commit5688b7ac3edc756ab8d619b6f0993d54010ab20e (patch)
treeaaf3b28fb2eb8de55640438ffeda9e86bed807fe /Doc
parent19a02ba69dd908bcc5fe45263fb9c956ed9f7ffc (diff)
downloadcpython-5688b7ac3edc756ab8d619b6f0993d54010ab20e.zip
cpython-5688b7ac3edc756ab8d619b6f0993d54010ab20e.tar.gz
cpython-5688b7ac3edc756ab8d619b6f0993d54010ab20e.tar.bz2
Add two dictionaries to htmlentitydefs: name2codepoint maps
HTML entity names to Unicode codepoints (as integers). codepoint2name is the reverse mapping. From SF patch #722017.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libhtmllib.tex18
1 files changed, 15 insertions, 3 deletions
diff --git a/Doc/lib/libhtmllib.tex b/Doc/lib/libhtmllib.tex
index 666affb..3993222 100644
--- a/Doc/lib/libhtmllib.tex
+++ b/Doc/lib/libhtmllib.tex
@@ -145,15 +145,27 @@ method without a preceding call to \method{save_bgn()} will raise a
\modulesynopsis{Definitions of HTML general entities.}
\sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org}
-This module defines a single dictionary, \code{entitydefs}, which is
+This module defines three dictionaries, \code{name2codepoint},
+\code{codepoint2name}, and \code{entitydefs}. \code{entitydefs} is
used by the \refmodule{htmllib} module to provide the
\member{entitydefs} member of the \class{HTMLParser} class. The
-definition provided here contains all the entities defined by HTML 2.0
+definition provided here contains all the entities defined by XHTML 1.0
that can be handled using simple textual substitution in the Latin-1
character set (ISO-8859-1).
\begin{datadesc}{entitydefs}
- A dictionary mapping HTML 2.0 entity definitions to their
+ A dictionary mapping XHTML 1.0 entity definitions to their
replacement text in ISO Latin-1.
+
+\end{datadesc}
+
+\begin{datadesc}{name2codepoint}
+ A dictionary that maps HTML entity names to the Unicode codepoints.
\end{datadesc}
+
+\begin{datadesc}{codepoint2name}
+ A dictionary that maps Unicode codepoints to HTML entity names.
+\end{datadesc}
+
+