Commit 5688b7ac authored by Walter Dörwald's avatar Walter Dörwald

Add two dictionaries to htmlentitydefs: name2codepoint maps

HTML entity names to Unicode codepoints (as integers).
codepoint2name is the reverse mapping. From SF patch #722017.
parent 19a02ba6
......@@ -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}
This diff is collapsed.
......@@ -103,6 +103,10 @@ Extension modules
Library
-------
- htmlentitydefs has two new dictionaries: name2codepoint maps
HTML entity names to Unicode codepoints (as integers).
codepoint2name is the reverse mapping. See SF patch #722017.
- pdb has a new command, "debug", which lets you step through
arbitrary code from the debugger's (pdb) prompt.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment