[Python-Dev] New htmlentitydefs.py file

M.-A. Lemburg mal@lemburg.com
Mon, 16 Aug 1999 22:22:12 +0200


This is a multi-part message in MIME format.

--------------3B4AC9E96FE0666068F893B2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Attached you find a new HTML entity definitions file taken and
parsed from:

    http://www.w3.org/TR/1998/REC-html40-19980424/HTMLlat1.ent
    http://www.w3.org/TR/1998/REC-html40-19980424/HTMLsymbol.ent
    http://www.w3.org/TR/1998/REC-html40-19980424/HTMLspecial.ent
 
The latter two contain Unicode charcodes which obviously cannot
(yet) be mapped to Unicode strings... perhaps Fredrik wants
to include a spiced up version in with his Unicode type.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Y2000:                                                   138 days left
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/

--------------3B4AC9E96FE0666068F893B2
Content-Type: text/plain; charset=us-ascii; name="htmlentitydefs.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="htmlentitydefs.py"

"""
    Entity definitions for HTML4.0. Taken and parsed from:
        http://www.w3.org/TR/1998/REC-html40/HTMLlat1.ent
        http://www.w3.org/TR/1998/REC-html40/HTMLsymbol.ent
        http://www.w3.org/TR/1998/REC-html40/HTMLspecial.ent
"""

