1from __future__ import absolute_import, division, unicode_literals
2
3import string
4
5EOF = None
6
7E = {
8    "null-character":
9        "Null character in input stream, replaced with U+FFFD.",
10    "invalid-codepoint":
11        "Invalid codepoint in stream.",
12    "incorrectly-placed-solidus":
13        "Solidus (/) incorrectly placed in tag.",
14    "incorrect-cr-newline-entity":
15        "Incorrect CR newline entity, replaced with LF.",
16    "illegal-windows-1252-entity":
17        "Entity used with illegal number (windows-1252 reference).",
18    "cant-convert-numeric-entity":
19        "Numeric entity couldn't be converted to character "
20        "(codepoint U+%(charAsInt)08x).",
21    "illegal-codepoint-for-numeric-entity":
22        "Numeric entity represents an illegal codepoint: "
23        "U+%(charAsInt)08x.",
24    "numeric-entity-without-semicolon":
25        "Numeric entity didn't end with ';'.",
26    "expected-numeric-entity-but-got-eof":
27        "Numeric entity expected. Got end of file instead.",
28    "expected-numeric-entity":
29        "Numeric entity expected but none found.",
30    "named-entity-without-semicolon":
31        "Named entity didn't end with ';'.",
32    "expected-named-entity":
33        "Named entity expected. Got none.",
34    "attributes-in-end-tag":
35        "End tag contains unexpected attributes.",
36    'self-closing-flag-on-end-tag':
37        "End tag contains unexpected self-closing flag.",
38    "expected-tag-name-but-got-right-bracket":
39        "Expected tag name. Got '>' instead.",
40    "expected-tag-name-but-got-question-mark":
41        "Expected tag name. Got '?' instead. (HTML doesn't "
42        "support processing instructions.)",
43    "expected-tag-name":
44        "Expected tag name. Got something else instead",
45    "expected-closing-tag-but-got-right-bracket":
46        "Expected closing tag. Got '>' instead. Ignoring '</>'.",
47    "expected-closing-tag-but-got-eof":
48        "Expected closing tag. Unexpected end of file.",
49    "expected-closing-tag-but-got-char":
50        "Expected closing tag. Unexpected character '%(data)s' found.",
51    "eof-in-tag-name":
52        "Unexpected end of file in the tag name.",
53    "expected-attribute-name-but-got-eof":
54        "Unexpected end of file. Expected attribute name instead.",
55    "eof-in-attribute-name":
56        "Unexpected end of file in attribute name.",
57    "invalid-character-in-attribute-name":
58        "Invalid character in attribute name",
59    "duplicate-attribute":
60        "Dropped duplicate attribute on tag.",
61    "expected-end-of-tag-name-but-got-eof":
62        "Unexpected end of file. Expected = or end of tag.",
63    "expected-attribute-value-but-got-eof":
64        "Unexpected end of file. Expected attribute value.",
65    "expected-attribute-value-but-got-right-bracket":
66        "Expected attribute value. Got '>' instead.",
67    'equals-in-unquoted-attribute-value':
68        "Unexpected = in unquoted attribute",
69    'unexpected-character-in-unquoted-attribute-value':
70        "Unexpected character in unquoted attribute",
71    "invalid-character-after-attribute-name":
72        "Unexpected character after attribute name.",
73    "unexpected-character-after-attribute-value":
74        "Unexpected character after attribute value.",
75    "eof-in-attribute-value-double-quote":
76        "Unexpected end of file in attribute value (\").",
77    "eof-in-attribute-value-single-quote":
78        "Unexpected end of file in attribute value (').",
79    "eof-in-attribute-value-no-quotes":
80        "Unexpected end of file in attribute value.",
81    "unexpected-EOF-after-solidus-in-tag":
82        "Unexpected end of file in tag. Expected >",
83    "unexpected-character-after-solidus-in-tag":
84        "Unexpected character after / in tag. Expected >",
85    "expected-dashes-or-doctype":
86        "Expected '--' or 'DOCTYPE'. Not found.",
87    "unexpected-bang-after-double-dash-in-comment":
88        "Unexpected ! after -- in comment",
89    "unexpected-space-after-double-dash-in-comment":
90        "Unexpected space after -- in comment",
91    "incorrect-comment":
92        "Incorrect comment.",
93    "eof-in-comment":
94        "Unexpected end of file in comment.",
95    "eof-in-comment-end-dash":
96        "Unexpected end of file in comment (-)",
97    "unexpected-dash-after-double-dash-in-comment":
98        "Unexpected '-' after '--' found in comment.",
99    "eof-in-comment-double-dash":
100        "Unexpected end of file in comment (--).",
101    "eof-in-comment-end-space-state":
102        "Unexpected end of file in comment.",
103    "eof-in-comment-end-bang-state":
104        "Unexpected end of file in comment.",
105    "unexpected-char-in-comment":
106        "Unexpected character in comment found.",
107    "need-space-after-doctype":
108        "No space after literal string 'DOCTYPE'.",
109    "expected-doctype-name-but-got-right-bracket":
110        "Unexpected > character. Expected DOCTYPE name.",
111    "expected-doctype-name-but-got-eof":
112        "Unexpected end of file. Expected DOCTYPE name.",
113    "eof-in-doctype-name":
114        "Unexpected end of file in DOCTYPE name.",
115    "eof-in-doctype":
116        "Unexpected end of file in DOCTYPE.",
117    "expected-space-or-right-bracket-in-doctype":
118        "Expected space or '>'. Got '%(data)s'",
119    "unexpected-end-of-doctype":
120        "Unexpected end of DOCTYPE.",
121    "unexpected-char-in-doctype":
122        "Unexpected character in DOCTYPE.",
123    "eof-in-innerhtml":
124        "XXX innerHTML EOF",
125    "unexpected-doctype":
126        "Unexpected DOCTYPE. Ignored.",
127    "non-html-root":
128        "html needs to be the first start tag.",
129    "expected-doctype-but-got-eof":
130        "Unexpected End of file. Expected DOCTYPE.",
131    "unknown-doctype":
132        "Erroneous DOCTYPE.",
133    "expected-doctype-but-got-chars":
134        "Unexpected non-space characters. Expected DOCTYPE.",
135    "expected-doctype-but-got-start-tag":
136        "Unexpected start tag (%(name)s). Expected DOCTYPE.",
137    "expected-doctype-but-got-end-tag":
138        "Unexpected end tag (%(name)s). Expected DOCTYPE.",
139    "end-tag-after-implied-root":
140        "Unexpected end tag (%(name)s) after the (implied) root element.",
141    "expected-named-closing-tag-but-got-eof":
142        "Unexpected end of file. Expected end tag (%(name)s).",
143    "two-heads-are-not-better-than-one":
144        "Unexpected start tag head in existing head. Ignored.",
145    "unexpected-end-tag":
146        "Unexpected end tag (%(name)s). Ignored.",
147    "unexpected-start-tag-out-of-my-head":
148        "Unexpected start tag (%(name)s) that can be in head. Moved.",
149    "unexpected-start-tag":
150        "Unexpected start tag (%(name)s).",
151    "missing-end-tag":
152        "Missing end tag (%(name)s).",
153    "missing-end-tags":
154        "Missing end tags (%(name)s).",
155    "unexpected-start-tag-implies-end-tag":
156        "Unexpected start tag (%(startName)s) "
157        "implies end tag (%(endName)s).",
158    "unexpected-start-tag-treated-as":
159        "Unexpected start tag (%(originalName)s). Treated as %(newName)s.",
160    "deprecated-tag":
161        "Unexpected start tag %(name)s. Don't use it!",
162    "unexpected-start-tag-ignored":
163        "Unexpected start tag %(name)s. Ignored.",
164    "expected-one-end-tag-but-got-another":
165        "Unexpected end tag (%(gotName)s). "
166        "Missing end tag (%(expectedName)s).",
167    "end-tag-too-early":
168        "End tag (%(name)s) seen too early. Expected other end tag.",
169    "end-tag-too-early-named":
170        "Unexpected end tag (%(gotName)s). Expected end tag (%(expectedName)s).",
171    "end-tag-too-early-ignored":
172        "End tag (%(name)s) seen too early. Ignored.",
173    "adoption-agency-1.1":
174        "End tag (%(name)s) violates step 1, "
175        "paragraph 1 of the adoption agency algorithm.",
176    "adoption-agency-1.2":
177        "End tag (%(name)s) violates step 1, "
178        "paragraph 2 of the adoption agency algorithm.",
179    "adoption-agency-1.3":
180        "End tag (%(name)s) violates step 1, "
181        "paragraph 3 of the adoption agency algorithm.",
182    "adoption-agency-4.4":
183        "End tag (%(name)s) violates step 4, "
184        "paragraph 4 of the adoption agency algorithm.",
185    "unexpected-end-tag-treated-as":
186        "Unexpected end tag (%(originalName)s). Treated as %(newName)s.",
187    "no-end-tag":
188        "This element (%(name)s) has no end tag.",
189    "unexpected-implied-end-tag-in-table":
190        "Unexpected implied end tag (%(name)s) in the table phase.",
191    "unexpected-implied-end-tag-in-table-body":
192        "Unexpected implied end tag (%(name)s) in the table body phase.",
193    "unexpected-char-implies-table-voodoo":
194        "Unexpected non-space characters in "
195        "table context caused voodoo mode.",
196    "unexpected-hidden-input-in-table":
197        "Unexpected input with type hidden in table context.",
198    "unexpected-form-in-table":
199        "Unexpected form in table context.",
200    "unexpected-start-tag-implies-table-voodoo":
201        "Unexpected start tag (%(name)s) in "
202        "table context caused voodoo mode.",
203    "unexpected-end-tag-implies-table-voodoo":
204        "Unexpected end tag (%(name)s) in "
205        "table context caused voodoo mode.",
206    "unexpected-cell-in-table-body":
207        "Unexpected table cell start tag (%(name)s) "
208        "in the table body phase.",
209    "unexpected-cell-end-tag":
210        "Got table cell end tag (%(name)s) "
211        "while required end tags are missing.",
212    "unexpected-end-tag-in-table-body":
213        "Unexpected end tag (%(name)s) in the table body phase. Ignored.",
214    "unexpected-implied-end-tag-in-table-row":
215        "Unexpected implied end tag (%(name)s) in the table row phase.",
216    "unexpected-end-tag-in-table-row":
217        "Unexpected end tag (%(name)s) in the table row phase. Ignored.",
218    "unexpected-select-in-select":
219        "Unexpected select start tag in the select phase "
220        "treated as select end tag.",
221    "unexpected-input-in-select":
222        "Unexpected input start tag in the select phase.",
223    "unexpected-start-tag-in-select":
224        "Unexpected start tag token (%(name)s in the select phase. "
225        "Ignored.",
226    "unexpected-end-tag-in-select":
227        "Unexpected end tag (%(name)s) in the select phase. Ignored.",
228    "unexpected-table-element-start-tag-in-select-in-table":
229        "Unexpected table element start tag (%(name)s) in the select in table phase.",
230    "unexpected-table-element-end-tag-in-select-in-table":
231        "Unexpected table element end tag (%(name)s) in the select in table phase.",
232    "unexpected-char-after-body":
233        "Unexpected non-space characters in the after body phase.",
234    "unexpected-start-tag-after-body":
235        "Unexpected start tag token (%(name)s)"
236        " in the after body phase.",
237    "unexpected-end-tag-after-body":
238        "Unexpected end tag token (%(name)s)"
239        " in the after body phase.",
240    "unexpected-char-in-frameset":
241        "Unexpected characters in the frameset phase. Characters ignored.",
242    "unexpected-start-tag-in-frameset":
243        "Unexpected start tag token (%(name)s)"
244        " in the frameset phase. Ignored.",
245    "unexpected-frameset-in-frameset-innerhtml":
246        "Unexpected end tag token (frameset) "
247        "in the frameset phase (innerHTML).",
248    "unexpected-end-tag-in-frameset":
249        "Unexpected end tag token (%(name)s)"
250        " in the frameset phase. Ignored.",
251    "unexpected-char-after-frameset":
252        "Unexpected non-space characters in the "
253        "after frameset phase. Ignored.",
254    "unexpected-start-tag-after-frameset":
255        "Unexpected start tag (%(name)s)"
256        " in the after frameset phase. Ignored.",
257    "unexpected-end-tag-after-frameset":
258        "Unexpected end tag (%(name)s)"
259        " in the after frameset phase. Ignored.",
260    "unexpected-end-tag-after-body-innerhtml":
261        "Unexpected end tag after body(innerHtml)",
262    "expected-eof-but-got-char":
263        "Unexpected non-space characters. Expected end of file.",
264    "expected-eof-but-got-start-tag":
265        "Unexpected start tag (%(name)s)"
266        ". Expected end of file.",
267    "expected-eof-but-got-end-tag":
268        "Unexpected end tag (%(name)s)"
269        ". Expected end of file.",
270    "eof-in-table":
271        "Unexpected end of file. Expected table content.",
272    "eof-in-select":
273        "Unexpected end of file. Expected select content.",
274    "eof-in-frameset":
275        "Unexpected end of file. Expected frameset content.",
276    "eof-in-script-in-script":
277        "Unexpected end of file. Expected script content.",
278    "eof-in-foreign-lands":
279        "Unexpected end of file. Expected foreign content",
280    "non-void-element-with-trailing-solidus":
281        "Trailing solidus not allowed on element %(name)s",
282    "unexpected-html-element-in-foreign-content":
283        "Element %(name)s not allowed in a non-html context",
284    "unexpected-end-tag-before-html":
285        "Unexpected end tag (%(name)s) before html.",
286    "XXX-undefined-error":
287        "Undefined error (this sucks and should be fixed)",
288}
289
290namespaces = {
291    "html": "http://www.w3.org/1999/xhtml",
292    "mathml": "http://www.w3.org/1998/Math/MathML",
293    "svg": "http://www.w3.org/2000/svg",
294    "xlink": "http://www.w3.org/1999/xlink",
295    "xml": "http://www.w3.org/XML/1998/namespace",
296    "xmlns": "http://www.w3.org/2000/xmlns/"
297}
298
299scopingElements = frozenset([
300    (namespaces["html"], "applet"),
301    (namespaces["html"], "caption"),
302    (namespaces["html"], "html"),
303    (namespaces["html"], "marquee"),
304    (namespaces["html"], "object"),
305    (namespaces["html"], "table"),
306    (namespaces["html"], "td"),
307    (namespaces["html"], "th"),
308    (namespaces["mathml"], "mi"),
309    (namespaces["mathml"], "mo"),
310    (namespaces["mathml"], "mn"),
311    (namespaces["mathml"], "ms"),
312    (namespaces["mathml"], "mtext"),
313    (namespaces["mathml"], "annotation-xml"),
314    (namespaces["svg"], "foreignObject"),
315    (namespaces["svg"], "desc"),
316    (namespaces["svg"], "title"),
317])
318
319formattingElements = frozenset([
320    (namespaces["html"], "a"),
321    (namespaces["html"], "b"),
322    (namespaces["html"], "big"),
323    (namespaces["html"], "code"),
324    (namespaces["html"], "em"),
325    (namespaces["html"], "font"),
326    (namespaces["html"], "i"),
327    (namespaces["html"], "nobr"),
328    (namespaces["html"], "s"),
329    (namespaces["html"], "small"),
330    (namespaces["html"], "strike"),
331    (namespaces["html"], "strong"),
332    (namespaces["html"], "tt"),
333    (namespaces["html"], "u")
334])
335
336specialElements = frozenset([
337    (namespaces["html"], "address"),
338    (namespaces["html"], "applet"),
339    (namespaces["html"], "area"),
340    (namespaces["html"], "article"),
341    (namespaces["html"], "aside"),
342    (namespaces["html"], "base"),
343    (namespaces["html"], "basefont"),
344    (namespaces["html"], "bgsound"),
345    (namespaces["html"], "blockquote"),
346    (namespaces["html"], "body"),
347    (namespaces["html"], "br"),
348    (namespaces["html"], "button"),
349    (namespaces["html"], "caption"),
350    (namespaces["html"], "center"),
351    (namespaces["html"], "col"),
352    (namespaces["html"], "colgroup"),
353    (namespaces["html"], "command"),
354    (namespaces["html"], "dd"),
355    (namespaces["html"], "details"),
356    (namespaces["html"], "dir"),
357    (namespaces["html"], "div"),
358    (namespaces["html"], "dl"),
359    (namespaces["html"], "dt"),
360    (namespaces["html"], "embed"),
361    (namespaces["html"], "fieldset"),
362    (namespaces["html"], "figure"),
363    (namespaces["html"], "footer"),
364    (namespaces["html"], "form"),
365    (namespaces["html"], "frame"),
366    (namespaces["html"], "frameset"),
367    (namespaces["html"], "h1"),
368    (namespaces["html"], "h2"),
369    (namespaces["html"], "h3"),
370    (namespaces["html"], "h4"),
371    (namespaces["html"], "h5"),
372    (namespaces["html"], "h6"),
373    (namespaces["html"], "head"),
374    (namespaces["html"], "header"),
375    (namespaces["html"], "hr"),
376    (namespaces["html"], "html"),
377    (namespaces["html"], "iframe"),
378    # Note that image is commented out in the spec as "this isn't an
379    # element that can end up on the stack, so it doesn't matter,"
380    (namespaces["html"], "image"),
381    (namespaces["html"], "img"),
382    (namespaces["html"], "input"),
383    (namespaces["html"], "isindex"),
384    (namespaces["html"], "li"),
385    (namespaces["html"], "link"),
386    (namespaces["html"], "listing"),
387    (namespaces["html"], "marquee"),
388    (namespaces["html"], "menu"),
389    (namespaces["html"], "meta"),
390    (namespaces["html"], "nav"),
391    (namespaces["html"], "noembed"),
392    (namespaces["html"], "noframes"),
393    (namespaces["html"], "noscript"),
394    (namespaces["html"], "object"),
395    (namespaces["html"], "ol"),
396    (namespaces["html"], "p"),
397    (namespaces["html"], "param"),
398    (namespaces["html"], "plaintext"),
399    (namespaces["html"], "pre"),
400    (namespaces["html"], "script"),
401    (namespaces["html"], "section"),
402    (namespaces["html"], "select"),
403    (namespaces["html"], "style"),
404    (namespaces["html"], "table"),
405    (namespaces["html"], "tbody"),
406    (namespaces["html"], "td"),
407    (namespaces["html"], "textarea"),
408    (namespaces["html"], "tfoot"),
409    (namespaces["html"], "th"),
410    (namespaces["html"], "thead"),
411    (namespaces["html"], "title"),
412    (namespaces["html"], "tr"),
413    (namespaces["html"], "ul"),
414    (namespaces["html"], "wbr"),
415    (namespaces["html"], "xmp"),
416    (namespaces["svg"], "foreignObject")
417])
418
419htmlIntegrationPointElements = frozenset([
420    (namespaces["mathml"], "annotaion-xml"),
421    (namespaces["svg"], "foreignObject"),
422    (namespaces["svg"], "desc"),
423    (namespaces["svg"], "title")
424])
425
426mathmlTextIntegrationPointElements = frozenset([
427    (namespaces["mathml"], "mi"),
428    (namespaces["mathml"], "mo"),
429    (namespaces["mathml"], "mn"),
430    (namespaces["mathml"], "ms"),
431    (namespaces["mathml"], "mtext")
432])
433
434adjustForeignAttributes = {
435    "xlink:actuate": ("xlink", "actuate", namespaces["xlink"]),
436    "xlink:arcrole": ("xlink", "arcrole", namespaces["xlink"]),
437    "xlink:href": ("xlink", "href", namespaces["xlink"]),
438    "xlink:role": ("xlink", "role", namespaces["xlink"]),
439    "xlink:show": ("xlink", "show", namespaces["xlink"]),
440    "xlink:title": ("xlink", "title", namespaces["xlink"]),
441    "xlink:type": ("xlink", "type", namespaces["xlink"]),
442    "xml:base": ("xml", "base", namespaces["xml"]),
443    "xml:lang": ("xml", "lang", namespaces["xml"]),
444    "xml:space": ("xml", "space", namespaces["xml"]),
445    "xmlns": (None, "xmlns", namespaces["xmlns"]),
446    "xmlns:xlink": ("xmlns", "xlink", namespaces["xmlns"])
447}
448
449unadjustForeignAttributes = dict([((ns, local), qname) for qname, (prefix, local, ns) in
450                                  adjustForeignAttributes.items()])
451
452spaceCharacters = frozenset([
453    "\t",
454    "\n",
455    "\u000C",
456    " ",
457    "\r"
458])
459
460tableInsertModeElements = frozenset([
461    "table",
462    "tbody",
463    "tfoot",
464    "thead",
465    "tr"
466])
467
468asciiLowercase = frozenset(string.ascii_lowercase)
469asciiUppercase = frozenset(string.ascii_uppercase)
470asciiLetters = frozenset(string.ascii_letters)
471digits = frozenset(string.digits)
472hexDigits = frozenset(string.hexdigits)
473
474asciiUpper2Lower = dict([(ord(c), ord(c.lower()))
475                         for c in string.ascii_uppercase])
476
477# Heading elements need to be ordered
478headingElements = (
479    "h1",
480    "h2",
481    "h3",
482    "h4",
483    "h5",
484    "h6"
485)
486
487voidElements = frozenset([
488    "base",
489    "command",
490    "event-source",
491    "link",
492    "meta",
493    "hr",
494    "br",
495    "img",
496    "embed",
497    "param",
498    "area",
499    "col",
500    "input",
501    "source",
502    "track"
503])
504
505cdataElements = frozenset(['title', 'textarea'])
506
507rcdataElements = frozenset([
508    'style',
509    'script',
510    'xmp',
511    'iframe',
512    'noembed',
513    'noframes',
514    'noscript'
515])
516
517booleanAttributes = {
518    "": frozenset(["irrelevant"]),
519    "style": frozenset(["scoped"]),
520    "img": frozenset(["ismap"]),
521    "audio": frozenset(["autoplay", "controls"]),
522    "video": frozenset(["autoplay", "controls"]),
523    "script": frozenset(["defer", "async"]),
524    "details": frozenset(["open"]),
525    "datagrid": frozenset(["multiple", "disabled"]),
526    "command": frozenset(["hidden", "disabled", "checked", "default"]),
527    "hr": frozenset(["noshade"]),
528    "menu": frozenset(["autosubmit"]),
529    "fieldset": frozenset(["disabled", "readonly"]),
530    "option": frozenset(["disabled", "readonly", "selected"]),
531    "optgroup": frozenset(["disabled", "readonly"]),
532    "button": frozenset(["disabled", "autofocus"]),
533    "input": frozenset(["disabled", "readonly", "required", "autofocus", "checked", "ismap"]),
534    "select": frozenset(["disabled", "readonly", "autofocus", "multiple"]),
535    "output": frozenset(["disabled", "readonly"]),
536}
537
538# entitiesWindows1252 has to be _ordered_ and needs to have an index. It
539# therefore can't be a frozenset.
540entitiesWindows1252 = (
541    8364,   # 0x80  0x20AC  EURO SIGN
542    65533,  # 0x81          UNDEFINED
543    8218,   # 0x82  0x201A  SINGLE LOW-9 QUOTATION MARK
544    402,    # 0x83  0x0192  LATIN SMALL LETTER F WITH HOOK
545    8222,   # 0x84  0x201E  DOUBLE LOW-9 QUOTATION MARK
546    8230,   # 0x85  0x2026  HORIZONTAL ELLIPSIS
547    8224,   # 0x86  0x2020  DAGGER
548    8225,   # 0x87  0x2021  DOUBLE DAGGER
549    710,    # 0x88  0x02C6  MODIFIER LETTER CIRCUMFLEX ACCENT
550    8240,   # 0x89  0x2030  PER MILLE SIGN
551    352,    # 0x8A  0x0160  LATIN CAPITAL LETTER S WITH CARON
552    8249,   # 0x8B  0x2039  SINGLE LEFT-POINTING ANGLE QUOTATION MARK
553    338,    # 0x8C  0x0152  LATIN CAPITAL LIGATURE OE
554    65533,  # 0x8D          UNDEFINED
555    381,    # 0x8E  0x017D  LATIN CAPITAL LETTER Z WITH CARON
556    65533,  # 0x8F          UNDEFINED
557    65533,  # 0x90          UNDEFINED
558    8216,   # 0x91  0x2018  LEFT SINGLE QUOTATION MARK
559    8217,   # 0x92  0x2019  RIGHT SINGLE QUOTATION MARK
560    8220,   # 0x93  0x201C  LEFT DOUBLE QUOTATION MARK
561    8221,   # 0x94  0x201D  RIGHT DOUBLE QUOTATION MARK
562    8226,   # 0x95  0x2022  BULLET
563    8211,   # 0x96  0x2013  EN DASH
564    8212,   # 0x97  0x2014  EM DASH
565    732,    # 0x98  0x02DC  SMALL TILDE
566    8482,   # 0x99  0x2122  TRADE MARK SIGN
567    353,    # 0x9A  0x0161  LATIN SMALL LETTER S WITH CARON
568    8250,   # 0x9B  0x203A  SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
569    339,    # 0x9C  0x0153  LATIN SMALL LIGATURE OE
570    65533,  # 0x9D          UNDEFINED
571    382,    # 0x9E  0x017E  LATIN SMALL LETTER Z WITH CARON
572    376     # 0x9F  0x0178  LATIN CAPITAL LETTER Y WITH DIAERESIS
573)
574
575xmlEntities = frozenset(['lt;', 'gt;', 'amp;', 'apos;', 'quot;'])
576
577entities = {
578    "AElig": "\xc6",
579    "AElig;": "\xc6",
580    "AMP": "&",
581    "AMP;": "&",
582    "Aacute": "\xc1",
583    "Aacute;": "\xc1",
584    "Abreve;": "\u0102",
585    "Acirc": "\xc2",
586    "Acirc;": "\xc2",
587    "Acy;": "\u0410",
588    "Afr;": "\U0001d504",
589    "Agrave": "\xc0",
590    "Agrave;": "\xc0",
591    "Alpha;": "\u0391",
592    "Amacr;": "\u0100",
593    "And;": "\u2a53",
594    "Aogon;": "\u0104",
595    "Aopf;": "\U0001d538",
596    "ApplyFunction;": "\u2061",
597    "Aring": "\xc5",
598    "Aring;": "\xc5",
599    "Ascr;": "\U0001d49c",
600    "Assign;": "\u2254",
601    "Atilde": "\xc3",
602    "Atilde;": "\xc3",
603    "Auml": "\xc4",
604    "Auml;": "\xc4",
605    "Backslash;": "\u2216",
606    "Barv;": "\u2ae7",
607    "Barwed;": "\u2306",
608    "Bcy;": "\u0411",
609    "Because;": "\u2235",
610    "Bernoullis;": "\u212c",
611    "Beta;": "\u0392",
612    "Bfr;": "\U0001d505",
613    "Bopf;": "\U0001d539",
614    "Breve;": "\u02d8",
615    "Bscr;": "\u212c",
616    "Bumpeq;": "\u224e",
617    "CHcy;": "\u0427",
618    "COPY": "\xa9",
619    "COPY;": "\xa9",
620    "Cacute;": "\u0106",
621    "Cap;": "\u22d2",
622    "CapitalDifferentialD;": "\u2145",
623    "Cayleys;": "\u212d",
624    "Ccaron;": "\u010c",
625    "Ccedil": "\xc7",
626    "Ccedil;": "\xc7",
627    "Ccirc;": "\u0108",
628    "Cconint;": "\u2230",
629    "Cdot;": "\u010a",
630    "Cedilla;": "\xb8",
631    "CenterDot;": "\xb7",
632    "Cfr;": "\u212d",
633    "Chi;": "\u03a7",
634    "CircleDot;": "\u2299",
635    "CircleMinus;": "\u2296",
636    "CirclePlus;": "\u2295",
637    "CircleTimes;": "\u2297",
638    "ClockwiseContourIntegral;": "\u2232",
639    "CloseCurlyDoubleQuote;": "\u201d",
640    "CloseCurlyQuote;": "\u2019",
641    "Colon;": "\u2237",
642    "Colone;": "\u2a74",
643    "Congruent;": "\u2261",
644    "Conint;": "\u222f",
645    "ContourIntegral;": "\u222e",
646    "Copf;": "\u2102",
647    "Coproduct;": "\u2210",
648    "CounterClockwiseContourIntegral;": "\u2233",
649    "Cross;": "\u2a2f",
650    "Cscr;": "\U0001d49e",
651    "Cup;": "\u22d3",
652    "CupCap;": "\u224d",
653    "DD;": "\u2145",
654    "DDotrahd;": "\u2911",
655    "DJcy;": "\u0402",
656    "DScy;": "\u0405",
657    "DZcy;": "\u040f",
658    "Dagger;": "\u2021",
659    "Darr;": "\u21a1",
660    "Dashv;": "\u2ae4",
661    "Dcaron;": "\u010e",
662    "Dcy;": "\u0414",
663    "Del;": "\u2207",
664    "Delta;": "\u0394",
665    "Dfr;": "\U0001d507",
666    "DiacriticalAcute;": "\xb4",
667    "DiacriticalDot;": "\u02d9",
668    "DiacriticalDoubleAcute;": "\u02dd",
669    "DiacriticalGrave;": "`",
670    "DiacriticalTilde;": "\u02dc",
671    "Diamond;": "\u22c4",
672    "DifferentialD;": "\u2146",
673    "Dopf;": "\U0001d53b",
674    "Dot;": "\xa8",
675    "DotDot;": "\u20dc",
676    "DotEqual;": "\u2250",
677    "DoubleContourIntegral;": "\u222f",
678    "DoubleDot;": "\xa8",
679    "DoubleDownArrow;": "\u21d3",
680    "DoubleLeftArrow;": "\u21d0",
681    "DoubleLeftRightArrow;": "\u21d4",
682    "DoubleLeftTee;": "\u2ae4",
683    "DoubleLongLeftArrow;": "\u27f8",
684    "DoubleLongLeftRightArrow;": "\u27fa",
685    "DoubleLongRightArrow;": "\u27f9",
686    "DoubleRightArrow;": "\u21d2",
687    "DoubleRightTee;": "\u22a8",
688    "DoubleUpArrow;": "\u21d1",
689    "DoubleUpDownArrow;": "\u21d5",
690    "DoubleVerticalBar;": "\u2225",
691    "DownArrow;": "\u2193",
692    "DownArrowBar;": "\u2913",
693    "DownArrowUpArrow;": "\u21f5",
694    "DownBreve;": "\u0311",
695    "DownLeftRightVector;": "\u2950",
696    "DownLeftTeeVector;": "\u295e",
697    "DownLeftVector;": "\u21bd",
698    "DownLeftVectorBar;": "\u2956",
699    "DownRightTeeVector;": "\u295f",
700    "DownRightVector;": "\u21c1",
701    "DownRightVectorBar;": "\u2957",
702    "DownTee;": "\u22a4",
703    "DownTeeArrow;": "\u21a7",
704    "Downarrow;": "\u21d3",
705    "Dscr;": "\U0001d49f",
706    "Dstrok;": "\u0110",
707    "ENG;": "\u014a",
708    "ETH": "\xd0",
709    "ETH;": "\xd0",
710    "Eacute": "\xc9",
711    "Eacute;": "\xc9",
712    "Ecaron;": "\u011a",
713    "Ecirc": "\xca",
714    "Ecirc;": "\xca",
715    "Ecy;": "\u042d",
716    "Edot;": "\u0116",
717    "Efr;": "\U0001d508",
718    "Egrave": "\xc8",
719    "Egrave;": "\xc8",
720    "Element;": "\u2208",
721    "Emacr;": "\u0112",
722    "EmptySmallSquare;": "\u25fb",
723    "EmptyVerySmallSquare;": "\u25ab",
724    "Eogon;": "\u0118",
725    "Eopf;": "\U0001d53c",
726    "Epsilon;": "\u0395",
727    "Equal;": "\u2a75",
728    "EqualTilde;": "\u2242",
729    "Equilibrium;": "\u21cc",
730    "Escr;": "\u2130",
731    "Esim;": "\u2a73",
732    "Eta;": "\u0397",
733    "Euml": "\xcb",
734    "Euml;": "\xcb",
735    "Exists;": "\u2203",
736    "ExponentialE;": "\u2147",
737    "Fcy;": "\u0424",
738    "Ffr;": "\U0001d509",
739    "FilledSmallSquare;": "\u25fc",
740    "FilledVerySmallSquare;": "\u25aa",
741    "Fopf;": "\U0001d53d",
742    "ForAll;": "\u2200",
743    "Fouriertrf;": "\u2131",
744    "Fscr;": "\u2131",
745    "GJcy;": "\u0403",
746    "GT": ">",
747    "GT;": ">",
748    "Gamma;": "\u0393",
749    "Gammad;": "\u03dc",
750    "Gbreve;": "\u011e",
751    "Gcedil;": "\u0122",
752    "Gcirc;": "\u011c",
753    "Gcy;": "\u0413",
754    "Gdot;": "\u0120",
755    "Gfr;": "\U0001d50a",
756    "Gg;": "\u22d9",
757    "Gopf;": "\U0001d53e",
758    "GreaterEqual;": "\u2265",
759    "GreaterEqualLess;": "\u22db",
760    "GreaterFullEqual;": "\u2267",
761    "GreaterGreater;": "\u2aa2",
762    "GreaterLess;": "\u2277",
763    "GreaterSlantEqual;": "\u2a7e",
764    "GreaterTilde;": "\u2273",
765    "Gscr;": "\U0001d4a2",
766    "Gt;": "\u226b",
767    "HARDcy;": "\u042a",
768    "Hacek;": "\u02c7",
769    "Hat;": "^",
770    "Hcirc;": "\u0124",
771    "Hfr;": "\u210c",
772    "HilbertSpace;": "\u210b",
773    "Hopf;": "\u210d",
774    "HorizontalLine;": "\u2500",
775    "Hscr;": "\u210b",
776    "Hstrok;": "\u0126",
777    "HumpDownHump;": "\u224e",
778    "HumpEqual;": "\u224f",
779    "IEcy;": "\u0415",
780    "IJlig;": "\u0132",
781    "IOcy;": "\u0401",
782    "Iacute": "\xcd",
783    "Iacute;": "\xcd",
784    "Icirc": "\xce",
785    "Icirc;": "\xce",
786    "Icy;": "\u0418",
787    "Idot;": "\u0130",
788    "Ifr;": "\u2111",
789    "Igrave": "\xcc",
790    "Igrave;": "\xcc",
791    "Im;": "\u2111",
792    "Imacr;": "\u012a",
793    "ImaginaryI;": "\u2148",
794    "Implies;": "\u21d2",
795    "Int;": "\u222c",
796    "Integral;": "\u222b",
797    "Intersection;": "\u22c2",
798    "InvisibleComma;": "\u2063",
799    "InvisibleTimes;": "\u2062",
800    "Iogon;": "\u012e",
801    "Iopf;": "\U0001d540",
802    "Iota;": "\u0399",
803    "Iscr;": "\u2110",
804    "Itilde;": "\u0128",
805    "Iukcy;": "\u0406",
806    "Iuml": "\xcf",
807    "Iuml;": "\xcf",
808    "Jcirc;": "\u0134",
809    "Jcy;": "\u0419",
810    "Jfr;": "\U0001d50d",
811    "Jopf;": "\U0001d541",
812    "Jscr;": "\U0001d4a5",
813    "Jsercy;": "\u0408",
814    "Jukcy;": "\u0404",
815    "KHcy;": "\u0425",
816    "KJcy;": "\u040c",
817    "Kappa;": "\u039a",
818    "Kcedil;": "\u0136",
819    "Kcy;": "\u041a",
820    "Kfr;": "\U0001d50e",
821    "Kopf;": "\U0001d542",
822    "Kscr;": "\U0001d4a6",
823    "LJcy;": "\u0409",
824    "LT": "<",
825    "LT;": "<",
826    "Lacute;": "\u0139",
827    "Lambda;": "\u039b",
828    "Lang;": "\u27ea",
829    "Laplacetrf;": "\u2112",
830    "Larr;": "\u219e",
831    "Lcaron;": "\u013d",
832    "Lcedil;": "\u013b",
833    "Lcy;": "\u041b",
834    "LeftAngleBracket;": "\u27e8",
835    "LeftArrow;": "\u2190",
836    "LeftArrowBar;": "\u21e4",
837    "LeftArrowRightArrow;": "\u21c6",
838    "LeftCeiling;": "\u2308",
839    "LeftDoubleBracket;": "\u27e6",
840    "LeftDownTeeVector;": "\u2961",
841    "LeftDownVector;": "\u21c3",
842    "LeftDownVectorBar;": "\u2959",
843    "LeftFloor;": "\u230a",
844    "LeftRightArrow;": "\u2194",
845    "LeftRightVector;": "\u294e",
846    "LeftTee;": "\u22a3",
847    "LeftTeeArrow;": "\u21a4",
848    "LeftTeeVector;": "\u295a",
849    "LeftTriangle;": "\u22b2",
850    "LeftTriangleBar;": "\u29cf",
851    "LeftTriangleEqual;": "\u22b4",
852    "LeftUpDownVector;": "\u2951",
853    "LeftUpTeeVector;": "\u2960",
854    "LeftUpVector;": "\u21bf",
855    "LeftUpVectorBar;": "\u2958",
856    "LeftVector;": "\u21bc",
857    "LeftVectorBar;": "\u2952",
858    "Leftarrow;": "\u21d0",
859    "Leftrightarrow;": "\u21d4",
860    "LessEqualGreater;": "\u22da",
861    "LessFullEqual;": "\u2266",
862    "LessGreater;": "\u2276",
863    "LessLess;": "\u2aa1",
864    "LessSlantEqual;": "\u2a7d",
865    "LessTilde;": "\u2272",
866    "Lfr;": "\U0001d50f",
867    "Ll;": "\u22d8",
868    "Lleftarrow;": "\u21da",
869    "Lmidot;": "\u013f",
870    "LongLeftArrow;": "\u27f5",
871    "LongLeftRightArrow;": "\u27f7",
872    "LongRightArrow;": "\u27f6",
873    "Longleftarrow;": "\u27f8",
874    "Longleftrightarrow;": "\u27fa",
875    "Longrightarrow;": "\u27f9",
876    "Lopf;": "\U0001d543",
877    "LowerLeftArrow;": "\u2199",
878    "LowerRightArrow;": "\u2198",
879    "Lscr;": "\u2112",
880    "Lsh;": "\u21b0",
881    "Lstrok;": "\u0141",
882    "Lt;": "\u226a",
883    "Map;": "\u2905",
884    "Mcy;": "\u041c",
885    "MediumSpace;": "\u205f",
886    "Mellintrf;": "\u2133",
887    "Mfr;": "\U0001d510",
888    "MinusPlus;": "\u2213",
889    "Mopf;": "\U0001d544",
890    "Mscr;": "\u2133",
891    "Mu;": "\u039c",
892    "NJcy;": "\u040a",
893    "Nacute;": "\u0143",
894    "Ncaron;": "\u0147",
895    "Ncedil;": "\u0145",
896    "Ncy;": "\u041d",
897    "NegativeMediumSpace;": "\u200b",
898    "NegativeThickSpace;": "\u200b",
899    "NegativeThinSpace;": "\u200b",
900    "NegativeVeryThinSpace;": "\u200b",
901    "NestedGreaterGreater;": "\u226b",
902    "NestedLessLess;": "\u226a",
903    "NewLine;": "\n",
904    "Nfr;": "\U0001d511",
905    "NoBreak;": "\u2060",
906    "NonBreakingSpace;": "\xa0",
907    "Nopf;": "\u2115",
908    "Not;": "\u2aec",
909    "NotCongruent;": "\u2262",
910    "NotCupCap;": "\u226d",
911    "NotDoubleVerticalBar;": "\u2226",
912    "NotElement;": "\u2209",
913    "NotEqual;": "\u2260",
914    "NotEqualTilde;": "\u2242\u0338",
915    "NotExists;": "\u2204",
916    "NotGreater;": "\u226f",
917    "NotGreaterEqual;": "\u2271",
918    "NotGreaterFullEqual;": "\u2267\u0338",
919    "NotGreaterGreater;": "\u226b\u0338",
920    "NotGreaterLess;": "\u2279",
921    "NotGreaterSlantEqual;": "\u2a7e\u0338",
922    "NotGreaterTilde;": "\u2275",
923    "NotHumpDownHump;": "\u224e\u0338",
924    "NotHumpEqual;": "\u224f\u0338",
925    "NotLeftTriangle;": "\u22ea",
926    "NotLeftTriangleBar;": "\u29cf\u0338",
927    "NotLeftTriangleEqual;": "\u22ec",
928    "NotLess;": "\u226e",
929    "NotLessEqual;": "\u2270",
930    "NotLessGreater;": "\u2278",
931    "NotLessLess;": "\u226a\u0338",
932    "NotLessSlantEqual;": "\u2a7d\u0338",
933    "NotLessTilde;": "\u2274",
934    "NotNestedGreaterGreater;": "\u2aa2\u0338",
935    "NotNestedLessLess;": "\u2aa1\u0338",
936    "NotPrecedes;": "\u2280",
937    "NotPrecedesEqual;": "\u2aaf\u0338",
938    "NotPrecedesSlantEqual;": "\u22e0",
939    "NotReverseElement;": "\u220c",
940    "NotRightTriangle;": "\u22eb",
941    "NotRightTriangleBar;": "\u29d0\u0338",
942    "NotRightTriangleEqual;": "\u22ed",
943    "NotSquareSubset;": "\u228f\u0338",
944    "NotSquareSubsetEqual;": "\u22e2",
945    "NotSquareSuperset;": "\u2290\u0338",
946    "NotSquareSupersetEqual;": "\u22e3",
947    "NotSubset;": "\u2282\u20d2",
948    "NotSubsetEqual;": "\u2288",
949    "NotSucceeds;": "\u2281",
950    "NotSucceedsEqual;": "\u2ab0\u0338",
951    "NotSucceedsSlantEqual;": "\u22e1",
952    "NotSucceedsTilde;": "\u227f\u0338",
953    "NotSuperset;": "\u2283\u20d2",
954    "NotSupersetEqual;": "\u2289",
955    "NotTilde;": "\u2241",
956    "NotTildeEqual;": "\u2244",
957    "NotTildeFullEqual;": "\u2247",
958    "NotTildeTilde;": "\u2249",
959    "NotVerticalBar;": "\u2224",
960    "Nscr;": "\U0001d4a9",
961    "Ntilde": "\xd1",
962    "Ntilde;": "\xd1",
963    "Nu;": "\u039d",
964    "OElig;": "\u0152",
965    "Oacute": "\xd3",
966    "Oacute;": "\xd3",
967    "Ocirc": "\xd4",
968    "Ocirc;": "\xd4",
969    "Ocy;": "\u041e",
970    "Odblac;": "\u0150",
971    "Ofr;": "\U0001d512",
972    "Ograve": "\xd2",
973    "Ograve;": "\xd2",
974    "Omacr;": "\u014c",
975    "Omega;": "\u03a9",
976    "Omicron;": "\u039f",
977    "Oopf;": "\U0001d546",
978    "OpenCurlyDoubleQuote;": "\u201c",
979    "OpenCurlyQuote;": "\u2018",
980    "Or;": "\u2a54",
981    "Oscr;": "\U0001d4aa",
982    "Oslash": "\xd8",
983    "Oslash;": "\xd8",
984    "Otilde": "\xd5",
985    "Otilde;": "\xd5",
986    "Otimes;": "\u2a37",
987    "Ouml": "\xd6",
988    "Ouml;": "\xd6",
989    "OverBar;": "\u203e",
990    "OverBrace;": "\u23de",
991    "OverBracket;": "\u23b4",
992    "OverParenthesis;": "\u23dc",
993    "PartialD;": "\u2202",
994    "Pcy;": "\u041f",
995    "Pfr;": "\U0001d513",
996    "Phi;": "\u03a6",
997    "Pi;": "\u03a0",
998    "PlusMinus;": "\xb1",
999    "Poincareplane;": "\u210c",
1000    "Popf;": "\u2119",
1001    "Pr;": "\u2abb",
1002    "Precedes;": "\u227a",
1003    "PrecedesEqual;": "\u2aaf",
1004    "PrecedesSlantEqual;": "\u227c",
1005    "PrecedesTilde;": "\u227e",
1006    "Prime;": "\u2033",
1007    "Product;": "\u220f",
1008    "Proportion;": "\u2237",
1009    "Proportional;": "\u221d",
1010    "Pscr;": "\U0001d4ab",
1011    "Psi;": "\u03a8",
1012    "QUOT": "\"",
1013    "QUOT;": "\"",
1014    "Qfr;": "\U0001d514",
1015    "Qopf;": "\u211a",
1016    "Qscr;": "\U0001d4ac",
1017    "RBarr;": "\u2910",
1018    "REG": "\xae",
1019    "REG;": "\xae",
1020    "Racute;": "\u0154",
1021    "Rang;": "\u27eb",
1022    "Rarr;": "\u21a0",
1023    "Rarrtl;": "\u2916",
1024    "Rcaron;": "\u0158",
1025    "Rcedil;": "\u0156",
1026    "Rcy;": "\u0420",
1027    "Re;": "\u211c",
1028    "ReverseElement;": "\u220b",
1029    "ReverseEquilibrium;": "\u21cb",
1030    "ReverseUpEquilibrium;": "\u296f",
1031    "Rfr;": "\u211c",
1032    "Rho;": "\u03a1",
1033    "RightAngleBracket;": "\u27e9",
1034    "RightArrow;": "\u2192",
1035    "RightArrowBar;": "\u21e5",
1036    "RightArrowLeftArrow;": "\u21c4",
1037    "RightCeiling;": "\u2309",
1038    "RightDoubleBracket;": "\u27e7",
1039    "RightDownTeeVector;": "\u295d",
1040    "RightDownVector;": "\u21c2",
1041    "RightDownVectorBar;": "\u2955",
1042    "RightFloor;": "\u230b",
1043    "RightTee;": "\u22a2",
1044    "RightTeeArrow;": "\u21a6",
1045    "RightTeeVector;": "\u295b",
1046    "RightTriangle;": "\u22b3",
1047    "RightTriangleBar;": "\u29d0",
1048    "RightTriangleEqual;": "\u22b5",
1049    "RightUpDownVector;": "\u294f",
1050    "RightUpTeeVector;": "\u295c",
1051    "RightUpVector;": "\u21be",
1052    "RightUpVectorBar;": "\u2954",
1053    "RightVector;": "\u21c0",
1054    "RightVectorBar;": "\u2953",
1055    "Rightarrow;": "\u21d2",
1056    "Ropf;": "\u211d",
1057    "RoundImplies;": "\u2970",
1058    "Rrightarrow;": "\u21db",
1059    "Rscr;": "\u211b",
1060    "Rsh;": "\u21b1",
1061    "RuleDelayed;": "\u29f4",
1062    "SHCHcy;": "\u0429",
1063    "SHcy;": "\u0428",
1064    "SOFTcy;": "\u042c",
1065    "Sacute;": "\u015a",
1066    "Sc;": "\u2abc",
1067    "Scaron;": "\u0160",
1068    "Scedil;": "\u015e",
1069    "Scirc;": "\u015c",
1070    "Scy;": "\u0421",
1071    "Sfr;": "\U0001d516",
1072    "ShortDownArrow;": "\u2193",
1073    "ShortLeftArrow;": "\u2190",
1074    "ShortRightArrow;": "\u2192",
1075    "ShortUpArrow;": "\u2191",
1076    "Sigma;": "\u03a3",
1077    "SmallCircle;": "\u2218",
1078    "Sopf;": "\U0001d54a",
1079    "Sqrt;": "\u221a",
1080    "Square;": "\u25a1",
1081    "SquareIntersection;": "\u2293",
1082    "SquareSubset;": "\u228f",
1083    "SquareSubsetEqual;": "\u2291",
1084    "SquareSuperset;": "\u2290",
1085    "SquareSupersetEqual;": "\u2292",
1086    "SquareUnion;": "\u2294",
1087    "Sscr;": "\U0001d4ae",
1088    "Star;": "\u22c6",
1089    "Sub;": "\u22d0",
1090    "Subset;": "\u22d0",
1091    "SubsetEqual;": "\u2286",
1092    "Succeeds;": "\u227b",
1093    "SucceedsEqual;": "\u2ab0",
1094    "SucceedsSlantEqual;": "\u227d",
1095    "SucceedsTilde;": "\u227f",
1096    "SuchThat;": "\u220b",
1097    "Sum;": "\u2211",
1098    "Sup;": "\u22d1",
1099    "Superset;": "\u2283",
1100    "SupersetEqual;": "\u2287",
1101    "Supset;": "\u22d1",
1102    "THORN": "\xde",
1103    "THORN;": "\xde",
1104    "TRADE;": "\u2122",
1105    "TSHcy;": "\u040b",
1106    "TScy;": "\u0426",
1107    "Tab;": "\t",
1108    "Tau;": "\u03a4",
1109    "Tcaron;": "\u0164",
1110    "Tcedil;": "\u0162",
1111    "Tcy;": "\u0422",
1112    "Tfr;": "\U0001d517",
1113    "Therefore;": "\u2234",
1114    "Theta;": "\u0398",
1115    "ThickSpace;": "\u205f\u200a",
1116    "ThinSpace;": "\u2009",
1117    "Tilde;": "\u223c",
1118    "TildeEqual;": "\u2243",
1119    "TildeFullEqual;": "\u2245",
1120    "TildeTilde;": "\u2248",
1121    "Topf;": "\U0001d54b",
1122    "TripleDot;": "\u20db",
1123    "Tscr;": "\U0001d4af",
1124    "Tstrok;": "\u0166",
1125    "Uacute": "\xda",
1126    "Uacute;": "\xda",
1127    "Uarr;": "\u219f",
1128    "Uarrocir;": "\u2949",
1129    "Ubrcy;": "\u040e",
1130    "Ubreve;": "\u016c",
1131    "Ucirc": "\xdb",
1132    "Ucirc;": "\xdb",
1133    "Ucy;": "\u0423",
1134    "Udblac;": "\u0170",
1135    "Ufr;": "\U0001d518",
1136    "Ugrave": "\xd9",
1137    "Ugrave;": "\xd9",
1138    "Umacr;": "\u016a",
1139    "UnderBar;": "_",
1140    "UnderBrace;": "\u23df",
1141    "UnderBracket;": "\u23b5",
1142    "UnderParenthesis;": "\u23dd",
1143    "Union;": "\u22c3",
1144    "UnionPlus;": "\u228e",
1145    "Uogon;": "\u0172",
1146    "Uopf;": "\U0001d54c",
1147    "UpArrow;": "\u2191",
1148    "UpArrowBar;": "\u2912",
1149    "UpArrowDownArrow;": "\u21c5",
1150    "UpDownArrow;": "\u2195",
1151    "UpEquilibrium;": "\u296e",
1152    "UpTee;": "\u22a5",
1153    "UpTeeArrow;": "\u21a5",
1154    "Uparrow;": "\u21d1",
1155    "Updownarrow;": "\u21d5",
1156    "UpperLeftArrow;": "\u2196",
1157    "UpperRightArrow;": "\u2197",
1158    "Upsi;": "\u03d2",
1159    "Upsilon;": "\u03a5",
1160    "Uring;": "\u016e",
1161    "Uscr;": "\U0001d4b0",
1162    "Utilde;": "\u0168",
1163    "Uuml": "\xdc",
1164    "Uuml;": "\xdc",
1165    "VDash;": "\u22ab",
1166    "Vbar;": "\u2aeb",
1167    "Vcy;": "\u0412",
1168    "Vdash;": "\u22a9",
1169    "Vdashl;": "\u2ae6",
1170    "Vee;": "\u22c1",
1171    "Verbar;": "\u2016",
1172    "Vert;": "\u2016",
1173    "VerticalBar;": "\u2223",
1174    "VerticalLine;": "|",
1175    "VerticalSeparator;": "\u2758",
1176    "VerticalTilde;": "\u2240",
1177    "VeryThinSpace;": "\u200a",
1178    "Vfr;": "\U0001d519",
1179    "Vopf;": "\U0001d54d",
1180    "Vscr;": "\U0001d4b1",
1181    "Vvdash;": "\u22aa",
1182    "Wcirc;": "\u0174",
1183    "Wedge;": "\u22c0",
1184    "Wfr;": "\U0001d51a",
1185    "Wopf;": "\U0001d54e",
1186    "Wscr;": "\U0001d4b2",
1187    "Xfr;": "\U0001d51b",
1188    "Xi;": "\u039e",
1189    "Xopf;": "\U0001d54f",
1190    "Xscr;": "\U0001d4b3",
1191    "YAcy;": "\u042f",
1192    "YIcy;": "\u0407",
1193    "YUcy;": "\u042e",
1194    "Yacute": "\xdd",
1195    "Yacute;": "\xdd",
1196    "Ycirc;": "\u0176",
1197    "Ycy;": "\u042b",
1198    "Yfr;": "\U0001d51c",
1199    "Yopf;": "\U0001d550",
1200    "Yscr;": "\U0001d4b4",
1201    "Yuml;": "\u0178",
1202    "ZHcy;": "\u0416",
1203    "Zacute;": "\u0179",
1204    "Zcaron;": "\u017d",
1205    "Zcy;": "\u0417",
1206    "Zdot;": "\u017b",
1207    "ZeroWidthSpace;": "\u200b",
1208    "Zeta;": "\u0396",
1209    "Zfr;": "\u2128",
1210    "Zopf;": "\u2124",
1211    "Zscr;": "\U0001d4b5",
1212    "aacute": "\xe1",
1213    "aacute;": "\xe1",
1214    "abreve;": "\u0103",
1215    "ac;": "\u223e",
1216    "acE;": "\u223e\u0333",
1217    "acd;": "\u223f",
1218    "acirc": "\xe2",
1219    "acirc;": "\xe2",
1220    "acute": "\xb4",
1221    "acute;": "\xb4",
1222    "acy;": "\u0430",
1223    "aelig": "\xe6",
1224    "aelig;": "\xe6",
1225    "af;": "\u2061",
1226    "afr;": "\U0001d51e",
1227    "agrave": "\xe0",
1228    "agrave;": "\xe0",
1229    "alefsym;": "\u2135",
1230    "aleph;": "\u2135",
1231    "alpha;": "\u03b1",
1232    "amacr;": "\u0101",
1233    "amalg;": "\u2a3f",
1234    "amp": "&",
1235    "amp;": "&",
1236    "and;": "\u2227",
1237    "andand;": "\u2a55",
1238    "andd;": "\u2a5c",
1239    "andslope;": "\u2a58",
1240    "andv;": "\u2a5a",
1241    "ang;": "\u2220",
1242    "ange;": "\u29a4",
1243    "angle;": "\u2220",
1244    "angmsd;": "\u2221",
1245    "angmsdaa;": "\u29a8",
1246    "angmsdab;": "\u29a9",
1247    "angmsdac;": "\u29aa",
1248    "angmsdad;": "\u29ab",
1249    "angmsdae;": "\u29ac",
1250    "angmsdaf;": "\u29ad",
1251    "angmsdag;": "\u29ae",
1252    "angmsdah;": "\u29af",
1253    "angrt;": "\u221f",
1254    "angrtvb;": "\u22be",
1255    "angrtvbd;": "\u299d",
1256    "angsph;": "\u2222",
1257    "angst;": "\xc5",
1258    "angzarr;": "\u237c",
1259    "aogon;": "\u0105",
1260    "aopf;": "\U0001d552",
1261    "ap;": "\u2248",
1262    "apE;": "\u2a70",
1263    "apacir;": "\u2a6f",
1264    "ape;": "\u224a",
1265    "apid;": "\u224b",
1266    "apos;": "'",
1267    "approx;": "\u2248",
1268    "approxeq;": "\u224a",
1269    "aring": "\xe5",
1270    "aring;": "\xe5",
1271    "ascr;": "\U0001d4b6",
1272    "ast;": "*",
1273    "asymp;": "\u2248",
1274    "asympeq;": "\u224d",
1275    "atilde": "\xe3",
1276    "atilde;": "\xe3",
1277    "auml": "\xe4",
1278    "auml;": "\xe4",
1279    "awconint;": "\u2233",
1280    "awint;": "\u2a11",
1281    "bNot;": "\u2aed",
1282    "backcong;": "\u224c",
1283    "backepsilon;": "\u03f6",
1284    "backprime;": "\u2035",
1285    "backsim;": "\u223d",
1286    "backsimeq;": "\u22cd",
1287    "barvee;": "\u22bd",
1288    "barwed;": "\u2305",
1289    "barwedge;": "\u2305",
1290    "bbrk;": "\u23b5",
1291    "bbrktbrk;": "\u23b6",
1292    "bcong;": "\u224c",
1293    "bcy;": "\u0431",
1294    "bdquo;": "\u201e",
1295    "becaus;": "\u2235",
1296    "because;": "\u2235",
1297    "bemptyv;": "\u29b0",
1298    "bepsi;": "\u03f6",
1299    "bernou;": "\u212c",
1300    "beta;": "\u03b2",
1301    "beth;": "\u2136",
1302    "between;": "\u226c",
1303    "bfr;": "\U0001d51f",
1304    "bigcap;": "\u22c2",
1305    "bigcirc;": "\u25ef",
1306    "bigcup;": "\u22c3",
1307    "bigodot;": "\u2a00",
1308    "bigoplus;": "\u2a01",
1309    "bigotimes;": "\u2a02",
1310    "bigsqcup;": "\u2a06",
1311    "bigstar;": "\u2605",
1312    "bigtriangledown;": "\u25bd",
1313    "bigtriangleup;": "\u25b3",
1314    "biguplus;": "\u2a04",
1315    "bigvee;": "\u22c1",
1316    "bigwedge;": "\u22c0",
1317    "bkarow;": "\u290d",
1318    "blacklozenge;": "\u29eb",
1319    "blacksquare;": "\u25aa",
1320    "blacktriangle;": "\u25b4",
1321    "blacktriangledown;": "\u25be",
1322    "blacktriangleleft;": "\u25c2",
1323    "blacktriangleright;": "\u25b8",
1324    "blank;": "\u2423",
1325    "blk12;": "\u2592",
1326    "blk14;": "\u2591",
1327    "blk34;": "\u2593",
1328    "block;": "\u2588",
1329    "bne;": "=\u20e5",
1330    "bnequiv;": "\u2261\u20e5",
1331    "bnot;": "\u2310",
1332    "bopf;": "\U0001d553",
1333    "bot;": "\u22a5",
1334    "bottom;": "\u22a5",
1335    "bowtie;": "\u22c8",
1336    "boxDL;": "\u2557",
1337    "boxDR;": "\u2554",
1338    "boxDl;": "\u2556",
1339    "boxDr;": "\u2553",
1340    "boxH;": "\u2550",
1341    "boxHD;": "\u2566",
1342    "boxHU;": "\u2569",
1343    "boxHd;": "\u2564",
1344    "boxHu;": "\u2567",
1345    "boxUL;": "\u255d",
1346    "boxUR;": "\u255a",
1347    "boxUl;": "\u255c",
1348    "boxUr;": "\u2559",
1349    "boxV;": "\u2551",
1350    "boxVH;": "\u256c",
1351    "boxVL;": "\u2563",
1352    "boxVR;": "\u2560",
1353    "boxVh;": "\u256b",
1354    "boxVl;": "\u2562",
1355    "boxVr;": "\u255f",
1356    "boxbox;": "\u29c9",
1357    "boxdL;": "\u2555",
1358    "boxdR;": "\u2552",
1359    "boxdl;": "\u2510",
1360    "boxdr;": "\u250c",
1361    "boxh;": "\u2500",
1362    "boxhD;": "\u2565",
1363    "boxhU;": "\u2568",
1364    "boxhd;": "\u252c",
1365    "boxhu;": "\u2534",
1366    "boxminus;": "\u229f",
1367    "boxplus;": "\u229e",
1368    "boxtimes;": "\u22a0",
1369    "boxuL;": "\u255b",
1370    "boxuR;": "\u2558",
1371    "boxul;": "\u2518",
1372    "boxur;": "\u2514",
1373    "boxv;": "\u2502",
1374    "boxvH;": "\u256a",
1375    "boxvL;": "\u2561",
1376    "boxvR;": "\u255e",
1377    "boxvh;": "\u253c",
1378    "boxvl;": "\u2524",
1379    "boxvr;": "\u251c",
1380    "bprime;": "\u2035",
1381    "breve;": "\u02d8",
1382    "brvbar": "\xa6",
1383    "brvbar;": "\xa6",
1384    "bscr;": "\U0001d4b7",
1385    "bsemi;": "\u204f",
1386    "bsim;": "\u223d",
1387    "bsime;": "\u22cd",
1388    "bsol;": "\\",
1389    "bsolb;": "\u29c5",
1390    "bsolhsub;": "\u27c8",
1391    "bull;": "\u2022",
1392    "bullet;": "\u2022",
1393    "bump;": "\u224e",
1394    "bumpE;": "\u2aae",
1395    "bumpe;": "\u224f",
1396    "bumpeq;": "\u224f",
1397    "cacute;": "\u0107",
1398    "cap;": "\u2229",
1399    "capand;": "\u2a44",
1400    "capbrcup;": "\u2a49",
1401    "capcap;": "\u2a4b",
1402    "capcup;": "\u2a47",
1403    "capdot;": "\u2a40",
1404    "caps;": "\u2229\ufe00",
1405    "caret;": "\u2041",
1406    "caron;": "\u02c7",
1407    "ccaps;": "\u2a4d",
1408    "ccaron;": "\u010d",
1409    "ccedil": "\xe7",
1410    "ccedil;": "\xe7",
1411    "ccirc;": "\u0109",
1412    "ccups;": "\u2a4c",
1413    "ccupssm;": "\u2a50",
1414    "cdot;": "\u010b",
1415    "cedil": "\xb8",
1416    "cedil;": "\xb8",
1417    "cemptyv;": "\u29b2",
1418    "cent": "\xa2",
1419    "cent;": "\xa2",
1420    "centerdot;": "\xb7",
1421    "cfr;": "\U0001d520",
1422    "chcy;": "\u0447",
1423    "check;": "\u2713",
1424    "checkmark;": "\u2713",
1425    "chi;": "\u03c7",
1426    "cir;": "\u25cb",
1427    "cirE;": "\u29c3",
1428    "circ;": "\u02c6",
1429    "circeq;": "\u2257",
1430    "circlearrowleft;": "\u21ba",
1431    "circlearrowright;": "\u21bb",
1432    "circledR;": "\xae",
1433    "circledS;": "\u24c8",
1434    "circledast;": "\u229b",
1435    "circledcirc;": "\u229a",
1436    "circleddash;": "\u229d",
1437    "cire;": "\u2257",
1438    "cirfnint;": "\u2a10",
1439    "cirmid;": "\u2aef",
1440    "cirscir;": "\u29c2",
1441    "clubs;": "\u2663",
1442    "clubsuit;": "\u2663",
1443    "colon;": ":",
1444    "colone;": "\u2254",
1445    "coloneq;": "\u2254",
1446    "comma;": ",",
1447    "commat;": "@",
1448    "comp;": "\u2201",
1449    "compfn;": "\u2218",
1450    "complement;": "\u2201",
1451    "complexes;": "\u2102",
1452    "cong;": "\u2245",
1453    "congdot;": "\u2a6d",
1454    "conint;": "\u222e",
1455    "copf;": "\U0001d554",
1456    "coprod;": "\u2210",
1457    "copy": "\xa9",
1458    "copy;": "\xa9",
1459    "copysr;": "\u2117",
1460    "crarr;": "\u21b5",
1461    "cross;": "\u2717",
1462    "cscr;": "\U0001d4b8",
1463    "csub;": "\u2acf",
1464    "csube;": "\u2ad1",
1465    "csup;": "\u2ad0",
1466    "csupe;": "\u2ad2",
1467    "ctdot;": "\u22ef",
1468    "cudarrl;": "\u2938",
1469    "cudarrr;": "\u2935",
1470    "cuepr;": "\u22de",
1471    "cuesc;": "\u22df",
1472    "cularr;": "\u21b6",
1473    "cularrp;": "\u293d",
1474    "cup;": "\u222a",
1475    "cupbrcap;": "\u2a48",
1476    "cupcap;": "\u2a46",
1477    "cupcup;": "\u2a4a",
1478    "cupdot;": "\u228d",
1479    "cupor;": "\u2a45",
1480    "cups;": "\u222a\ufe00",
1481    "curarr;": "\u21b7",
1482    "curarrm;": "\u293c",
1483    "curlyeqprec;": "\u22de",
1484    "curlyeqsucc;": "\u22df",
1485    "curlyvee;": "\u22ce",
1486    "curlywedge;": "\u22cf",
1487    "curren": "\xa4",
1488    "curren;": "\xa4",
1489    "curvearrowleft;": "\u21b6",
1490    "curvearrowright;": "\u21b7",
1491    "cuvee;": "\u22ce",
1492    "cuwed;": "\u22cf",
1493    "cwconint;": "\u2232",
1494    "cwint;": "\u2231",
1495    "cylcty;": "\u232d",
1496    "dArr;": "\u21d3",
1497    "dHar;": "\u2965",
1498    "dagger;": "\u2020",
1499    "daleth;": "\u2138",
1500    "darr;": "\u2193",
1501    "dash;": "\u2010",
1502    "dashv;": "\u22a3",
1503    "dbkarow;": "\u290f",
1504    "dblac;": "\u02dd",
1505    "dcaron;": "\u010f",
1506    "dcy;": "\u0434",
1507    "dd;": "\u2146",
1508    "ddagger;": "\u2021",
1509    "ddarr;": "\u21ca",
1510    "ddotseq;": "\u2a77",
1511    "deg": "\xb0",
1512    "deg;": "\xb0",
1513    "delta;": "\u03b4",
1514    "demptyv;": "\u29b1",
1515    "dfisht;": "\u297f",
1516    "dfr;": "\U0001d521",
1517    "dharl;": "\u21c3",
1518    "dharr;": "\u21c2",
1519    "diam;": "\u22c4",
1520    "diamond;": "\u22c4",
1521    "diamondsuit;": "\u2666",
1522    "diams;": "\u2666",
1523    "die;": "\xa8",
1524    "digamma;": "\u03dd",
1525    "disin;": "\u22f2",
1526    "div;": "\xf7",
1527    "divide": "\xf7",
1528    "divide;": "\xf7",
1529    "divideontimes;": "\u22c7",
1530    "divonx;": "\u22c7",
1531    "djcy;": "\u0452",
1532    "dlcorn;": "\u231e",
1533    "dlcrop;": "\u230d",
1534    "dollar;": "$",
1535    "dopf;": "\U0001d555",
1536    "dot;": "\u02d9",
1537    "doteq;": "\u2250",
1538    "doteqdot;": "\u2251",
1539    "dotminus;": "\u2238",
1540    "dotplus;": "\u2214",
1541    "dotsquare;": "\u22a1",
1542    "doublebarwedge;": "\u2306",
1543    "downarrow;": "\u2193",
1544    "downdownarrows;": "\u21ca",
1545    "downharpoonleft;": "\u21c3",
1546    "downharpoonright;": "\u21c2",
1547    "drbkarow;": "\u2910",
1548    "drcorn;": "\u231f",
1549    "drcrop;": "\u230c",
1550    "dscr;": "\U0001d4b9",
1551    "dscy;": "\u0455",
1552    "dsol;": "\u29f6",
1553    "dstrok;": "\u0111",
1554    "dtdot;": "\u22f1",
1555    "dtri;": "\u25bf",
1556    "dtrif;": "\u25be",
1557    "duarr;": "\u21f5",
1558    "duhar;": "\u296f",
1559    "dwangle;": "\u29a6",
1560    "dzcy;": "\u045f",
1561    "dzigrarr;": "\u27ff",
1562    "eDDot;": "\u2a77",
1563    "eDot;": "\u2251",
1564    "eacute": "\xe9",
1565    "eacute;": "\xe9",
1566    "easter;": "\u2a6e",
1567    "ecaron;": "\u011b",
1568    "ecir;": "\u2256",
1569    "ecirc": "\xea",
1570    "ecirc;": "\xea",
1571    "ecolon;": "\u2255",
1572    "ecy;": "\u044d",
1573    "edot;": "\u0117",
1574    "ee;": "\u2147",
1575    "efDot;": "\u2252",
1576    "efr;": "\U0001d522",
1577    "eg;": "\u2a9a",
1578    "egrave": "\xe8",
1579    "egrave;": "\xe8",
1580    "egs;": "\u2a96",
1581    "egsdot;": "\u2a98",
1582    "el;": "\u2a99",
1583    "elinters;": "\u23e7",
1584    "ell;": "\u2113",
1585    "els;": "\u2a95",
1586    "elsdot;": "\u2a97",
1587    "emacr;": "\u0113",
1588    "empty;": "\u2205",
1589    "emptyset;": "\u2205",
1590    "emptyv;": "\u2205",
1591    "emsp13;": "\u2004",
1592    "emsp14;": "\u2005",
1593    "emsp;": "\u2003",
1594    "eng;": "\u014b",
1595    "ensp;": "\u2002",
1596    "eogon;": "\u0119",
1597    "eopf;": "\U0001d556",
1598    "epar;": "\u22d5",
1599    "eparsl;": "\u29e3",
1600    "eplus;": "\u2a71",
1601    "epsi;": "\u03b5",
1602    "epsilon;": "\u03b5",
1603    "epsiv;": "\u03f5",
1604    "eqcirc;": "\u2256",
1605    "eqcolon;": "\u2255",
1606    "eqsim;": "\u2242",
1607    "eqslantgtr;": "\u2a96",
1608    "eqslantless;": "\u2a95",
1609    "equals;": "=",
1610    "equest;": "\u225f",
1611    "equiv;": "\u2261",
1612    "equivDD;": "\u2a78",
1613    "eqvparsl;": "\u29e5",
1614    "erDot;": "\u2253",
1615    "erarr;": "\u2971",
1616    "escr;": "\u212f",
1617    "esdot;": "\u2250",
1618    "esim;": "\u2242",
1619    "eta;": "\u03b7",
1620    "eth": "\xf0",
1621    "eth;": "\xf0",
1622    "euml": "\xeb",
1623    "euml;": "\xeb",
1624    "euro;": "\u20ac",
1625    "excl;": "!",
1626    "exist;": "\u2203",
1627    "expectation;": "\u2130",
1628    "exponentiale;": "\u2147",
1629    "fallingdotseq;": "\u2252",
1630    "fcy;": "\u0444",
1631    "female;": "\u2640",
1632    "ffilig;": "\ufb03",
1633    "fflig;": "\ufb00",
1634    "ffllig;": "\ufb04",
1635    "ffr;": "\U0001d523",
1636    "filig;": "\ufb01",
1637    "fjlig;": "fj",
1638    "flat;": "\u266d",
1639    "fllig;": "\ufb02",
1640    "fltns;": "\u25b1",
1641    "fnof;": "\u0192",
1642    "fopf;": "\U0001d557",
1643    "forall;": "\u2200",
1644    "fork;": "\u22d4",
1645    "forkv;": "\u2ad9",
1646    "fpartint;": "\u2a0d",
1647    "frac12": "\xbd",
1648    "frac12;": "\xbd",
1649    "frac13;": "\u2153",
1650    "frac14": "\xbc",
1651    "frac14;": "\xbc",
1652    "frac15;": "\u2155",
1653    "frac16;": "\u2159",
1654    "frac18;": "\u215b",
1655    "frac23;": "\u2154",
1656    "frac25;": "\u2156",
1657    "frac34": "\xbe",
1658    "frac34;": "\xbe",
1659    "frac35;": "\u2157",
1660    "frac38;": "\u215c",
1661    "frac45;": "\u2158",
1662    "frac56;": "\u215a",
1663    "frac58;": "\u215d",
1664    "frac78;": "\u215e",
1665    "frasl;": "\u2044",
1666    "frown;": "\u2322",
1667    "fscr;": "\U0001d4bb",
1668    "gE;": "\u2267",
1669    "gEl;": "\u2a8c",
1670    "gacute;": "\u01f5",
1671    "gamma;": "\u03b3",
1672    "gammad;": "\u03dd",
1673    "gap;": "\u2a86",
1674    "gbreve;": "\u011f",
1675    "gcirc;": "\u011d",
1676    "gcy;": "\u0433",
1677    "gdot;": "\u0121",
1678    "ge;": "\u2265",
1679    "gel;": "\u22db",
1680    "geq;": "\u2265",
1681    "geqq;": "\u2267",
1682    "geqslant;": "\u2a7e",
1683    "ges;": "\u2a7e",
1684    "gescc;": "\u2aa9",
1685    "gesdot;": "\u2a80",
1686    "gesdoto;": "\u2a82",
1687    "gesdotol;": "\u2a84",
1688    "gesl;": "\u22db\ufe00",
1689    "gesles;": "\u2a94",
1690    "gfr;": "\U0001d524",
1691    "gg;": "\u226b",
1692    "ggg;": "\u22d9",
1693    "gimel;": "\u2137",
1694    "gjcy;": "\u0453",
1695    "gl;": "\u2277",
1696    "glE;": "\u2a92",
1697    "gla;": "\u2aa5",
1698    "glj;": "\u2aa4",
1699    "gnE;": "\u2269",
1700    "gnap;": "\u2a8a",
1701    "gnapprox;": "\u2a8a",
1702    "gne;": "\u2a88",
1703    "gneq;": "\u2a88",
1704    "gneqq;": "\u2269",
1705    "gnsim;": "\u22e7",
1706    "gopf;": "\U0001d558",
1707    "grave;": "`",
1708    "gscr;": "\u210a",
1709    "gsim;": "\u2273",
1710    "gsime;": "\u2a8e",
1711    "gsiml;": "\u2a90",
1712    "gt": ">",
1713    "gt;": ">",
1714    "gtcc;": "\u2aa7",
1715    "gtcir;": "\u2a7a",
1716    "gtdot;": "\u22d7",
1717    "gtlPar;": "\u2995",
1718    "gtquest;": "\u2a7c",
1719    "gtrapprox;": "\u2a86",
1720    "gtrarr;": "\u2978",
1721    "gtrdot;": "\u22d7",
1722    "gtreqless;": "\u22db",
1723    "gtreqqless;": "\u2a8c",
1724    "gtrless;": "\u2277",
1725    "gtrsim;": "\u2273",
1726    "gvertneqq;": "\u2269\ufe00",
1727    "gvnE;": "\u2269\ufe00",
1728    "hArr;": "\u21d4",
1729    "hairsp;": "\u200a",
1730    "half;": "\xbd",
1731    "hamilt;": "\u210b",
1732    "hardcy;": "\u044a",
1733    "harr;": "\u2194",
1734    "harrcir;": "\u2948",
1735    "harrw;": "\u21ad",
1736    "hbar;": "\u210f",
1737    "hcirc;": "\u0125",
1738    "hearts;": "\u2665",
1739    "heartsuit;": "\u2665",
1740    "hellip;": "\u2026",
1741    "hercon;": "\u22b9",
1742    "hfr;": "\U0001d525",
1743    "hksearow;": "\u2925",
1744    "hkswarow;": "\u2926",
1745    "hoarr;": "\u21ff",
1746    "homtht;": "\u223b",
1747    "hookleftarrow;": "\u21a9",
1748    "hookrightarrow;": "\u21aa",
1749    "hopf;": "\U0001d559",
1750    "horbar;": "\u2015",
1751    "hscr;": "\U0001d4bd",
1752    "hslash;": "\u210f",
1753    "hstrok;": "\u0127",
1754    "hybull;": "\u2043",
1755    "hyphen;": "\u2010",
1756    "iacute": "\xed",
1757    "iacute;": "\xed",
1758    "ic;": "\u2063",
1759    "icirc": "\xee",
1760    "icirc;": "\xee",
1761    "icy;": "\u0438",
1762    "iecy;": "\u0435",
1763    "iexcl": "\xa1",
1764    "iexcl;": "\xa1",
1765    "iff;": "\u21d4",
1766    "ifr;": "\U0001d526",
1767    "igrave": "\xec",
1768    "igrave;": "\xec",
1769    "ii;": "\u2148",
1770    "iiiint;": "\u2a0c",
1771    "iiint;": "\u222d",
1772    "iinfin;": "\u29dc",
1773    "iiota;": "\u2129",
1774    "ijlig;": "\u0133",
1775    "imacr;": "\u012b",
1776    "image;": "\u2111",
1777    "imagline;": "\u2110",
1778    "imagpart;": "\u2111",
1779    "imath;": "\u0131",
1780    "imof;": "\u22b7",
1781    "imped;": "\u01b5",
1782    "in;": "\u2208",
1783    "incare;": "\u2105",
1784    "infin;": "\u221e",
1785    "infintie;": "\u29dd",
1786    "inodot;": "\u0131",
1787    "int;": "\u222b",
1788    "intcal;": "\u22ba",
1789    "integers;": "\u2124",
1790    "intercal;": "\u22ba",
1791    "intlarhk;": "\u2a17",
1792    "intprod;": "\u2a3c",
1793    "iocy;": "\u0451",
1794    "iogon;": "\u012f",
1795    "iopf;": "\U0001d55a",
1796    "iota;": "\u03b9",
1797    "iprod;": "\u2a3c",
1798    "iquest": "\xbf",
1799    "iquest;": "\xbf",
1800    "iscr;": "\U0001d4be",
1801    "isin;": "\u2208",
1802    "isinE;": "\u22f9",
1803    "isindot;": "\u22f5",
1804    "isins;": "\u22f4",
1805    "isinsv;": "\u22f3",
1806    "isinv;": "\u2208",
1807    "it;": "\u2062",
1808    "itilde;": "\u0129",
1809    "iukcy;": "\u0456",
1810    "iuml": "\xef",
1811    "iuml;": "\xef",
1812    "jcirc;": "\u0135",
1813    "jcy;": "\u0439",
1814    "jfr;": "\U0001d527",
1815    "jmath;": "\u0237",
1816    "jopf;": "\U0001d55b",
1817    "jscr;": "\U0001d4bf",
1818    "jsercy;": "\u0458",
1819    "jukcy;": "\u0454",
1820    "kappa;": "\u03ba",
1821    "kappav;": "\u03f0",
1822    "kcedil;": "\u0137",
1823    "kcy;": "\u043a",
1824    "kfr;": "\U0001d528",
1825    "kgreen;": "\u0138",
1826    "khcy;": "\u0445",
1827    "kjcy;": "\u045c",
1828    "kopf;": "\U0001d55c",
1829    "kscr;": "\U0001d4c0",
1830    "lAarr;": "\u21da",
1831    "lArr;": "\u21d0",
1832    "lAtail;": "\u291b",
1833    "lBarr;": "\u290e",
1834    "lE;": "\u2266",
1835    "lEg;": "\u2a8b",
1836    "lHar;": "\u2962",
1837    "lacute;": "\u013a",
1838    "laemptyv;": "\u29b4",
1839    "lagran;": "\u2112",
1840    "lambda;": "\u03bb",
1841    "lang;": "\u27e8",
1842    "langd;": "\u2991",
1843    "langle;": "\u27e8",
1844    "lap;": "\u2a85",
1845    "laquo": "\xab",
1846    "laquo;": "\xab",
1847    "larr;": "\u2190",
1848    "larrb;": "\u21e4",
1849    "larrbfs;": "\u291f",
1850    "larrfs;": "\u291d",
1851    "larrhk;": "\u21a9",
1852    "larrlp;": "\u21ab",
1853    "larrpl;": "\u2939",
1854    "larrsim;": "\u2973",
1855    "larrtl;": "\u21a2",
1856    "lat;": "\u2aab",
1857    "latail;": "\u2919",
1858    "late;": "\u2aad",
1859    "lates;": "\u2aad\ufe00",
1860    "lbarr;": "\u290c",
1861    "lbbrk;": "\u2772",
1862    "lbrace;": "{",
1863    "lbrack;": "[",
1864    "lbrke;": "\u298b",
1865    "lbrksld;": "\u298f",
1866    "lbrkslu;": "\u298d",
1867    "lcaron;": "\u013e",
1868    "lcedil;": "\u013c",
1869    "lceil;": "\u2308",
1870    "lcub;": "{",
1871    "lcy;": "\u043b",
1872    "ldca;": "\u2936",
1873    "ldquo;": "\u201c",
1874    "ldquor;": "\u201e",
1875    "ldrdhar;": "\u2967",
1876    "ldrushar;": "\u294b",
1877    "ldsh;": "\u21b2",
1878    "le;": "\u2264",
1879    "leftarrow;": "\u2190",
1880    "leftarrowtail;": "\u21a2",
1881    "leftharpoondown;": "\u21bd",
1882    "leftharpoonup;": "\u21bc",
1883    "leftleftarrows;": "\u21c7",
1884    "leftrightarrow;": "\u2194",
1885    "leftrightarrows;": "\u21c6",
1886    "leftrightharpoons;": "\u21cb",
1887    "leftrightsquigarrow;": "\u21ad",
1888    "leftthreetimes;": "\u22cb",
1889    "leg;": "\u22da",
1890    "leq;": "\u2264",
1891    "leqq;": "\u2266",
1892    "leqslant;": "\u2a7d",
1893    "les;": "\u2a7d",
1894    "lescc;": "\u2aa8",
1895    "lesdot;": "\u2a7f",
1896    "lesdoto;": "\u2a81",
1897    "lesdotor;": "\u2a83",
1898    "lesg;": "\u22da\ufe00",
1899    "lesges;": "\u2a93",
1900    "lessapprox;": "\u2a85",
1901    "lessdot;": "\u22d6",
1902    "lesseqgtr;": "\u22da",
1903    "lesseqqgtr;": "\u2a8b",
1904    "lessgtr;": "\u2276",
1905    "lesssim;": "\u2272",
1906    "lfisht;": "\u297c",
1907    "lfloor;": "\u230a",
1908    "lfr;": "\U0001d529",
1909    "lg;": "\u2276",
1910    "lgE;": "\u2a91",
1911    "lhard;": "\u21bd",
1912    "lharu;": "\u21bc",
1913    "lharul;": "\u296a",
1914    "lhblk;": "\u2584",
1915    "ljcy;": "\u0459",
1916    "ll;": "\u226a",
1917    "llarr;": "\u21c7",
1918    "llcorner;": "\u231e",
1919    "llhard;": "\u296b",
1920    "lltri;": "\u25fa",
1921    "lmidot;": "\u0140",
1922    "lmoust;": "\u23b0",
1923    "lmoustache;": "\u23b0",
1924    "lnE;": "\u2268",
1925    "lnap;": "\u2a89",
1926    "lnapprox;": "\u2a89",
1927    "lne;": "\u2a87",
1928    "lneq;": "\u2a87",
1929    "lneqq;": "\u2268",
1930    "lnsim;": "\u22e6",
1931    "loang;": "\u27ec",
1932    "loarr;": "\u21fd",
1933    "lobrk;": "\u27e6",
1934    "longleftarrow;": "\u27f5",
1935    "longleftrightarrow;": "\u27f7",
1936    "longmapsto;": "\u27fc",
1937    "longrightarrow;": "\u27f6",
1938    "looparrowleft;": "\u21ab",
1939    "looparrowright;": "\u21ac",
1940    "lopar;": "\u2985",
1941    "lopf;": "\U0001d55d",
1942    "loplus;": "\u2a2d",
1943    "lotimes;": "\u2a34",
1944    "lowast;": "\u2217",
1945    "lowbar;": "_",
1946    "loz;": "\u25ca",
1947    "lozenge;": "\u25ca",
1948    "lozf;": "\u29eb",
1949    "lpar;": "(",
1950    "lparlt;": "\u2993",
1951    "lrarr;": "\u21c6",
1952    "lrcorner;": "\u231f",
1953    "lrhar;": "\u21cb",
1954    "lrhard;": "\u296d",
1955    "lrm;": "\u200e",
1956    "lrtri;": "\u22bf",
1957    "lsaquo;": "\u2039",
1958    "lscr;": "\U0001d4c1",
1959    "lsh;": "\u21b0",
1960    "lsim;": "\u2272",
1961    "lsime;": "\u2a8d",
1962    "lsimg;": "\u2a8f",
1963    "lsqb;": "[",
1964    "lsquo;": "\u2018",
1965    "lsquor;": "\u201a",
1966    "lstrok;": "\u0142",
1967    "lt": "<",
1968    "lt;": "<",
1969    "ltcc;": "\u2aa6",
1970    "ltcir;": "\u2a79",
1971    "ltdot;": "\u22d6",
1972    "lthree;": "\u22cb",
1973    "ltimes;": "\u22c9",
1974    "ltlarr;": "\u2976",
1975    "ltquest;": "\u2a7b",
1976    "ltrPar;": "\u2996",
1977    "ltri;": "\u25c3",
1978    "ltrie;": "\u22b4",
1979    "ltrif;": "\u25c2",
1980    "lurdshar;": "\u294a",
1981    "luruhar;": "\u2966",
1982    "lvertneqq;": "\u2268\ufe00",
1983    "lvnE;": "\u2268\ufe00",
1984    "mDDot;": "\u223a",
1985    "macr": "\xaf",
1986    "macr;": "\xaf",
1987    "male;": "\u2642",
1988    "malt;": "\u2720",
1989    "maltese;": "\u2720",
1990    "map;": "\u21a6",
1991    "mapsto;": "\u21a6",
1992    "mapstodown;": "\u21a7",
1993    "mapstoleft;": "\u21a4",
1994    "mapstoup;": "\u21a5",
1995    "marker;": "\u25ae",
1996    "mcomma;": "\u2a29",
1997    "mcy;": "\u043c",
1998    "mdash;": "\u2014",
1999    "measuredangle;": "\u2221",
2000    "mfr;": "\U0001d52a",
2001    "mho;": "\u2127",
2002    "micro": "\xb5",
2003    "micro;": "\xb5",
2004    "mid;": "\u2223",
2005    "midast;": "*",
2006    "midcir;": "\u2af0",
2007    "middot": "\xb7",
2008    "middot;": "\xb7",
2009    "minus;": "\u2212",
2010    "minusb;": "\u229f",
2011    "minusd;": "\u2238",
2012    "minusdu;": "\u2a2a",
2013    "mlcp;": "\u2adb",
2014    "mldr;": "\u2026",
2015    "mnplus;": "\u2213",
2016    "models;": "\u22a7",
2017    "mopf;": "\U0001d55e",
2018    "mp;": "\u2213",
2019    "mscr;": "\U0001d4c2",
2020    "mstpos;": "\u223e",
2021    "mu;": "\u03bc",
2022    "multimap;": "\u22b8",
2023    "mumap;": "\u22b8",
2024    "nGg;": "\u22d9\u0338",
2025    "nGt;": "\u226b\u20d2",
2026    "nGtv;": "\u226b\u0338",
2027    "nLeftarrow;": "\u21cd",
2028    "nLeftrightarrow;": "\u21ce",
2029    "nLl;": "\u22d8\u0338",
2030    "nLt;": "\u226a\u20d2",
2031    "nLtv;": "\u226a\u0338",
2032    "nRightarrow;": "\u21cf",
2033    "nVDash;": "\u22af",
2034    "nVdash;": "\u22ae",
2035    "nabla;": "\u2207",
2036    "nacute;": "\u0144",
2037    "nang;": "\u2220\u20d2",
2038    "nap;": "\u2249",
2039    "napE;": "\u2a70\u0338",
2040    "napid;": "\u224b\u0338",
2041    "napos;": "\u0149",
2042    "napprox;": "\u2249",
2043    "natur;": "\u266e",
2044    "natural;": "\u266e",
2045    "naturals;": "\u2115",
2046    "nbsp": "\xa0",
2047    "nbsp;": "\xa0",
2048    "nbump;": "\u224e\u0338",
2049    "nbumpe;": "\u224f\u0338",
2050    "ncap;": "\u2a43",
2051    "ncaron;": "\u0148",
2052    "ncedil;": "\u0146",
2053    "ncong;": "\u2247",
2054    "ncongdot;": "\u2a6d\u0338",
2055    "ncup;": "\u2a42",
2056    "ncy;": "\u043d",
2057    "ndash;": "\u2013",
2058    "ne;": "\u2260",
2059    "neArr;": "\u21d7",
2060    "nearhk;": "\u2924",
2061    "nearr;": "\u2197",
2062    "nearrow;": "\u2197",
2063    "nedot;": "\u2250\u0338",
2064    "nequiv;": "\u2262",
2065    "nesear;": "\u2928",
2066    "nesim;": "\u2242\u0338",
2067    "nexist;": "\u2204",
2068    "nexists;": "\u2204",
2069    "nfr;": "\U0001d52b",
2070    "ngE;": "\u2267\u0338",
2071    "nge;": "\u2271",
2072    "ngeq;": "\u2271",
2073    "ngeqq;": "\u2267\u0338",
2074    "ngeqslant;": "\u2a7e\u0338",
2075    "nges;": "\u2a7e\u0338",
2076    "ngsim;": "\u2275",
2077    "ngt;": "\u226f",
2078    "ngtr;": "\u226f",
2079    "nhArr;": "\u21ce",
2080    "nharr;": "\u21ae",
2081    "nhpar;": "\u2af2",
2082    "ni;": "\u220b",
2083    "nis;": "\u22fc",
2084    "nisd;": "\u22fa",
2085    "niv;": "\u220b",
2086    "njcy;": "\u045a",
2087    "nlArr;": "\u21cd",
2088    "nlE;": "\u2266\u0338",
2089    "nlarr;": "\u219a",
2090    "nldr;": "\u2025",
2091    "nle;": "\u2270",
2092    "nleftarrow;": "\u219a",
2093    "nleftrightarrow;": "\u21ae",
2094    "nleq;": "\u2270",
2095    "nleqq;": "\u2266\u0338",
2096    "nleqslant;": "\u2a7d\u0338",
2097    "nles;": "\u2a7d\u0338",
2098    "nless;": "\u226e",
2099    "nlsim;": "\u2274",
2100    "nlt;": "\u226e",
2101    "nltri;": "\u22ea",
2102    "nltrie;": "\u22ec",
2103    "nmid;": "\u2224",
2104    "nopf;": "\U0001d55f",
2105    "not": "\xac",
2106    "not;": "\xac",
2107    "notin;": "\u2209",
2108    "notinE;": "\u22f9\u0338",
2109    "notindot;": "\u22f5\u0338",
2110    "notinva;": "\u2209",
2111    "notinvb;": "\u22f7",
2112    "notinvc;": "\u22f6",
2113    "notni;": "\u220c",
2114    "notniva;": "\u220c",
2115    "notnivb;": "\u22fe",
2116    "notnivc;": "\u22fd",
2117    "npar;": "\u2226",
2118    "nparallel;": "\u2226",
2119    "nparsl;": "\u2afd\u20e5",
2120    "npart;": "\u2202\u0338",
2121    "npolint;": "\u2a14",
2122    "npr;": "\u2280",
2123    "nprcue;": "\u22e0",
2124    "npre;": "\u2aaf\u0338",
2125    "nprec;": "\u2280",
2126    "npreceq;": "\u2aaf\u0338",
2127    "nrArr;": "\u21cf",
2128    "nrarr;": "\u219b",
2129    "nrarrc;": "\u2933\u0338",
2130    "nrarrw;": "\u219d\u0338",
2131    "nrightarrow;": "\u219b",
2132    "nrtri;": "\u22eb",
2133    "nrtrie;": "\u22ed",
2134    "nsc;": "\u2281",
2135    "nsccue;": "\u22e1",
2136    "nsce;": "\u2ab0\u0338",
2137    "nscr;": "\U0001d4c3",
2138    "nshortmid;": "\u2224",
2139    "nshortparallel;": "\u2226",
2140    "nsim;": "\u2241",
2141    "nsime;": "\u2244",
2142    "nsimeq;": "\u2244",
2143    "nsmid;": "\u2224",
2144    "nspar;": "\u2226",
2145    "nsqsube;": "\u22e2",
2146    "nsqsupe;": "\u22e3",
2147    "nsub;": "\u2284",
2148    "nsubE;": "\u2ac5\u0338",
2149    "nsube;": "\u2288",
2150    "nsubset;": "\u2282\u20d2",
2151    "nsubseteq;": "\u2288",
2152    "nsubseteqq;": "\u2ac5\u0338",
2153    "nsucc;": "\u2281",
2154    "nsucceq;": "\u2ab0\u0338",
2155    "nsup;": "\u2285",
2156    "nsupE;": "\u2ac6\u0338",
2157    "nsupe;": "\u2289",
2158    "nsupset;": "\u2283\u20d2",
2159    "nsupseteq;": "\u2289",
2160    "nsupseteqq;": "\u2ac6\u0338",
2161    "ntgl;": "\u2279",
2162    "ntilde": "\xf1",
2163    "ntilde;": "\xf1",
2164    "ntlg;": "\u2278",
2165    "ntriangleleft;": "\u22ea",
2166    "ntrianglelefteq;": "\u22ec",
2167    "ntriangleright;": "\u22eb",
2168    "ntrianglerighteq;": "\u22ed",
2169    "nu;": "\u03bd",
2170    "num;": "#",
2171    "numero;": "\u2116",
2172    "numsp;": "\u2007",
2173    "nvDash;": "\u22ad",
2174    "nvHarr;": "\u2904",
2175    "nvap;": "\u224d\u20d2",
2176    "nvdash;": "\u22ac",
2177    "nvge;": "\u2265\u20d2",
2178    "nvgt;": ">\u20d2",
2179    "nvinfin;": "\u29de",
2180    "nvlArr;": "\u2902",
2181    "nvle;": "\u2264\u20d2",
2182    "nvlt;": "<\u20d2",
2183    "nvltrie;": "\u22b4\u20d2",
2184    "nvrArr;": "\u2903",
2185    "nvrtrie;": "\u22b5\u20d2",
2186    "nvsim;": "\u223c\u20d2",
2187    "nwArr;": "\u21d6",
2188    "nwarhk;": "\u2923",
2189    "nwarr;": "\u2196",
2190    "nwarrow;": "\u2196",
2191    "nwnear;": "\u2927",
2192    "oS;": "\u24c8",
2193    "oacute": "\xf3",
2194    "oacute;": "\xf3",
2195    "oast;": "\u229b",
2196    "ocir;": "\u229a",
2197    "ocirc": "\xf4",
2198    "ocirc;": "\xf4",
2199    "ocy;": "\u043e",
2200    "odash;": "\u229d",
2201    "odblac;": "\u0151",
2202    "odiv;": "\u2a38",
2203    "odot;": "\u2299",
2204    "odsold;": "\u29bc",
2205    "oelig;": "\u0153",
2206    "ofcir;": "\u29bf",
2207    "ofr;": "\U0001d52c",
2208    "ogon;": "\u02db",
2209    "ograve": "\xf2",
2210    "ograve;": "\xf2",
2211    "ogt;": "\u29c1",
2212    "ohbar;": "\u29b5",
2213    "ohm;": "\u03a9",
2214    "oint;": "\u222e",
2215    "olarr;": "\u21ba",
2216    "olcir;": "\u29be",
2217    "olcross;": "\u29bb",
2218    "oline;": "\u203e",
2219    "olt;": "\u29c0",
2220    "omacr;": "\u014d",
2221    "omega;": "\u03c9",
2222    "omicron;": "\u03bf",
2223    "omid;": "\u29b6",
2224    "ominus;": "\u2296",
2225    "oopf;": "\U0001d560",
2226    "opar;": "\u29b7",
2227    "operp;": "\u29b9",
2228    "oplus;": "\u2295",
2229    "or;": "\u2228",
2230    "orarr;": "\u21bb",
2231    "ord;": "\u2a5d",
2232    "order;": "\u2134",
2233    "orderof;": "\u2134",
2234    "ordf": "\xaa",
2235    "ordf;": "\xaa",
2236    "ordm": "\xba",
2237    "ordm;": "\xba",
2238    "origof;": "\u22b6",
2239    "oror;": "\u2a56",
2240    "orslope;": "\u2a57",
2241    "orv;": "\u2a5b",
2242    "oscr;": "\u2134",
2243    "oslash": "\xf8",
2244    "oslash;": "\xf8",
2245    "osol;": "\u2298",
2246    "otilde": "\xf5",
2247    "otilde;": "\xf5",
2248    "otimes;": "\u2297",
2249    "otimesas;": "\u2a36",
2250    "ouml": "\xf6",
2251    "ouml;": "\xf6",
2252    "ovbar;": "\u233d",
2253    "par;": "\u2225",
2254    "para": "\xb6",
2255    "para;": "\xb6",
2256    "parallel;": "\u2225",
2257    "parsim;": "\u2af3",
2258    "parsl;": "\u2afd",
2259    "part;": "\u2202",
2260    "pcy;": "\u043f",
2261    "percnt;": "%",
2262    "period;": ".",
2263    "permil;": "\u2030",
2264    "perp;": "\u22a5",
2265    "pertenk;": "\u2031",
2266    "pfr;": "\U0001d52d",
2267    "phi;": "\u03c6",
2268    "phiv;": "\u03d5",
2269    "phmmat;": "\u2133",
2270    "phone;": "\u260e",
2271    "pi;": "\u03c0",
2272    "pitchfork;": "\u22d4",
2273    "piv;": "\u03d6",
2274    "planck;": "\u210f",
2275    "planckh;": "\u210e",
2276    "plankv;": "\u210f",
2277    "plus;": "+",
2278    "plusacir;": "\u2a23",
2279    "plusb;": "\u229e",
2280    "pluscir;": "\u2a22",
2281    "plusdo;": "\u2214",
2282    "plusdu;": "\u2a25",
2283    "pluse;": "\u2a72",
2284    "plusmn": "\xb1",
2285    "plusmn;": "\xb1",
2286    "plussim;": "\u2a26",
2287    "plustwo;": "\u2a27",
2288    "pm;": "\xb1",
2289    "pointint;": "\u2a15",
2290    "popf;": "\U0001d561",
2291    "pound": "\xa3",
2292    "pound;": "\xa3",
2293    "pr;": "\u227a",
2294    "prE;": "\u2ab3",
2295    "prap;": "\u2ab7",
2296    "prcue;": "\u227c",
2297    "pre;": "\u2aaf",
2298    "prec;": "\u227a",
2299    "precapprox;": "\u2ab7",
2300    "preccurlyeq;": "\u227c",
2301    "preceq;": "\u2aaf",
2302    "precnapprox;": "\u2ab9",
2303    "precneqq;": "\u2ab5",
2304    "precnsim;": "\u22e8",
2305    "precsim;": "\u227e",
2306    "prime;": "\u2032",
2307    "primes;": "\u2119",
2308    "prnE;": "\u2ab5",
2309    "prnap;": "\u2ab9",
2310    "prnsim;": "\u22e8",
2311    "prod;": "\u220f",
2312    "profalar;": "\u232e",
2313    "profline;": "\u2312",
2314    "profsurf;": "\u2313",
2315    "prop;": "\u221d",
2316    "propto;": "\u221d",
2317    "prsim;": "\u227e",
2318    "prurel;": "\u22b0",
2319    "pscr;": "\U0001d4c5",
2320    "psi;": "\u03c8",
2321    "puncsp;": "\u2008",
2322    "qfr;": "\U0001d52e",
2323    "qint;": "\u2a0c",
2324    "qopf;": "\U0001d562",
2325    "qprime;": "\u2057",
2326    "qscr;": "\U0001d4c6",
2327    "quaternions;": "\u210d",
2328    "quatint;": "\u2a16",
2329    "quest;": "?",
2330    "questeq;": "\u225f",
2331    "quot": "\"",
2332    "quot;": "\"",
2333    "rAarr;": "\u21db",
2334    "rArr;": "\u21d2",
2335    "rAtail;": "\u291c",
2336    "rBarr;": "\u290f",
2337    "rHar;": "\u2964",
2338    "race;": "\u223d\u0331",
2339    "racute;": "\u0155",
2340    "radic;": "\u221a",
2341    "raemptyv;": "\u29b3",
2342    "rang;": "\u27e9",
2343    "rangd;": "\u2992",
2344    "range;": "\u29a5",
2345    "rangle;": "\u27e9",
2346    "raquo": "\xbb",
2347    "raquo;": "\xbb",
2348    "rarr;": "\u2192",
2349    "rarrap;": "\u2975",
2350    "rarrb;": "\u21e5",
2351    "rarrbfs;": "\u2920",
2352    "rarrc;": "\u2933",
2353    "rarrfs;": "\u291e",
2354    "rarrhk;": "\u21aa",
2355    "rarrlp;": "\u21ac",
2356    "rarrpl;": "\u2945",
2357    "rarrsim;": "\u2974",
2358    "rarrtl;": "\u21a3",
2359    "rarrw;": "\u219d",
2360    "ratail;": "\u291a",
2361    "ratio;": "\u2236",
2362    "rationals;": "\u211a",
2363    "rbarr;": "\u290d",
2364    "rbbrk;": "\u2773",
2365    "rbrace;": "}",
2366    "rbrack;": "]",
2367    "rbrke;": "\u298c",
2368    "rbrksld;": "\u298e",
2369    "rbrkslu;": "\u2990",
2370    "rcaron;": "\u0159",
2371    "rcedil;": "\u0157",
2372    "rceil;": "\u2309",
2373    "rcub;": "}",
2374    "rcy;": "\u0440",
2375    "rdca;": "\u2937",
2376    "rdldhar;": "\u2969",
2377    "rdquo;": "\u201d",
2378    "rdquor;": "\u201d",
2379    "rdsh;": "\u21b3",
2380    "real;": "\u211c",
2381    "realine;": "\u211b",
2382    "realpart;": "\u211c",
2383    "reals;": "\u211d",
2384    "rect;": "\u25ad",
2385    "reg": "\xae",
2386    "reg;": "\xae",
2387    "rfisht;": "\u297d",
2388    "rfloor;": "\u230b",
2389    "rfr;": "\U0001d52f",
2390    "rhard;": "\u21c1",
2391    "rharu;": "\u21c0",
2392    "rharul;": "\u296c",
2393    "rho;": "\u03c1",
2394    "rhov;": "\u03f1",
2395    "rightarrow;": "\u2192",
2396    "rightarrowtail;": "\u21a3",
2397    "rightharpoondown;": "\u21c1",
2398    "rightharpoonup;": "\u21c0",
2399    "rightleftarrows;": "\u21c4",
2400    "rightleftharpoons;": "\u21cc",
2401    "rightrightarrows;": "\u21c9",
2402    "rightsquigarrow;": "\u219d",
2403    "rightthreetimes;": "\u22cc",
2404    "ring;": "\u02da",
2405    "risingdotseq;": "\u2253",
2406    "rlarr;": "\u21c4",
2407    "rlhar;": "\u21cc",
2408    "rlm;": "\u200f",
2409    "rmoust;": "\u23b1",
2410    "rmoustache;": "\u23b1",
2411    "rnmid;": "\u2aee",
2412    "roang;": "\u27ed",
2413    "roarr;": "\u21fe",
2414    "robrk;": "\u27e7",
2415    "ropar;": "\u2986",
2416    "ropf;": "\U0001d563",
2417    "roplus;": "\u2a2e",
2418    "rotimes;": "\u2a35",
2419    "rpar;": ")",
2420    "rpargt;": "\u2994",
2421    "rppolint;": "\u2a12",
2422    "rrarr;": "\u21c9",
2423    "rsaquo;": "\u203a",
2424    "rscr;": "\U0001d4c7",
2425    "rsh;": "\u21b1",
2426    "rsqb;": "]",
2427    "rsquo;": "\u2019",
2428    "rsquor;": "\u2019",
2429    "rthree;": "\u22cc",
2430    "rtimes;": "\u22ca",
2431    "rtri;": "\u25b9",
2432    "rtrie;": "\u22b5",
2433    "rtrif;": "\u25b8",
2434    "rtriltri;": "\u29ce",
2435    "ruluhar;": "\u2968",
2436    "rx;": "\u211e",
2437    "sacute;": "\u015b",
2438    "sbquo;": "\u201a",
2439    "sc;": "\u227b",
2440    "scE;": "\u2ab4",
2441    "scap;": "\u2ab8",
2442    "scaron;": "\u0161",
2443    "sccue;": "\u227d",
2444    "sce;": "\u2ab0",
2445    "scedil;": "\u015f",
2446    "scirc;": "\u015d",
2447    "scnE;": "\u2ab6",
2448    "scnap;": "\u2aba",
2449    "scnsim;": "\u22e9",
2450    "scpolint;": "\u2a13",
2451    "scsim;": "\u227f",
2452    "scy;": "\u0441",
2453    "sdot;": "\u22c5",
2454    "sdotb;": "\u22a1",
2455    "sdote;": "\u2a66",
2456    "seArr;": "\u21d8",
2457    "searhk;": "\u2925",
2458    "searr;": "\u2198",
2459    "searrow;": "\u2198",
2460    "sect": "\xa7",
2461    "sect;": "\xa7",
2462    "semi;": ";",
2463    "seswar;": "\u2929",
2464    "setminus;": "\u2216",
2465    "setmn;": "\u2216",
2466    "sext;": "\u2736",
2467    "sfr;": "\U0001d530",
2468    "sfrown;": "\u2322",
2469    "sharp;": "\u266f",
2470    "shchcy;": "\u0449",
2471    "shcy;": "\u0448",
2472    "shortmid;": "\u2223",
2473    "shortparallel;": "\u2225",
2474    "shy": "\xad",
2475    "shy;": "\xad",
2476    "sigma;": "\u03c3",
2477    "sigmaf;": "\u03c2",
2478    "sigmav;": "\u03c2",
2479    "sim;": "\u223c",
2480    "simdot;": "\u2a6a",
2481    "sime;": "\u2243",
2482    "simeq;": "\u2243",
2483    "simg;": "\u2a9e",
2484    "simgE;": "\u2aa0",
2485    "siml;": "\u2a9d",
2486    "simlE;": "\u2a9f",
2487    "simne;": "\u2246",
2488    "simplus;": "\u2a24",
2489    "simrarr;": "\u2972",
2490    "slarr;": "\u2190",
2491    "smallsetminus;": "\u2216",
2492    "smashp;": "\u2a33",
2493    "smeparsl;": "\u29e4",
2494    "smid;": "\u2223",
2495    "smile;": "\u2323",
2496    "smt;": "\u2aaa",
2497    "smte;": "\u2aac",
2498    "smtes;": "\u2aac\ufe00",
2499    "softcy;": "\u044c",
2500    "sol;": "/",
2501    "solb;": "\u29c4",
2502    "solbar;": "\u233f",
2503    "sopf;": "\U0001d564",
2504    "spades;": "\u2660",
2505    "spadesuit;": "\u2660",
2506    "spar;": "\u2225",
2507    "sqcap;": "\u2293",
2508    "sqcaps;": "\u2293\ufe00",
2509    "sqcup;": "\u2294",
2510    "sqcups;": "\u2294\ufe00",
2511    "sqsub;": "\u228f",
2512    "sqsube;": "\u2291",
2513    "sqsubset;": "\u228f",
2514    "sqsubseteq;": "\u2291",
2515    "sqsup;": "\u2290",
2516    "sqsupe;": "\u2292",
2517    "sqsupset;": "\u2290",
2518    "sqsupseteq;": "\u2292",
2519    "squ;": "\u25a1",
2520    "square;": "\u25a1",
2521    "squarf;": "\u25aa",
2522    "squf;": "\u25aa",
2523    "srarr;": "\u2192",
2524    "sscr;": "\U0001d4c8",
2525    "ssetmn;": "\u2216",
2526    "ssmile;": "\u2323",
2527    "sstarf;": "\u22c6",
2528    "star;": "\u2606",
2529    "starf;": "\u2605",
2530    "straightepsilon;": "\u03f5",
2531    "straightphi;": "\u03d5",
2532    "strns;": "\xaf",
2533    "sub;": "\u2282",
2534    "subE;": "\u2ac5",
2535    "subdot;": "\u2abd",
2536    "sube;": "\u2286",
2537    "subedot;": "\u2ac3",
2538    "submult;": "\u2ac1",
2539    "subnE;": "\u2acb",
2540    "subne;": "\u228a",
2541    "subplus;": "\u2abf",
2542    "subrarr;": "\u2979",
2543    "subset;": "\u2282",
2544    "subseteq;": "\u2286",
2545    "subseteqq;": "\u2ac5",
2546    "subsetneq;": "\u228a",
2547    "subsetneqq;": "\u2acb",
2548    "subsim;": "\u2ac7",
2549    "subsub;": "\u2ad5",
2550    "subsup;": "\u2ad3",
2551    "succ;": "\u227b",
2552    "succapprox;": "\u2ab8",
2553    "succcurlyeq;": "\u227d",
2554    "succeq;": "\u2ab0",
2555    "succnapprox;": "\u2aba",
2556    "succneqq;": "\u2ab6",
2557    "succnsim;": "\u22e9",
2558    "succsim;": "\u227f",
2559    "sum;": "\u2211",
2560    "sung;": "\u266a",
2561    "sup1": "\xb9",
2562    "sup1;": "\xb9",
2563    "sup2": "\xb2",
2564    "sup2;": "\xb2",
2565    "sup3": "\xb3",
2566    "sup3;": "\xb3",
2567    "sup;": "\u2283",
2568    "supE;": "\u2ac6",
2569    "supdot;": "\u2abe",
2570    "supdsub;": "\u2ad8",
2571    "supe;": "\u2287",
2572    "supedot;": "\u2ac4",
2573    "suphsol;": "\u27c9",
2574    "suphsub;": "\u2ad7",
2575    "suplarr;": "\u297b",
2576    "supmult;": "\u2ac2",
2577    "supnE;": "\u2acc",
2578    "supne;": "\u228b",
2579    "supplus;": "\u2ac0",
2580    "supset;": "\u2283",
2581    "supseteq;": "\u2287",
2582    "supseteqq;": "\u2ac6",
2583    "supsetneq;": "\u228b",
2584    "supsetneqq;": "\u2acc",
2585    "supsim;": "\u2ac8",
2586    "supsub;": "\u2ad4",
2587    "supsup;": "\u2ad6",
2588    "swArr;": "\u21d9",
2589    "swarhk;": "\u2926",
2590    "swarr;": "\u2199",
2591    "swarrow;": "\u2199",
2592    "swnwar;": "\u292a",
2593    "szlig": "\xdf",
2594    "szlig;": "\xdf",
2595    "target;": "\u2316",
2596    "tau;": "\u03c4",
2597    "tbrk;": "\u23b4",
2598    "tcaron;": "\u0165",
2599    "tcedil;": "\u0163",
2600    "tcy;": "\u0442",
2601    "tdot;": "\u20db",
2602    "telrec;": "\u2315",
2603    "tfr;": "\U0001d531",
2604    "there4;": "\u2234",
2605    "therefore;": "\u2234",
2606    "theta;": "\u03b8",
2607    "thetasym;": "\u03d1",
2608    "thetav;": "\u03d1",
2609    "thickapprox;": "\u2248",
2610    "thicksim;": "\u223c",
2611    "thinsp;": "\u2009",
2612    "thkap;": "\u2248",
2613    "thksim;": "\u223c",
2614    "thorn": "\xfe",
2615    "thorn;": "\xfe",
2616    "tilde;": "\u02dc",
2617    "times": "\xd7",
2618    "times;": "\xd7",
2619    "timesb;": "\u22a0",
2620    "timesbar;": "\u2a31",
2621    "timesd;": "\u2a30",
2622    "tint;": "\u222d",
2623    "toea;": "\u2928",
2624    "top;": "\u22a4",
2625    "topbot;": "\u2336",
2626    "topcir;": "\u2af1",
2627    "topf;": "\U0001d565",
2628    "topfork;": "\u2ada",
2629    "tosa;": "\u2929",
2630    "tprime;": "\u2034",
2631    "trade;": "\u2122",
2632    "triangle;": "\u25b5",
2633    "triangledown;": "\u25bf",
2634    "triangleleft;": "\u25c3",
2635    "trianglelefteq;": "\u22b4",
2636    "triangleq;": "\u225c",
2637    "triangleright;": "\u25b9",
2638    "trianglerighteq;": "\u22b5",
2639    "tridot;": "\u25ec",
2640    "trie;": "\u225c",
2641    "triminus;": "\u2a3a",
2642    "triplus;": "\u2a39",
2643    "trisb;": "\u29cd",
2644    "tritime;": "\u2a3b",
2645    "trpezium;": "\u23e2",
2646    "tscr;": "\U0001d4c9",
2647    "tscy;": "\u0446",
2648    "tshcy;": "\u045b",
2649    "tstrok;": "\u0167",
2650    "twixt;": "\u226c",
2651    "twoheadleftarrow;": "\u219e",
2652    "twoheadrightarrow;": "\u21a0",
2653    "uArr;": "\u21d1",
2654    "uHar;": "\u2963",
2655    "uacute": "\xfa",
2656    "uacute;": "\xfa",
2657    "uarr;": "\u2191",
2658    "ubrcy;": "\u045e",
2659    "ubreve;": "\u016d",
2660    "ucirc": "\xfb",
2661    "ucirc;": "\xfb",
2662    "ucy;": "\u0443",
2663    "udarr;": "\u21c5",
2664    "udblac;": "\u0171",
2665    "udhar;": "\u296e",
2666    "ufisht;": "\u297e",
2667    "ufr;": "\U0001d532",
2668    "ugrave": "\xf9",
2669    "ugrave;": "\xf9",
2670    "uharl;": "\u21bf",
2671    "uharr;": "\u21be",
2672    "uhblk;": "\u2580",
2673    "ulcorn;": "\u231c",
2674    "ulcorner;": "\u231c",
2675    "ulcrop;": "\u230f",
2676    "ultri;": "\u25f8",
2677    "umacr;": "\u016b",
2678    "uml": "\xa8",
2679    "uml;": "\xa8",
2680    "uogon;": "\u0173",
2681    "uopf;": "\U0001d566",
2682    "uparrow;": "\u2191",
2683    "updownarrow;": "\u2195",
2684    "upharpoonleft;": "\u21bf",
2685    "upharpoonright;": "\u21be",
2686    "uplus;": "\u228e",
2687    "upsi;": "\u03c5",
2688    "upsih;": "\u03d2",
2689    "upsilon;": "\u03c5",
2690    "upuparrows;": "\u21c8",
2691    "urcorn;": "\u231d",
2692    "urcorner;": "\u231d",
2693    "urcrop;": "\u230e",
2694    "uring;": "\u016f",
2695    "urtri;": "\u25f9",
2696    "uscr;": "\U0001d4ca",
2697    "utdot;": "\u22f0",
2698    "utilde;": "\u0169",
2699    "utri;": "\u25b5",
2700    "utrif;": "\u25b4",
2701    "uuarr;": "\u21c8",
2702    "uuml": "\xfc",
2703    "uuml;": "\xfc",
2704    "uwangle;": "\u29a7",
2705    "vArr;": "\u21d5",
2706    "vBar;": "\u2ae8",
2707    "vBarv;": "\u2ae9",
2708    "vDash;": "\u22a8",
2709    "vangrt;": "\u299c",
2710    "varepsilon;": "\u03f5",
2711    "varkappa;": "\u03f0",
2712    "varnothing;": "\u2205",
2713    "varphi;": "\u03d5",
2714    "varpi;": "\u03d6",
2715    "varpropto;": "\u221d",
2716    "varr;": "\u2195",
2717    "varrho;": "\u03f1",
2718    "varsigma;": "\u03c2",
2719    "varsubsetneq;": "\u228a\ufe00",
2720    "varsubsetneqq;": "\u2acb\ufe00",
2721    "varsupsetneq;": "\u228b\ufe00",
2722    "varsupsetneqq;": "\u2acc\ufe00",
2723    "vartheta;": "\u03d1",
2724    "vartriangleleft;": "\u22b2",
2725    "vartriangleright;": "\u22b3",
2726    "vcy;": "\u0432",
2727    "vdash;": "\u22a2",
2728    "vee;": "\u2228",
2729    "veebar;": "\u22bb",
2730    "veeeq;": "\u225a",
2731    "vellip;": "\u22ee",
2732    "verbar;": "|",
2733    "vert;": "|",
2734    "vfr;": "\U0001d533",
2735    "vltri;": "\u22b2",
2736    "vnsub;": "\u2282\u20d2",
2737    "vnsup;": "\u2283\u20d2",
2738    "vopf;": "\U0001d567",
2739    "vprop;": "\u221d",
2740    "vrtri;": "\u22b3",
2741    "vscr;": "\U0001d4cb",
2742    "vsubnE;": "\u2acb\ufe00",
2743    "vsubne;": "\u228a\ufe00",
2744    "vsupnE;": "\u2acc\ufe00",
2745    "vsupne;": "\u228b\ufe00",
2746    "vzigzag;": "\u299a",
2747    "wcirc;": "\u0175",
2748    "wedbar;": "\u2a5f",
2749    "wedge;": "\u2227",
2750    "wedgeq;": "\u2259",
2751    "weierp;": "\u2118",
2752    "wfr;": "\U0001d534",
2753    "wopf;": "\U0001d568",
2754    "wp;": "\u2118",
2755    "wr;": "\u2240",
2756    "wreath;": "\u2240",
2757    "wscr;": "\U0001d4cc",
2758    "xcap;": "\u22c2",
2759    "xcirc;": "\u25ef",
2760    "xcup;": "\u22c3",
2761    "xdtri;": "\u25bd",
2762    "xfr;": "\U0001d535",
2763    "xhArr;": "\u27fa",
2764    "xharr;": "\u27f7",
2765    "xi;": "\u03be",
2766    "xlArr;": "\u27f8",
2767    "xlarr;": "\u27f5",
2768    "xmap;": "\u27fc",
2769    "xnis;": "\u22fb",
2770    "xodot;": "\u2a00",
2771    "xopf;": "\U0001d569",
2772    "xoplus;": "\u2a01",
2773    "xotime;": "\u2a02",
2774    "xrArr;": "\u27f9",
2775    "xrarr;": "\u27f6",
2776    "xscr;": "\U0001d4cd",
2777    "xsqcup;": "\u2a06",
2778    "xuplus;": "\u2a04",
2779    "xutri;": "\u25b3",
2780    "xvee;": "\u22c1",
2781    "xwedge;": "\u22c0",
2782    "yacute": "\xfd",
2783    "yacute;": "\xfd",
2784    "yacy;": "\u044f",
2785    "ycirc;": "\u0177",
2786    "ycy;": "\u044b",
2787    "yen": "\xa5",
2788    "yen;": "\xa5",
2789    "yfr;": "\U0001d536",
2790    "yicy;": "\u0457",
2791    "yopf;": "\U0001d56a",
2792    "yscr;": "\U0001d4ce",
2793    "yucy;": "\u044e",
2794    "yuml": "\xff",
2795    "yuml;": "\xff",
2796    "zacute;": "\u017a",
2797    "zcaron;": "\u017e",
2798    "zcy;": "\u0437",
2799    "zdot;": "\u017c",
2800    "zeetrf;": "\u2128",
2801    "zeta;": "\u03b6",
2802    "zfr;": "\U0001d537",
2803    "zhcy;": "\u0436",
2804    "zigrarr;": "\u21dd",
2805    "zopf;": "\U0001d56b",
2806    "zscr;": "\U0001d4cf",
2807    "zwj;": "\u200d",
2808    "zwnj;": "\u200c",
2809}
2810
2811replacementCharacters = {
2812    0x0: "\uFFFD",
2813    0x0d: "\u000D",
2814    0x80: "\u20AC",
2815    0x81: "\u0081",
2816    0x81: "\u0081",
2817    0x82: "\u201A",
2818    0x83: "\u0192",
2819    0x84: "\u201E",
2820    0x85: "\u2026",
2821    0x86: "\u2020",
2822    0x87: "\u2021",
2823    0x88: "\u02C6",
2824    0x89: "\u2030",
2825    0x8A: "\u0160",
2826    0x8B: "\u2039",
2827    0x8C: "\u0152",
2828    0x8D: "\u008D",
2829    0x8E: "\u017D",
2830    0x8F: "\u008F",
2831    0x90: "\u0090",
2832    0x91: "\u2018",
2833    0x92: "\u2019",
2834    0x93: "\u201C",
2835    0x94: "\u201D",
2836    0x95: "\u2022",
2837    0x96: "\u2013",
2838    0x97: "\u2014",
2839    0x98: "\u02DC",
2840    0x99: "\u2122",
2841    0x9A: "\u0161",
2842    0x9B: "\u203A",
2843    0x9C: "\u0153",
2844    0x9D: "\u009D",
2845    0x9E: "\u017E",
2846    0x9F: "\u0178",
2847}
2848
2849encodings = {
2850    '437': 'cp437',
2851    '850': 'cp850',
2852    '852': 'cp852',
2853    '855': 'cp855',
2854    '857': 'cp857',
2855    '860': 'cp860',
2856    '861': 'cp861',
2857    '862': 'cp862',
2858    '863': 'cp863',
2859    '865': 'cp865',
2860    '866': 'cp866',
2861    '869': 'cp869',
2862    'ansix341968': 'ascii',
2863    'ansix341986': 'ascii',
2864    'arabic': 'iso8859-6',
2865    'ascii': 'ascii',
2866    'asmo708': 'iso8859-6',
2867    'big5': 'big5',
2868    'big5hkscs': 'big5hkscs',
2869    'chinese': 'gbk',
2870    'cp037': 'cp037',
2871    'cp1026': 'cp1026',
2872    'cp154': 'ptcp154',
2873    'cp367': 'ascii',
2874    'cp424': 'cp424',
2875    'cp437': 'cp437',
2876    'cp500': 'cp500',
2877    'cp775': 'cp775',
2878    'cp819': 'windows-1252',
2879    'cp850': 'cp850',
2880    'cp852': 'cp852',
2881    'cp855': 'cp855',
2882    'cp857': 'cp857',
2883    'cp860': 'cp860',
2884    'cp861': 'cp861',
2885    'cp862': 'cp862',
2886    'cp863': 'cp863',
2887    'cp864': 'cp864',
2888    'cp865': 'cp865',
2889    'cp866': 'cp866',
2890    'cp869': 'cp869',
2891    'cp936': 'gbk',
2892    'cpgr': 'cp869',
2893    'cpis': 'cp861',
2894    'csascii': 'ascii',
2895    'csbig5': 'big5',
2896    'cseuckr': 'cp949',
2897    'cseucpkdfmtjapanese': 'euc_jp',
2898    'csgb2312': 'gbk',
2899    'cshproman8': 'hp-roman8',
2900    'csibm037': 'cp037',
2901    'csibm1026': 'cp1026',
2902    'csibm424': 'cp424',
2903    'csibm500': 'cp500',
2904    'csibm855': 'cp855',
2905    'csibm857': 'cp857',
2906    'csibm860': 'cp860',
2907    'csibm861': 'cp861',
2908    'csibm863': 'cp863',
2909    'csibm864': 'cp864',
2910    'csibm865': 'cp865',
2911    'csibm866': 'cp866',
2912    'csibm869': 'cp869',
2913    'csiso2022jp': 'iso2022_jp',
2914    'csiso2022jp2': 'iso2022_jp_2',
2915    'csiso2022kr': 'iso2022_kr',
2916    'csiso58gb231280': 'gbk',
2917    'csisolatin1': 'windows-1252',
2918    'csisolatin2': 'iso8859-2',
2919    'csisolatin3': 'iso8859-3',
2920    'csisolatin4': 'iso8859-4',
2921    'csisolatin5': 'windows-1254',
2922    'csisolatin6': 'iso8859-10',
2923    'csisolatinarabic': 'iso8859-6',
2924    'csisolatincyrillic': 'iso8859-5',
2925    'csisolatingreek': 'iso8859-7',
2926    'csisolatinhebrew': 'iso8859-8',
2927    'cskoi8r': 'koi8-r',
2928    'csksc56011987': 'cp949',
2929    'cspc775baltic': 'cp775',
2930    'cspc850multilingual': 'cp850',
2931    'cspc862latinhebrew': 'cp862',
2932    'cspc8codepage437': 'cp437',
2933    'cspcp852': 'cp852',
2934    'csptcp154': 'ptcp154',
2935    'csshiftjis': 'shift_jis',
2936    'csunicode11utf7': 'utf-7',
2937    'cyrillic': 'iso8859-5',
2938    'cyrillicasian': 'ptcp154',
2939    'ebcdiccpbe': 'cp500',
2940    'ebcdiccpca': 'cp037',
2941    'ebcdiccpch': 'cp500',
2942    'ebcdiccphe': 'cp424',
2943    'ebcdiccpnl': 'cp037',
2944    'ebcdiccpus': 'cp037',
2945    'ebcdiccpwt': 'cp037',
2946    'ecma114': 'iso8859-6',
2947    'ecma118': 'iso8859-7',
2948    'elot928': 'iso8859-7',
2949    'eucjp': 'euc_jp',
2950    'euckr': 'cp949',
2951    'extendedunixcodepackedformatforjapanese': 'euc_jp',
2952    'gb18030': 'gb18030',
2953    'gb2312': 'gbk',
2954    'gb231280': 'gbk',
2955    'gbk': 'gbk',
2956    'greek': 'iso8859-7',
2957    'greek8': 'iso8859-7',
2958    'hebrew': 'iso8859-8',
2959    'hproman8': 'hp-roman8',
2960    'hzgb2312': 'hz',
2961    'ibm037': 'cp037',
2962    'ibm1026': 'cp1026',
2963    'ibm367': 'ascii',
2964    'ibm424': 'cp424',
2965    'ibm437': 'cp437',
2966    'ibm500': 'cp500',
2967    'ibm775': 'cp775',
2968    'ibm819': 'windows-1252',
2969    'ibm850': 'cp850',
2970    'ibm852': 'cp852',
2971    'ibm855': 'cp855',
2972    'ibm857': 'cp857',
2973    'ibm860': 'cp860',
2974    'ibm861': 'cp861',
2975    'ibm862': 'cp862',
2976    'ibm863': 'cp863',
2977    'ibm864': 'cp864',
2978    'ibm865': 'cp865',
2979    'ibm866': 'cp866',
2980    'ibm869': 'cp869',
2981    'iso2022jp': 'iso2022_jp',
2982    'iso2022jp2': 'iso2022_jp_2',
2983    'iso2022kr': 'iso2022_kr',
2984    'iso646irv1991': 'ascii',
2985    'iso646us': 'ascii',
2986    'iso88591': 'windows-1252',
2987    'iso885910': 'iso8859-10',
2988    'iso8859101992': 'iso8859-10',
2989    'iso885911987': 'windows-1252',
2990    'iso885913': 'iso8859-13',
2991    'iso885914': 'iso8859-14',
2992    'iso8859141998': 'iso8859-14',
2993    'iso885915': 'iso8859-15',
2994    'iso885916': 'iso8859-16',
2995    'iso8859162001': 'iso8859-16',
2996    'iso88592': 'iso8859-2',
2997    'iso885921987': 'iso8859-2',
2998    'iso88593': 'iso8859-3',
2999    'iso885931988': 'iso8859-3',
3000    'iso88594': 'iso8859-4',
3001    'iso885941988': 'iso8859-4',
3002    'iso88595': 'iso8859-5',
3003    'iso885951988': 'iso8859-5',
3004    'iso88596': 'iso8859-6',
3005    'iso885961987': 'iso8859-6',
3006    'iso88597': 'iso8859-7',
3007    'iso885971987': 'iso8859-7',
3008    'iso88598': 'iso8859-8',
3009    'iso885981988': 'iso8859-8',
3010    'iso88599': 'windows-1254',
3011    'iso885991989': 'windows-1254',
3012    'isoceltic': 'iso8859-14',
3013    'isoir100': 'windows-1252',
3014    'isoir101': 'iso8859-2',
3015    'isoir109': 'iso8859-3',
3016    'isoir110': 'iso8859-4',
3017    'isoir126': 'iso8859-7',
3018    'isoir127': 'iso8859-6',
3019    'isoir138': 'iso8859-8',
3020    'isoir144': 'iso8859-5',
3021    'isoir148': 'windows-1254',
3022    'isoir149': 'cp949',
3023    'isoir157': 'iso8859-10',
3024    'isoir199': 'iso8859-14',
3025    'isoir226': 'iso8859-16',
3026    'isoir58': 'gbk',
3027    'isoir6': 'ascii',
3028    'koi8r': 'koi8-r',
3029    'koi8u': 'koi8-u',
3030    'korean': 'cp949',
3031    'ksc5601': 'cp949',
3032    'ksc56011987': 'cp949',
3033    'ksc56011989': 'cp949',
3034    'l1': 'windows-1252',
3035    'l10': 'iso8859-16',
3036    'l2': 'iso8859-2',
3037    'l3': 'iso8859-3',
3038    'l4': 'iso8859-4',
3039    'l5': 'windows-1254',
3040    'l6': 'iso8859-10',
3041    'l8': 'iso8859-14',
3042    'latin1': 'windows-1252',
3043    'latin10': 'iso8859-16',
3044    'latin2': 'iso8859-2',
3045    'latin3': 'iso8859-3',
3046    'latin4': 'iso8859-4',
3047    'latin5': 'windows-1254',
3048    'latin6': 'iso8859-10',
3049    'latin8': 'iso8859-14',
3050    'latin9': 'iso8859-15',
3051    'ms936': 'gbk',
3052    'mskanji': 'shift_jis',
3053    'pt154': 'ptcp154',
3054    'ptcp154': 'ptcp154',
3055    'r8': 'hp-roman8',
3056    'roman8': 'hp-roman8',
3057    'shiftjis': 'shift_jis',
3058    'tis620': 'cp874',
3059    'unicode11utf7': 'utf-7',
3060    'us': 'ascii',
3061    'usascii': 'ascii',
3062    'utf16': 'utf-16',
3063    'utf16be': 'utf-16-be',
3064    'utf16le': 'utf-16-le',
3065    'utf8': 'utf-8',
3066    'windows1250': 'cp1250',
3067    'windows1251': 'cp1251',
3068    'windows1252': 'cp1252',
3069    'windows1253': 'cp1253',
3070    'windows1254': 'cp1254',
3071    'windows1255': 'cp1255',
3072    'windows1256': 'cp1256',
3073    'windows1257': 'cp1257',
3074    'windows1258': 'cp1258',
3075    'windows936': 'gbk',
3076    'x-x-big5': 'big5'}
3077
3078tokenTypes = {
3079    "Doctype": 0,
3080    "Characters": 1,
3081    "SpaceCharacters": 2,
3082    "StartTag": 3,
3083    "EndTag": 4,
3084    "EmptyTag": 5,
3085    "Comment": 6,
3086    "ParseError": 7
3087}
3088
3089tagTokenTypes = frozenset([tokenTypes["StartTag"], tokenTypes["EndTag"],
3090                           tokenTypes["EmptyTag"]])
3091
3092
3093prefixes = dict([(v, k) for k, v in namespaces.items()])
3094prefixes["http://www.w3.org/1998/Math/MathML"] = "math"
3095
3096
3097class DataLossWarning(UserWarning):
3098    pass
3099
3100
3101class ReparseException(Exception):
3102    pass
3103