entitydefs = {
    'AElig':	chr(198),	# latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1
    'Aacute':	chr(193),	# latin capital letter A with acute, U+00C1 ISOlat1
    'Acirc':	chr(194),	# latin capital letter A with circumflex, U+00C2 ISOlat1
    'Agrave':	chr(192),	# latin capital letter A with grave = latin capital letter A grave, U+00C0 ISOlat1
    'Alpha':	'Α',	# greek capital letter alpha, U+0391
    'Aring':	chr(197),	# latin capital letter A with ring above = latin capital letter A ring, U+00C5 ISOlat1
    'Atilde':	chr(195),	# latin capital letter A with tilde, U+00C3 ISOlat1
    'Auml':	chr(196),	# latin capital letter A with diaeresis, U+00C4 ISOlat1
    'Beta':	'Β',	# greek capital letter beta, U+0392
    'Ccedil':	chr(199),	# latin capital letter C with cedilla, U+00C7 ISOlat1
    'Chi':	'Χ',	# greek capital letter chi, U+03A7
    'Dagger':	'‡',	# double dagger, U+2021 ISOpub
    'Delta':	'Δ',	# greek capital letter delta, U+0394 ISOgrk3
    'ETH':	chr(208),	# latin capital letter ETH, U+00D0 ISOlat1
    'Eacute':	chr(201),	# latin capital letter E with acute, U+00C9 ISOlat1
    'Ecirc':	chr(202),	# latin capital letter E with circumflex, U+00CA ISOlat1
    'Egrave':	chr(200),	# latin capital letter E with grave, U+00C8 ISOlat1
    'Epsilon':	'Ε',	# greek capital letter epsilon, U+0395
    'Eta':	'Η',	# greek capital letter eta, U+0397
    'Euml':	chr(203),	# latin capital letter E with diaeresis, U+00CB ISOlat1
    'Gamma':	'Γ',	# greek capital letter gamma, U+0393 ISOgrk3
    'Iacute':	chr(205),	# latin capital letter I with acute, U+00CD ISOlat1
    'Icirc':	chr(206),	# latin capital letter I with circumflex, U+00CE ISOlat1
    'Igrave':	chr(204),	# latin capital letter I with grave, U+00CC ISOlat1
    'Iota':	'Ι',	# greek capital letter iota, U+0399
    'Iuml':	chr(207),	# latin capital letter I with diaeresis, U+00CF ISOlat1
    'Kappa':	'Κ',	# greek capital letter kappa, U+039A
    'Lambda':	'Λ',	# greek capital letter lambda, U+039B ISOgrk3
    'Mu':	'Μ',	# greek capital letter mu, U+039C
    'Ntilde':	chr(209),	# latin capital letter N with tilde, U+00D1 ISOlat1
    'Nu':	'Ν',	# greek capital letter nu, U+039D
    'Oacute':	chr(211),	# latin capital letter O with acute, U+00D3 ISOlat1
    'Ocirc':	chr(212),	# latin capital letter O with circumflex, U+00D4 ISOlat1
    'Ograve':	chr(210),	# latin capital letter O with grave, U+00D2 ISOlat1
    'Omega':	'Ω',	# greek capital letter omega, U+03A9 ISOgrk3
    'Omicron':	'Ο',	# greek capital letter omicron, U+039F
    'Oslash':	chr(216),	# latin capital letter O with stroke = latin capital letter O slash, U+00D8 ISOlat1
    'Otilde':	chr(213),	# latin capital letter O with tilde, U+00D5 ISOlat1
    'Ouml':	chr(214),	# latin capital letter O with diaeresis, U+00D6 ISOlat1
    'Phi':	'Φ',	# greek capital letter phi, U+03A6 ISOgrk3
    'Pi':	'Π',	# greek capital letter pi, U+03A0 ISOgrk3
    'Prime':	'″',	# double prime = seconds = inches, U+2033 ISOtech
    'Psi':	'Ψ',	# greek capital letter psi, U+03A8 ISOgrk3
    'Rho':	'Ρ',	# greek capital letter rho, U+03A1
    'Sigma':	'Σ',	# greek capital letter sigma, U+03A3 ISOgrk3
    'THORN':	chr(222),	# latin capital letter THORN, U+00DE ISOlat1
    'Tau':	'Τ',	# greek capital letter tau, U+03A4
    'Theta':	'Θ',	# greek capital letter theta, U+0398 ISOgrk3
    'Uacute':	chr(218),	# latin capital letter U with acute, U+00DA ISOlat1
    'Ucirc':	chr(219),	# latin capital letter U with circumflex, U+00DB ISOlat1
    'Ugrave':	chr(217),	# latin capital letter U with grave, U+00D9 ISOlat1
    'Upsilon':	'Υ',	# greek capital letter upsilon, U+03A5 ISOgrk3
    'Uuml':	chr(220),	# latin capital letter U with diaeresis, U+00DC ISOlat1
    'Xi':	'Ξ',	# greek capital letter xi, U+039E ISOgrk3
    'Yacute':	chr(221),	# latin capital letter Y with acute, U+00DD ISOlat1
    'Zeta':	'Ζ',	# greek capital letter zeta, U+0396
    'aacute':	chr(225),	# latin small letter a with acute, U+00E1 ISOlat1
    'acirc':	chr(226),	# latin small letter a with circumflex, U+00E2 ISOlat1
    'acute':	chr(180),	# acute accent = spacing acute, U+00B4 ISOdia
    'aelig':	chr(230),	# latin small letter ae = latin small ligature ae, U+00E6 ISOlat1
    'agrave':	chr(224),	# latin small letter a with grave = latin small letter a grave, U+00E0 ISOlat1
    'alefsym':	'ℵ',	# alef symbol = first transfinite cardinal, U+2135 NEW
    'alpha':	'α',	# greek small letter alpha, U+03B1 ISOgrk3
    'and':	'∧',	# logical and = wedge, U+2227 ISOtech
    'ang':	'∠',	# angle, U+2220 ISOamso
    'aring':	chr(229),	# latin small letter a with ring above = latin small letter a ring, U+00E5 ISOlat1
    'asymp':	'≈',	# almost equal to = asymptotic to, U+2248 ISOamsr
    'atilde':	chr(227),	# latin small letter a with tilde, U+00E3 ISOlat1
    'auml':	chr(228),	# latin small letter a with diaeresis, U+00E4 ISOlat1
    'bdquo':	'„',	# double low-9 quotation mark, U+201E NEW
    'beta':	'β',	# greek small letter beta, U+03B2 ISOgrk3
    'brvbar':	chr(166),	# broken bar = broken vertical bar, U+00A6 ISOnum
    'bull':	'•',	# bullet = black small circle, U+2022 ISOpub
    'cap':	'∩',	# intersection = cap, U+2229 ISOtech
    'ccedil':	chr(231),	# latin small letter c with cedilla, U+00E7 ISOlat1
    'cedil':	chr(184),	# cedilla = spacing cedilla, U+00B8 ISOdia
    'cent':	chr(162),	# cent sign, U+00A2 ISOnum
    'chi':	'χ',	# greek small letter chi, U+03C7 ISOgrk3
    'clubs':	'♣',	# black club suit = shamrock, U+2663 ISOpub
    'cong':	'≅',	# approximately equal to, U+2245 ISOtech
    'copy':	chr(169),	# copyright sign, U+00A9 ISOnum
    'crarr':	'↵',	# downwards arrow with corner leftwards = carriage return, U+21B5 NEW
    'cup':	'∪',	# union = cup, U+222A ISOtech
    'curren':	chr(164),	# currency sign, U+00A4 ISOnum
    'dArr':	'⇓',	# downwards double arrow, U+21D3 ISOamsa
    'dagger':	'†',	# dagger, U+2020 ISOpub
    'darr':	'↓',	# downwards arrow, U+2193 ISOnum
    'deg':	chr(176),	# degree sign, U+00B0 ISOnum
    'delta':	'δ',	# greek small letter delta, U+03B4 ISOgrk3
    'diams':	'♦',	# black diamond suit, U+2666 ISOpub
    'divide':	chr(247),	# division sign, U+00F7 ISOnum
    'eacute':	chr(233),	# latin small letter e with acute, U+00E9 ISOlat1
    'ecirc':	chr(234),	# latin small letter e with circumflex, U+00EA ISOlat1
    'egrave':	chr(232),	# latin small letter e with grave, U+00E8 ISOlat1
    'empty':	'∅',	# empty set = null set = diameter, U+2205 ISOamso
    'emsp':	' ',	# em space, U+2003 ISOpub
    'ensp':	' ',	# en space, U+2002 ISOpub
    'epsilon':	'ε',	# greek small letter epsilon, U+03B5 ISOgrk3
    'equiv':	'≡',	# identical to, U+2261 ISOtech
    'eta':	'η',	# greek small letter eta, U+03B7 ISOgrk3
    'eth':	chr(240),	# latin small letter eth, U+00F0 ISOlat1
    'euml':	chr(235),	# latin small letter e with diaeresis, U+00EB ISOlat1
    'exist':	'∃',	# there exists, U+2203 ISOtech
    'fnof':	'ƒ',	# latin small f with hook = function = florin, U+0192 ISOtech
    'forall':	'∀',	# for all, U+2200 ISOtech
    'frac12':	chr(189),	# vulgar fraction one half = fraction one half, U+00BD ISOnum
    'frac14':	chr(188),	# vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum
    'frac34':	chr(190),	# vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum
    'frasl':	'⁄',	# fraction slash, U+2044 NEW
    'gamma':	'γ',	# greek small letter gamma, U+03B3 ISOgrk3
    'ge':	'≥',	# greater-than or equal to, U+2265 ISOtech
    'hArr':	'⇔',	# left right double arrow, U+21D4 ISOamsa
    'harr':	'↔',	# left right arrow, U+2194 ISOamsa
    'hearts':	'♥',	# black heart suit = valentine, U+2665 ISOpub
    'hellip':	'…',	# horizontal ellipsis = three dot leader, U+2026 ISOpub
    'iacute':	chr(237),	# latin small letter i with acute, U+00ED ISOlat1
    'icirc':	chr(238),	# latin small letter i with circumflex, U+00EE ISOlat1
    'iexcl':	chr(161),	# inverted exclamation mark, U+00A1 ISOnum
    'igrave':	chr(236),	# latin small letter i with grave, U+00EC ISOlat1
    'image':	'ℑ',	# blackletter capital I = imaginary part, U+2111 ISOamso
    'infin':	'∞',	# infinity, U+221E ISOtech
    'int':	'∫',	# integral, U+222B ISOtech
    'iota':	'ι',	# greek small letter iota, U+03B9 ISOgrk3
    'iquest':	chr(191),	# inverted question mark = turned question mark, U+00BF ISOnum
    'isin':	'∈',	# element of, U+2208 ISOtech
    'iuml':	chr(239),	# latin small letter i with diaeresis, U+00EF ISOlat1
    'kappa':	'κ',	# greek small letter kappa, U+03BA ISOgrk3
    'lArr':	'⇐',	# leftwards double arrow, U+21D0 ISOtech
    'lambda':	'λ',	# greek small letter lambda, U+03BB ISOgrk3
    'lang':	'〈',	# left-pointing angle bracket = bra, U+2329 ISOtech
    'laquo':	chr(171),	# left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum
    'larr':	'←',	# leftwards arrow, U+2190 ISOnum
    'lceil':	'⌈',	# left ceiling = apl upstile, U+2308 ISOamsc
    'ldquo':	'“',	# left double quotation mark, U+201C ISOnum
    'le':	'≤',	# less-than or equal to, U+2264 ISOtech
    'lfloor':	'⌊',	# left floor = apl downstile, U+230A ISOamsc
    'lowast':	'∗',	# asterisk operator, U+2217 ISOtech
    'loz':	'◊',	# lozenge, U+25CA ISOpub
    'lrm':	'‎',	# left-to-right mark, U+200E NEW RFC 2070
    'lsaquo':	'‹',	# single left-pointing angle quotation mark, U+2039 ISO proposed
    'lsquo':	'‘',	# left single quotation mark, U+2018 ISOnum
    'macr':	chr(175),	# macron = spacing macron = overline = APL overbar, U+00AF ISOdia
    'mdash':	'—',	# em dash, U+2014 ISOpub
    'micro':	chr(181),	# micro sign, U+00B5 ISOnum
    'middot':	chr(183),	# middle dot = Georgian comma = Greek middle dot, U+00B7 ISOnum
    'minus':	'−',	# minus sign, U+2212 ISOtech
    'mu':	'μ',	# greek small letter mu, U+03BC ISOgrk3
    'nabla':	'∇',	# nabla = backward difference, U+2207 ISOtech
    'nbsp':	chr(160),	# no-break space = non-breaking space, U+00A0 ISOnum
    'ndash':	'–',	# en dash, U+2013 ISOpub
    'ne':	'≠',	# not equal to, U+2260 ISOtech
    'ni':	'∋',	# contains as member, U+220B ISOtech
    'not':	chr(172),	# not sign, U+00AC ISOnum
    'notin':	'∉',	# not an element of, U+2209 ISOtech
    'nsub':	'⊄',	# not a subset of, U+2284 ISOamsn
    'ntilde':	chr(241),	# latin small letter n with tilde, U+00F1 ISOlat1
    'nu':	'ν',	# greek small letter nu, U+03BD ISOgrk3
    'oacute':	chr(243),	# latin small letter o with acute, U+00F3 ISOlat1
    'ocirc':	chr(244),	# latin small letter o with circumflex, U+00F4 ISOlat1
    'ograve':	chr(242),	# latin small letter o with grave, U+00F2 ISOlat1
    'oline':	'‾',	# overline = spacing overscore, U+203E NEW
    'omega':	'ω',	# greek small letter omega, U+03C9 ISOgrk3
    'omicron':	'ο',	# greek small letter omicron, U+03BF NEW
    'oplus':	'⊕',	# circled plus = direct sum, U+2295 ISOamsb
    'or':	'∨',	# logical or = vee, U+2228 ISOtech
    'ordf':	chr(170),	# feminine ordinal indicator, U+00AA ISOnum
    'ordm':	chr(186),	# masculine ordinal indicator, U+00BA ISOnum
    'oslash':	chr(248),	# latin small letter o with stroke, = latin small letter o slash, U+00F8 ISOlat1
    'otilde':	chr(245),	# latin small letter o with tilde, U+00F5 ISOlat1
    'otimes':	'⊗',	# circled times = vector product, U+2297 ISOamsb
    'ouml':	chr(246),	# latin small letter o with diaeresis, U+00F6 ISOlat1
    'para':	chr(182),	# pilcrow sign = paragraph sign, U+00B6 ISOnum
    'part':	'∂',	# partial differential, U+2202 ISOtech
    'permil':	'‰',	# per mille sign, U+2030 ISOtech
    'perp':	'⊥',	# up tack = orthogonal to = perpendicular, U+22A5 ISOtech
    'phi':	'φ',	# greek small letter phi, U+03C6 ISOgrk3
    'pi':	'π',	# greek small letter pi, U+03C0 ISOgrk3
    'piv':	'ϖ',	# greek pi symbol, U+03D6 ISOgrk3
    'plusmn':	chr(177),	# plus-minus sign = plus-or-minus sign, U+00B1 ISOnum
    'pound':	chr(163),	# pound sign, U+00A3 ISOnum
    'prime':	'′',	# prime = minutes = feet, U+2032 ISOtech
    'prod':	'∏',	# n-ary product = product sign, U+220F ISOamsb
    'prop':	'∝',	# proportional to, U+221D ISOtech
    'psi':	'ψ',	# greek small letter psi, U+03C8 ISOgrk3
    'rArr':	'⇒',	# rightwards double arrow, U+21D2 ISOtech
    'radic':	'√',	# square root = radical sign, U+221A ISOtech
    'rang':	'〉',	# right-pointing angle bracket = ket, U+232A ISOtech
    'raquo':	chr(187),	# right-pointing double angle quotation mark = right pointing guillemet, U+00BB ISOnum
    'rarr':	'→',	# rightwards arrow, U+2192 ISOnum
    'rceil':	'⌉',	# right ceiling, U+2309 ISOamsc
    'rdquo':	'”',	# right double quotation mark, U+201D ISOnum
    'real':	'ℜ',	# blackletter capital R = real part symbol, U+211C ISOamso
    'reg':	chr(174),	# registered sign = registered trade mark sign, U+00AE ISOnum
    'rfloor':	'⌋',	# right floor, U+230B ISOamsc
    'rho':	'ρ',	# greek small letter rho, U+03C1 ISOgrk3
    'rlm':	'‏',	# right-to-left mark, U+200F NEW RFC 2070
    'rsaquo':	'›',	# single right-pointing angle quotation mark, U+203A ISO proposed
    'rsquo':	'’',	# right single quotation mark, U+2019 ISOnum
    'sbquo':	'‚',	# single low-9 quotation mark, U+201A NEW
    'sdot':	'⋅',	# dot operator, U+22C5 ISOamsb
    'sect':	chr(167),	# section sign, U+00A7 ISOnum
    'shy':	chr(173),	# soft hyphen = discretionary hyphen, U+00AD ISOnum
    'sigma':	'σ',	# greek small letter sigma, U+03C3 ISOgrk3
    'sigmaf':	'ς',	# greek small letter final sigma, U+03C2 ISOgrk3
    'sim':	'∼',	# tilde operator = varies with = similar to, U+223C ISOtech
    'spades':	'♠',	# black spade suit, U+2660 ISOpub
    'sub':	'⊂',	# subset of, U+2282 ISOtech
    'sube':	'⊆',	# subset of or equal to, U+2286 ISOtech
    'sum':	'∑',	# n-ary sumation, U+2211 ISOamsb
    'sup':	'⊃',	# superset of, U+2283 ISOtech
    'sup1':	chr(185),	# superscript one = superscript digit one, U+00B9 ISOnum
    'sup2':	chr(178),	# superscript two = superscript digit two = squared, U+00B2 ISOnum
    'sup3':	chr(179),	# superscript three = superscript digit three = cubed, U+00B3 ISOnum
    'supe':	'⊇',	# superset of or equal to, U+2287 ISOtech
    'szlig':	chr(223),	# latin small letter sharp s = ess-zed, U+00DF ISOlat1
    'tau':	'τ',	# greek small letter tau, U+03C4 ISOgrk3
    'there4':	'∴',	# therefore, U+2234 ISOtech
    'theta':	'θ',	# greek small letter theta, U+03B8 ISOgrk3
    'thetasym':	'ϑ',	# greek small letter theta symbol, U+03D1 NEW
    'thinsp':	' ',	# thin space, U+2009 ISOpub
    'thorn':	chr(254),	# latin small letter thorn with, U+00FE ISOlat1
    'times':	chr(215),	# multiplication sign, U+00D7 ISOnum
    'trade':	'™',	# trade mark sign, U+2122 ISOnum
    'uArr':	'⇑',	# upwards double arrow, U+21D1 ISOamsa
    'uacute':	chr(250),	# latin small letter u with acute, U+00FA ISOlat1
    'uarr':	'↑',	# upwards arrow, U+2191 ISOnum
    'ucirc':	chr(251),	# latin small letter u with circumflex, U+00FB ISOlat1
    'ugrave':	chr(249),	# latin small letter u with grave, U+00F9 ISOlat1
    'uml':	chr(168),	# diaeresis = spacing diaeresis, U+00A8 ISOdia
    'upsih':	'ϒ',	# greek upsilon with hook symbol, U+03D2 NEW
    'upsilon':	'υ',	# greek small letter upsilon, U+03C5 ISOgrk3
    'uuml':	chr(252),	# latin small letter u with diaeresis, U+00FC ISOlat1
    'weierp':	'℘',	# script capital P = power set = Weierstrass p, U+2118 ISOamso
    'xi':	'ξ',	# greek small letter xi, U+03BE ISOgrk3
    'yacute':	chr(253),	# latin small letter y with acute, U+00FD ISOlat1
    'yen':	chr(165),	# yen sign = yuan sign, U+00A5 ISOnum
    'yuml':	chr(255),	# latin small letter y with diaeresis, U+00FF ISOlat1
    'zeta':	'ζ',	# greek small letter zeta, U+03B6 ISOgrk3
    'zwj':	'‍',	# zero width joiner, U+200D NEW RFC 2070
    'zwnj':	'‌',	# zero width non-joiner, U+200C NEW RFC 2070

}

--------------3B4AC9E96FE0666068F893B2--