summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG14
-rw-r--r--README.md23
-rw-r--r--bs4/__init__.py46
-rw-r--r--bs4/builder/__init__.py6
-rw-r--r--bs4/builder/_html5lib.py20
-rw-r--r--bs4/builder/_htmlparser.py18
-rw-r--r--bs4/builder/_lxml.py26
-rw-r--r--bs4/dammit.py4488
-rw-r--r--bs4/diagnose.py52
-rw-r--r--bs4/element.py110
-rw-r--r--bs4/formatter.py4
-rw-r--r--bs4/testing.py56
-rw-r--r--bs4/tests/test_dammit.py58
-rw-r--r--bs4/tests/test_formatter.py20
-rw-r--r--bs4/tests/test_html5lib.py44
-rw-r--r--bs4/tests/test_htmlparser.py48
-rw-r--r--bs4/tests/test_lxml.py4
-rw-r--r--bs4/tests/test_navigablestring.py2
-rw-r--r--bs4/tests/test_soup.py50
-rw-r--r--bs4/tests/test_tree.py130
-rwxr-xr-xconvert-py3k16
-rw-r--r--doc/source/index.rst73
-rw-r--r--setup.py13
-rwxr-xr-xtest-all-versions2
24 files changed, 2631 insertions, 2692 deletions
diff --git a/CHANGELOG b/CHANGELOG
index e55cb79..596f4da 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,8 +1,14 @@
-= 4.10.0 (unreleased)
-
Beautiful Soup's official support for Python 2 ended on December 31st,
-2020. This release supports both Python 2 and Python 3, but there's no
-guarantee that this will hold for the next release.
+2020. The final release to support Python 2 was Beautiful Soup
+4.9.3. In the Launchpad Bazaar repository, the final revision to support
+Python 2 was revision 605.
+
+= 4.10.0 (20210907)
+
+* This is the first release of Beautiful Soup to only support Python
+ 3. I dropped Python 2 support to maintain support for newer versions
+ (58 and up) of setuptools. See:
+ https://github.com/pypa/setuptools/issues/2769 [bug=1942919]
* The behavior of methods like .get_text() and .strings now differs
depending on the type of tag. The change is visible with HTML tags
diff --git a/README.md b/README.md
index 92dd339..884f9eb 100644
--- a/README.md
+++ b/README.md
@@ -53,17 +53,11 @@ To go beyond the basics, [comprehensive documentation is available](http://www.c
# Note on Python 2 sunsetting
-Since 2012, Beautiful Soup has been developed as a Python 2 library
-which is automatically converted to Python 3 code as necessary. This
-makes it impossible to take advantage of some features of Python
-3.
-
-For this reason, I plan to discontinue Beautiful Soup's Python 2
-support at some point after December 31, 2020: one year after the
-sunset date for Python 2 itself. Beyond that point, new Beautiful Soup
-development will exclusively target Python 3. Of course, older
-releases of Beautiful Soup, which support both versions, will continue
-to be available.
+Beautiful Soup's support for Python 2 was discontinued on December 31,
+2020: one year after the sunset date for Python 2 itself. From this
+point onward, new Beautiful Soup development will exclusively target
+Python 3. The final release of Beautiful Soup 4 to support Python 2
+was 4.9.3.
# Supporting the project
@@ -93,10 +87,5 @@ $ nosetests
```
```
-$ python -m unittest discover -s bs4
+$ python3 -m unittest discover -s bs4
```
-
-If you checked out the source tree, you should see a script in the
-home directory called test-all-versions. This script will run the unit
-tests under Python 2, then create a temporary Python 3 conversion of
-the source and run the unit tests again under Python 3.
diff --git a/bs4/__init__.py b/bs4/__init__.py
index 7c6044a..2a436d3 100644
--- a/bs4/__init__.py
+++ b/bs4/__init__.py
@@ -7,7 +7,7 @@ Beautiful Soup uses a pluggable XML or HTML parser to parse a
provides methods and Pythonic idioms that make it easy to navigate,
search, and modify the parse tree.
-Beautiful Soup works with Python 2.7 and up. It works better if lxml
+Beautiful Soup works with Python 3.5 and up. It works better if lxml
and/or html5lib is installed.
For more than you ever wanted to know about Beautiful Soup, see the
@@ -15,13 +15,14 @@ documentation: http://www.crummy.com/software/BeautifulSoup/bs4/doc/
"""
__author__ = "Leonard Richardson (leonardr@segfault.org)"
-__version__ = "4.9.3"
-__copyright__ = "Copyright (c) 2004-2020 Leonard Richardson"
+__version__ = "4.10.0"
+__copyright__ = "Copyright (c) 2004-2021 Leonard Richardson"
# Use of this source code is governed by the MIT license.
__license__ = "MIT"
__all__ = ['BeautifulSoup']
+
from collections import Counter
import os
import re
@@ -29,6 +30,11 @@ import sys
import traceback
import warnings
+# The very first thing we do is give a useful error if someone is
+# running this code under Python 2.
+if sys.version_info.major < 3:
+ raise ImportError('You are trying to use a Python 3-specific version of Beautiful Soup under Python 2. This will not work. The final version of Beautiful Soup to support Python 2 was 4.9.3.')
+
from .builder import builder_registry, ParserRejectedMarkup
from .dammit import UnicodeDammit
from .element import (
@@ -49,10 +55,6 @@ from .element import (
TemplateString,
)
-# The very first thing we do is give a useful error if someone is
-# running this code under Python 3 without converting it.
-'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.'<>'You need to convert the code, either by installing it (`python setup.py install`) or by running 2to3 (`2to3 -w bs4`).'
-
# Define some custom warnings.
class GuessedAtParserWarning(UserWarning):
"""The warning issued when BeautifulSoup has to guess what parser to
@@ -100,7 +102,7 @@ class BeautifulSoup(Tag):
# Since BeautifulSoup subclasses Tag, it's possible to treat it as
# a Tag with a .name. This name makes it clear the BeautifulSoup
# object isn't a real markup tag.
- ROOT_TAG_NAME = u'[document]'
+ ROOT_TAG_NAME = '[document]'
# If the end-user gives no indication which tree builder they
# want, look for one with these features.
@@ -217,7 +219,7 @@ class BeautifulSoup(Tag):
from_encoding = from_encoding or deprecated_argument(
"fromEncoding", "from_encoding")
- if from_encoding and isinstance(markup, unicode):
+ if from_encoding and isinstance(markup, str):
warnings.warn("You provided Unicode markup but also provided a value for from_encoding. Your from_encoding will be ignored.")
from_encoding = None
@@ -234,7 +236,7 @@ class BeautifulSoup(Tag):
builder_class = builder
builder = None
elif builder is None:
- if isinstance(features, basestring):
+ if isinstance(features, str):
features = [features]
if features is None or len(features) == 0:
features = self.DEFAULT_BUILDER_FEATURES
@@ -309,13 +311,13 @@ class BeautifulSoup(Tag):
markup = markup.read()
elif len(markup) <= 256 and (
(isinstance(markup, bytes) and not b'<' in markup)
- or (isinstance(markup, unicode) and not u'<' in markup)
+ or (isinstance(markup, str) and not '<' in markup)
):
# Print out warnings for a couple beginner problems
# involving passing non-markup to Beautiful Soup.
# Beautiful Soup will still parse the input as markup,
# just in case that's what the user really wants.
- if (isinstance(markup, unicode)
+ if (isinstance(markup, str)
and not os.path.supports_unicode_filenames):
possible_filename = markup.encode("utf8")
else:
@@ -326,7 +328,7 @@ class BeautifulSoup(Tag):
is_file = os.path.exists(possible_filename)
if is_file:
is_directory = os.path.isdir(possible_filename)
- except Exception, e:
+ except Exception as e:
# This is almost certainly a problem involving
# characters not valid in filenames on this
# system. Just let it go.
@@ -365,9 +367,9 @@ class BeautifulSoup(Tag):
pass
if not success:
- other_exceptions = [unicode(e) for e in rejections]
+ other_exceptions = [str(e) for e in rejections]
raise ParserRejectedMarkup(
- u"The markup you provided was rejected by the parser. Trying a different parser or a different encoding may help.\n\nOriginal exception(s) from parser:\n " + "\n ".join(other_exceptions)
+ "The markup you provided was rejected by the parser. Trying a different parser or a different encoding may help.\n\nOriginal exception(s) from parser:\n " + "\n ".join(other_exceptions)
)
# Clear out the markup and remove the builder's circular
@@ -418,9 +420,9 @@ class BeautifulSoup(Tag):
if isinstance(markup, bytes):
space = b' '
cant_start_with = (b"http:", b"https:")
- elif isinstance(markup, unicode):
- space = u' '
- cant_start_with = (u"http:", u"https:")
+ elif isinstance(markup, str):
+ space = ' '
+ cant_start_with = ("http:", "https:")
else:
return
@@ -555,7 +557,7 @@ class BeautifulSoup(Tag):
occurs.
"""
if self.current_data:
- current_data = u''.join(self.current_data)
+ current_data = ''.join(self.current_data)
# If whitespace is not preserved, and this string contains
# nothing but ASCII spaces, replace it with a single space
# or newline.
@@ -759,9 +761,9 @@ class BeautifulSoup(Tag):
eventual_encoding = None
if eventual_encoding != None:
encoding_part = ' encoding="%s"' % eventual_encoding
- prefix = u'<?xml version="1.0"%s?>\n' % encoding_part
+ prefix = '<?xml version="1.0"%s?>\n' % encoding_part
else:
- prefix = u''
+ prefix = ''
if not pretty_print:
indent_level = None
else:
@@ -799,4 +801,4 @@ class FeatureNotFound(ValueError):
if __name__ == '__main__':
import sys
soup = BeautifulSoup(sys.stdin)
- print(soup.prettify())
+ print((soup.prettify()))
diff --git a/bs4/builder/__init__.py b/bs4/builder/__init__.py
index b6e2c37..bd44905 100644
--- a/bs4/builder/__init__.py
+++ b/bs4/builder/__init__.py
@@ -301,13 +301,13 @@ class TreeBuilder(object):
universal = self.cdata_list_attributes.get('*', [])
tag_specific = self.cdata_list_attributes.get(
tag_name.lower(), None)
- for attr in attrs.keys():
+ for attr in list(attrs.keys()):
if attr in universal or (tag_specific and attr in tag_specific):
# We have a "class"-type attribute whose string
# value is a whitespace-separated list of
# values. Split it into a list.
value = attrs[attr]
- if isinstance(value, basestring):
+ if isinstance(value, str):
values = nonwhitespace_re.findall(value)
else:
# html5lib sometimes calls setAttributes twice
@@ -497,7 +497,7 @@ class ParserRejectedMarkup(Exception):
"""
if isinstance(message_or_exception, Exception):
e = message_or_exception
- message_or_exception = "%s: %s" % (e.__class__.__name__, unicode(e))
+ message_or_exception = "%s: %s" % (e.__class__.__name__, str(e))
super(ParserRejectedMarkup, self).__init__(message_or_exception)
# Builders are registered in reverse order of priority, so that custom
diff --git a/bs4/builder/_html5lib.py b/bs4/builder/_html5lib.py
index a1c6134..69aefd7 100644
--- a/bs4/builder/_html5lib.py
+++ b/bs4/builder/_html5lib.py
@@ -33,7 +33,7 @@ try:
# Pre-0.99999999
from html5lib.treebuilders import _base as treebuilder_base
new_html5lib = False
-except ImportError, e:
+except ImportError as e:
# 0.99999999 and up
from html5lib.treebuilders import base as treebuilder_base
new_html5lib = True
@@ -79,7 +79,7 @@ class HTML5TreeBuilder(HTMLTreeBuilder):
parser = html5lib.HTMLParser(tree=self.create_treebuilder)
self.underlying_builder.parser = parser
extra_kwargs = dict()
- if not isinstance(markup, unicode):
+ if not isinstance(markup, str):
if new_html5lib:
extra_kwargs['override_encoding'] = self.user_specified_encoding
else:
@@ -87,13 +87,13 @@ class HTML5TreeBuilder(HTMLTreeBuilder):
doc = parser.parse(markup, **extra_kwargs)
# Set the character encoding detected by the tokenizer.
- if isinstance(markup, unicode):
+ if isinstance(markup, str):
# We need to special-case this because html5lib sets
# charEncoding to UTF-8 if it gets Unicode input.
doc.original_encoding = None
else:
original_encoding = parser.tokenizer.stream.charEncoding[0]
- if not isinstance(original_encoding, basestring):
+ if not isinstance(original_encoding, str):
# In 0.99999999 and up, the encoding is an html5lib
# Encoding object. We want to use a string for compatibility
# with other tree builders.
@@ -110,7 +110,7 @@ class HTML5TreeBuilder(HTMLTreeBuilder):
def test_fragment_to_document(self, fragment):
"""See `TreeBuilder`."""
- return u'<html><head></head><body>%s</body></html>' % fragment
+ return '<html><head></head><body>%s</body></html>' % fragment
class TreeBuilderForHtml5lib(treebuilder_base.TreeBuilder):
@@ -217,7 +217,7 @@ class TreeBuilderForHtml5lib(treebuilder_base.TreeBuilder):
rv.append("|%s<%s>" % (' ' * indent, name))
if element.attrs:
attributes = []
- for name, value in element.attrs.items():
+ for name, value in list(element.attrs.items()):
if isinstance(name, NamespacedAttribute):
name = "%s %s" % (prefixes[name.namespace], name.name)
if isinstance(value, list):
@@ -272,7 +272,7 @@ class Element(treebuilder_base.Node):
def appendChild(self, node):
string_child = child = None
- if isinstance(node, basestring):
+ if isinstance(node, str):
# Some other piece of code decided to pass in a string
# instead of creating a TextElement object to contain the
# string.
@@ -289,7 +289,7 @@ class Element(treebuilder_base.Node):
child = node.element
node.parent = self
- if not isinstance(child, basestring) and child.parent is not None:
+ if not isinstance(child, str) and child.parent is not None:
node.element.extract()
if (string_child is not None and self.element.contents
@@ -302,7 +302,7 @@ class Element(treebuilder_base.Node):
old_element.replace_with(new_element)
self.soup._most_recent_element = new_element
else:
- if isinstance(node, basestring):
+ if isinstance(node, str):
# Create a brand new NavigableString from this string.
child = self.soup.new_string(node)
@@ -340,7 +340,7 @@ class Element(treebuilder_base.Node):
self.soup.builder._replace_cdata_list_attribute_values(
self.name, attributes)
- for name, value in attributes.items():
+ for name, value in list(attributes.items()):
self.element[name] = value
# The attributes may contain variables that need substitution.
diff --git a/bs4/builder/_htmlparser.py b/bs4/builder/_htmlparser.py
index 355be11..70e9be8 100644
--- a/bs4/builder/_htmlparser.py
+++ b/bs4/builder/_htmlparser.py
@@ -8,11 +8,11 @@ __all__ = [
'HTMLParserTreeBuilder',
]
-from HTMLParser import HTMLParser
+from html.parser import HTMLParser
try:
- from HTMLParser import HTMLParseError
-except ImportError, e:
+ from html.parser import HTMLParseError
+except ImportError as e:
# HTMLParseError is removed in Python 3.5. Since it can never be
# thrown in 3.5, we can just define our own class as a placeholder.
class HTMLParseError(Exception):
@@ -219,14 +219,14 @@ class BeautifulSoupHTMLParser(HTMLParser):
continue
try:
data = bytearray([real_name]).decode(encoding)
- except UnicodeDecodeError, e:
+ except UnicodeDecodeError as e:
pass
if not data:
try:
- data = unichr(real_name)
- except (ValueError, OverflowError), e:
+ data = chr(real_name)
+ except (ValueError, OverflowError) as e:
pass
- data = data or u"\N{REPLACEMENT CHARACTER}"
+ data = data or "\N{REPLACEMENT CHARACTER}"
self.handle_data(data)
def handle_entityref(self, name):
@@ -353,7 +353,7 @@ class HTMLParserTreeBuilder(HTMLTreeBuilder):
document to Unicode and parsing it. Each strategy will be tried
in turn.
"""
- if isinstance(markup, unicode):
+ if isinstance(markup, str):
# Parse Unicode as-is.
yield (markup, None, None, False)
return
@@ -391,7 +391,7 @@ class HTMLParserTreeBuilder(HTMLTreeBuilder):
try:
parser.feed(markup)
parser.close()
- except HTMLParseError, e:
+ except HTMLParseError as e:
warnings.warn(RuntimeWarning(
"Python's built-in HTMLParser cannot parse the given document. This is not a bug in Beautiful Soup. The best solution is to install an external parser (lxml or html5lib), and use Beautiful Soup with that parser. See http://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser for help."))
raise e
diff --git a/bs4/builder/_lxml.py b/bs4/builder/_lxml.py
index c670b84..11c9a69 100644
--- a/bs4/builder/_lxml.py
+++ b/bs4/builder/_lxml.py
@@ -8,11 +8,11 @@ __all__ = [
try:
from collections.abc import Callable # Python 3.6
-except ImportError , e:
+except ImportError as e:
from collections import Callable
from io import BytesIO
-from StringIO import StringIO
+from io import StringIO
from lxml import etree
from bs4.element import (
Comment,
@@ -35,7 +35,7 @@ LXML = 'lxml'
def _invert(d):
"Invert a dictionary."
- return dict((v,k) for k, v in d.items())
+ return dict((v,k) for k, v in list(d.items()))
class LXMLTreeBuilderForXML(TreeBuilder):
DEFAULT_PARSER_CLASS = etree.XMLParser
@@ -81,7 +81,7 @@ class LXMLTreeBuilderForXML(TreeBuilder):
:param mapping: A dictionary mapping namespace prefixes to URIs.
"""
- for key, value in mapping.items():
+ for key, value in list(mapping.items()):
if key and key not in self.soup._namespaces:
# Let the BeautifulSoup object know about a new namespace.
# If there are multiple namespaces defined with the same
@@ -169,12 +169,12 @@ class LXMLTreeBuilderForXML(TreeBuilder):
else:
self.processing_instruction_class = XMLProcessingInstruction
- if isinstance(markup, unicode):
+ if isinstance(markup, str):
# We were given Unicode. Maybe lxml can parse Unicode on
# this system?
yield markup, None, document_declared_encoding, False
- if isinstance(markup, unicode):
+ if isinstance(markup, str):
# No, apparently not. Convert the Unicode to UTF-8 and
# tell lxml to parse it as UTF-8.
yield (markup.encode("utf8"), "utf8",
@@ -199,7 +199,7 @@ class LXMLTreeBuilderForXML(TreeBuilder):
def feed(self, markup):
if isinstance(markup, bytes):
markup = BytesIO(markup)
- elif isinstance(markup, unicode):
+ elif isinstance(markup, str):
markup = StringIO(markup)
# Call feed() at least once, even if the markup is empty,
@@ -214,7 +214,7 @@ class LXMLTreeBuilderForXML(TreeBuilder):
if len(data) != 0:
self.parser.feed(data)
self.parser.close()
- except (UnicodeDecodeError, LookupError, etree.ParserError), e:
+ except (UnicodeDecodeError, LookupError, etree.ParserError) as e:
raise ParserRejectedMarkup(e)
def close(self):
@@ -243,7 +243,7 @@ class LXMLTreeBuilderForXML(TreeBuilder):
# Also treat the namespace mapping as a set of attributes on the
# tag, so we can recreate it later.
attrs = attrs.copy()
- for prefix, namespace in nsmap.items():
+ for prefix, namespace in list(nsmap.items()):
attribute = NamespacedAttribute(
"xmlns", prefix, "http://www.w3.org/2000/xmlns/")
attrs[attribute] = namespace
@@ -252,7 +252,7 @@ class LXMLTreeBuilderForXML(TreeBuilder):
# from lxml with namespaces attached to their names, and
# turn then into NamespacedAttribute objects.
new_attrs = {}
- for attr, value in attrs.items():
+ for attr, value in list(attrs.items()):
namespace, attr = self._getNsTag(attr)
if namespace is None:
new_attrs[attr] = value
@@ -312,7 +312,7 @@ class LXMLTreeBuilderForXML(TreeBuilder):
def test_fragment_to_document(self, fragment):
"""See `TreeBuilder`."""
- return u'<?xml version="1.0" encoding="utf-8"?>\n%s' % fragment
+ return '<?xml version="1.0" encoding="utf-8"?>\n%s' % fragment
class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML):
@@ -333,10 +333,10 @@ class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML):
self.parser = self.parser_for(encoding)
self.parser.feed(markup)
self.parser.close()
- except (UnicodeDecodeError, LookupError, etree.ParserError), e:
+ except (UnicodeDecodeError, LookupError, etree.ParserError) as e:
raise ParserRejectedMarkup(e)
def test_fragment_to_document(self, fragment):
"""See `TreeBuilder`."""
- return u'<html><body>%s</body></html>' % fragment
+ return '<html><body>%s</body></html>' % fragment
diff --git a/bs4/dammit.py b/bs4/dammit.py
index a0d1c21..e017408 100644
--- a/bs4/dammit.py
+++ b/bs4/dammit.py
@@ -9,7 +9,7 @@ XML or HTML to reflect a new encoding; that's the tree builder's job.
# Use of this source code is governed by the MIT license.
__license__ = "MIT"
-from htmlentitydefs import codepoint2name
+from html.entities import codepoint2name
from collections import defaultdict
import codecs
import re
@@ -23,7 +23,7 @@ try:
# PyPI package: cchardet
import cchardet
def chardet_dammit(s):
- if isinstance(s, unicode):
+ if isinstance(s, str):
return None
return cchardet.detect(s)['encoding']
except ImportError:
@@ -33,7 +33,7 @@ except ImportError:
# PyPI package: chardet
import chardet
def chardet_dammit(s):
- if isinstance(s, unicode):
+ if isinstance(s, str):
return None
return chardet.detect(s)['encoding']
#import chardet.constants
@@ -54,14 +54,14 @@ except ImportError:
# Build bytestring and Unicode versions of regular expressions for finding
# a declared encoding inside an XML or HTML document.
-xml_encoding = u'^\\s*<\\?.*encoding=[\'"](.*?)[\'"].*\\?>'
-html_meta = u'<\\s*meta[^>]+charset\\s*=\\s*["\']?([^>]*?)[ /;\'">]'
+xml_encoding = '^\\s*<\\?.*encoding=[\'"](.*?)[\'"].*\\?>'
+html_meta = '<\\s*meta[^>]+charset\\s*=\\s*["\']?([^>]*?)[ /;\'">]'
encoding_res = dict()
encoding_res[bytes] = {
'html' : re.compile(html_meta.encode("ascii"), re.I),
'xml' : re.compile(xml_encoding.encode("ascii"), re.I),
}
-encoding_res[unicode] = {
+encoding_res[str] = {
'html' : re.compile(html_meta, re.I),
'xml' : re.compile(xml_encoding, re.I)
}
@@ -73,2237 +73,2237 @@ except ImportError:
# no equivalent table in Python 2, so we'll just provide a copy
# here.
html5 = {
- 'Aacute': u'\xc1',
- 'aacute': u'\xe1',
- 'Aacute;': u'\xc1',
- 'aacute;': u'\xe1',
- 'Abreve;': u'\u0102',
- 'abreve;': u'\u0103',
- 'ac;': u'\u223e',
- 'acd;': u'\u223f',
- 'acE;': u'\u223e\u0333',
- 'Acirc': u'\xc2',
- 'acirc': u'\xe2',
- 'Acirc;': u'\xc2',
- 'acirc;': u'\xe2',
- 'acute': u'\xb4',
- 'acute;': u'\xb4',
- 'Acy;': u'\u0410',
- 'acy;': u'\u0430',
- 'AElig': u'\xc6',
- 'aelig': u'\xe6',
- 'AElig;': u'\xc6',
- 'aelig;': u'\xe6',
- 'af;': u'\u2061',
- 'Afr;': u'\U0001d504',
- 'afr;': u'\U0001d51e',
- 'Agrave': u'\xc0',
- 'agrave': u'\xe0',
- 'Agrave;': u'\xc0',
- 'agrave;': u'\xe0',
- 'alefsym;': u'\u2135',
- 'aleph;': u'\u2135',
- 'Alpha;': u'\u0391',
- 'alpha;': u'\u03b1',
- 'Amacr;': u'\u0100',
- 'amacr;': u'\u0101',
- 'amalg;': u'\u2a3f',
- 'AMP': u'&',
- 'amp': u'&',
- 'AMP;': u'&',
- 'amp;': u'&',
- 'And;': u'\u2a53',
- 'and;': u'\u2227',
- 'andand;': u'\u2a55',
- 'andd;': u'\u2a5c',
- 'andslope;': u'\u2a58',
- 'andv;': u'\u2a5a',
- 'ang;': u'\u2220',
- 'ange;': u'\u29a4',
- 'angle;': u'\u2220',
- 'angmsd;': u'\u2221',
- 'angmsdaa;': u'\u29a8',
- 'angmsdab;': u'\u29a9',
- 'angmsdac;': u'\u29aa',
- 'angmsdad;': u'\u29ab',
- 'angmsdae;': u'\u29ac',
- 'angmsdaf;': u'\u29ad',
- 'angmsdag;': u'\u29ae',
- 'angmsdah;': u'\u29af',
- 'angrt;': u'\u221f',
- 'angrtvb;': u'\u22be',
- 'angrtvbd;': u'\u299d',
- 'angsph;': u'\u2222',
- 'angst;': u'\xc5',
- 'angzarr;': u'\u237c',
- 'Aogon;': u'\u0104',
- 'aogon;': u'\u0105',
- 'Aopf;': u'\U0001d538',
- 'aopf;': u'\U0001d552',
- 'ap;': u'\u2248',
- 'apacir;': u'\u2a6f',
- 'apE;': u'\u2a70',
- 'ape;': u'\u224a',
- 'apid;': u'\u224b',
+ 'Aacute': '\xc1',
+ 'aacute': '\xe1',
+ 'Aacute;': '\xc1',
+ 'aacute;': '\xe1',
+ 'Abreve;': '\u0102',
+ 'abreve;': '\u0103',
+ 'ac;': '\u223e',
+ 'acd;': '\u223f',
+ 'acE;': '\u223e\u0333',
+ 'Acirc': '\xc2',
+ 'acirc': '\xe2',
+ 'Acirc;': '\xc2',
+ 'acirc;': '\xe2',
+ 'acute': '\xb4',
+ 'acute;': '\xb4',
+ 'Acy;': '\u0410',
+ 'acy;': '\u0430',
+ 'AElig': '\xc6',
+ 'aelig': '\xe6',
+ 'AElig;': '\xc6',
+ 'aelig;': '\xe6',
+ 'af;': '\u2061',
+ 'Afr;': '\U0001d504',
+ 'afr;': '\U0001d51e',
+ 'Agrave': '\xc0',
+ 'agrave': '\xe0',
+ 'Agrave;': '\xc0',
+ 'agrave;': '\xe0',
+ 'alefsym;': '\u2135',
+ 'aleph;': '\u2135',
+ 'Alpha;': '\u0391',
+ 'alpha;': '\u03b1',
+ 'Amacr;': '\u0100',
+ 'amacr;': '\u0101',
+ 'amalg;': '\u2a3f',
+ 'AMP': '&',
+ 'amp': '&',
+ 'AMP;': '&',
+ 'amp;': '&',
+ 'And;': '\u2a53',
+ 'and;': '\u2227',
+ 'andand;': '\u2a55',
+ 'andd;': '\u2a5c',
+ 'andslope;': '\u2a58',
+ 'andv;': '\u2a5a',
+ 'ang;': '\u2220',
+ 'ange;': '\u29a4',
+ 'angle;': '\u2220',
+ 'angmsd;': '\u2221',
+ 'angmsdaa;': '\u29a8',
+ 'angmsdab;': '\u29a9',
+ 'angmsdac;': '\u29aa',
+ 'angmsdad;': '\u29ab',
+ 'angmsdae;': '\u29ac',
+ 'angmsdaf;': '\u29ad',
+ 'angmsdag;': '\u29ae',
+ 'angmsdah;': '\u29af',
+ 'angrt;': '\u221f',
+ 'angrtvb;': '\u22be',
+ 'angrtvbd;': '\u299d',
+ 'angsph;': '\u2222',
+ 'angst;': '\xc5',
+ 'angzarr;': '\u237c',
+ 'Aogon;': '\u0104',
+ 'aogon;': '\u0105',
+ 'Aopf;': '\U0001d538',
+ 'aopf;': '\U0001d552',
+ 'ap;': '\u2248',
+ 'apacir;': '\u2a6f',
+ 'apE;': '\u2a70',
+ 'ape;': '\u224a',
+ 'apid;': '\u224b',
'apos;': "'",
- 'ApplyFunction;': u'\u2061',
- 'approx;': u'\u2248',
- 'approxeq;': u'\u224a',
- 'Aring': u'\xc5',
- 'aring': u'\xe5',
- 'Aring;': u'\xc5',
- 'aring;': u'\xe5',
- 'Ascr;': u'\U0001d49c',
- 'ascr;': u'\U0001d4b6',
- 'Assign;': u'\u2254',
- 'ast;': u'*',
- 'asymp;': u'\u2248',
- 'asympeq;': u'\u224d',
- 'Atilde': u'\xc3',
- 'atilde': u'\xe3',
- 'Atilde;': u'\xc3',
- 'atilde;': u'\xe3',
- 'Auml': u'\xc4',
- 'auml': u'\xe4',
- 'Auml;': u'\xc4',
- 'auml;': u'\xe4',
- 'awconint;': u'\u2233',
- 'awint;': u'\u2a11',
- 'backcong;': u'\u224c',
- 'backepsilon;': u'\u03f6',
- 'backprime;': u'\u2035',
- 'backsim;': u'\u223d',
- 'backsimeq;': u'\u22cd',
- 'Backslash;': u'\u2216',
- 'Barv;': u'\u2ae7',
- 'barvee;': u'\u22bd',
- 'Barwed;': u'\u2306',
- 'barwed;': u'\u2305',
- 'barwedge;': u'\u2305',
- 'bbrk;': u'\u23b5',
- 'bbrktbrk;': u'\u23b6',
- 'bcong;': u'\u224c',
- 'Bcy;': u'\u0411',
- 'bcy;': u'\u0431',
- 'bdquo;': u'\u201e',
- 'becaus;': u'\u2235',
- 'Because;': u'\u2235',
- 'because;': u'\u2235',
- 'bemptyv;': u'\u29b0',
- 'bepsi;': u'\u03f6',
- 'bernou;': u'\u212c',
- 'Bernoullis;': u'\u212c',
- 'Beta;': u'\u0392',
- 'beta;': u'\u03b2',
- 'beth;': u'\u2136',
- 'between;': u'\u226c',
- 'Bfr;': u'\U0001d505',
- 'bfr;': u'\U0001d51f',
- 'bigcap;': u'\u22c2',
- 'bigcirc;': u'\u25ef',
- 'bigcup;': u'\u22c3',
- 'bigodot;': u'\u2a00',
- 'bigoplus;': u'\u2a01',
- 'bigotimes;': u'\u2a02',
- 'bigsqcup;': u'\u2a06',
- 'bigstar;': u'\u2605',
- 'bigtriangledown;': u'\u25bd',
- 'bigtriangleup;': u'\u25b3',
- 'biguplus;': u'\u2a04',
- 'bigvee;': u'\u22c1',
- 'bigwedge;': u'\u22c0',
- 'bkarow;': u'\u290d',
- 'blacklozenge;': u'\u29eb',
- 'blacksquare;': u'\u25aa',
- 'blacktriangle;': u'\u25b4',
- 'blacktriangledown;': u'\u25be',
- 'blacktriangleleft;': u'\u25c2',
- 'blacktriangleright;': u'\u25b8',
- 'blank;': u'\u2423',
- 'blk12;': u'\u2592',
- 'blk14;': u'\u2591',
- 'blk34;': u'\u2593',
- 'block;': u'\u2588',
- 'bne;': u'=\u20e5',
- 'bnequiv;': u'\u2261\u20e5',
- 'bNot;': u'\u2aed',
- 'bnot;': u'\u2310',
- 'Bopf;': u'\U0001d539',
- 'bopf;': u'\U0001d553',
- 'bot;': u'\u22a5',
- 'bottom;': u'\u22a5',
- 'bowtie;': u'\u22c8',
- 'boxbox;': u'\u29c9',
- 'boxDL;': u'\u2557',
- 'boxDl;': u'\u2556',
- 'boxdL;': u'\u2555',
- 'boxdl;': u'\u2510',
- 'boxDR;': u'\u2554',
- 'boxDr;': u'\u2553',
- 'boxdR;': u'\u2552',
- 'boxdr;': u'\u250c',
- 'boxH;': u'\u2550',
- 'boxh;': u'\u2500',
- 'boxHD;': u'\u2566',
- 'boxHd;': u'\u2564',
- 'boxhD;': u'\u2565',
- 'boxhd;': u'\u252c',
- 'boxHU;': u'\u2569',
- 'boxHu;': u'\u2567',
- 'boxhU;': u'\u2568',
- 'boxhu;': u'\u2534',
- 'boxminus;': u'\u229f',
- 'boxplus;': u'\u229e',
- 'boxtimes;': u'\u22a0',
- 'boxUL;': u'\u255d',
- 'boxUl;': u'\u255c',
- 'boxuL;': u'\u255b',
- 'boxul;': u'\u2518',
- 'boxUR;': u'\u255a',
- 'boxUr;': u'\u2559',
- 'boxuR;': u'\u2558',
- 'boxur;': u'\u2514',
- 'boxV;': u'\u2551',
- 'boxv;': u'\u2502',
- 'boxVH;': u'\u256c',
- 'boxVh;': u'\u256b',
- 'boxvH;': u'\u256a',
- 'boxvh;': u'\u253c',
- 'boxVL;': u'\u2563',
- 'boxVl;': u'\u2562',
- 'boxvL;': u'\u2561',
- 'boxvl;': u'\u2524',
- 'boxVR;': u'\u2560',
- 'boxVr;': u'\u255f',
- 'boxvR;': u'\u255e',
- 'boxvr;': u'\u251c',
- 'bprime;': u'\u2035',
- 'Breve;': u'\u02d8',
- 'breve;': u'\u02d8',
- 'brvbar': u'\xa6',
- 'brvbar;': u'\xa6',
- 'Bscr;': u'\u212c',
- 'bscr;': u'\U0001d4b7',
- 'bsemi;': u'\u204f',
- 'bsim;': u'\u223d',
- 'bsime;': u'\u22cd',
- 'bsol;': u'\\',
- 'bsolb;': u'\u29c5',
- 'bsolhsub;': u'\u27c8',
- 'bull;': u'\u2022',
- 'bullet;': u'\u2022',
- 'bump;': u'\u224e',
- 'bumpE;': u'\u2aae',
- 'bumpe;': u'\u224f',
- 'Bumpeq;': u'\u224e',
- 'bumpeq;': u'\u224f',
- 'Cacute;': u'\u0106',
- 'cacute;': u'\u0107',
- 'Cap;': u'\u22d2',
- 'cap;': u'\u2229',
- 'capand;': u'\u2a44',
- 'capbrcup;': u'\u2a49',
- 'capcap;': u'\u2a4b',
- 'capcup;': u'\u2a47',
- 'capdot;': u'\u2a40',
- 'CapitalDifferentialD;': u'\u2145',
- 'caps;': u'\u2229\ufe00',
- 'caret;': u'\u2041',
- 'caron;': u'\u02c7',
- 'Cayleys;': u'\u212d',
- 'ccaps;': u'\u2a4d',
- 'Ccaron;': u'\u010c',
- 'ccaron;': u'\u010d',
- 'Ccedil': u'\xc7',
- 'ccedil': u'\xe7',
- 'Ccedil;': u'\xc7',
- 'ccedil;': u'\xe7',
- 'Ccirc;': u'\u0108',
- 'ccirc;': u'\u0109',
- 'Cconint;': u'\u2230',
- 'ccups;': u'\u2a4c',
- 'ccupssm;': u'\u2a50',
- 'Cdot;': u'\u010a',
- 'cdot;': u'\u010b',
- 'cedil': u'\xb8',
- 'cedil;': u'\xb8',
- 'Cedilla;': u'\xb8',
- 'cemptyv;': u'\u29b2',
- 'cent': u'\xa2',
- 'cent;': u'\xa2',
- 'CenterDot;': u'\xb7',
- 'centerdot;': u'\xb7',
- 'Cfr;': u'\u212d',
- 'cfr;': u'\U0001d520',
- 'CHcy;': u'\u0427',
- 'chcy;': u'\u0447',
- 'check;': u'\u2713',
- 'checkmark;': u'\u2713',
- 'Chi;': u'\u03a7',
- 'chi;': u'\u03c7',
- 'cir;': u'\u25cb',
- 'circ;': u'\u02c6',
- 'circeq;': u'\u2257',
- 'circlearrowleft;': u'\u21ba',
- 'circlearrowright;': u'\u21bb',
- 'circledast;': u'\u229b',
- 'circledcirc;': u'\u229a',
- 'circleddash;': u'\u229d',
- 'CircleDot;': u'\u2299',
- 'circledR;': u'\xae',
- 'circledS;': u'\u24c8',
- 'CircleMinus;': u'\u2296',
- 'CirclePlus;': u'\u2295',
- 'CircleTimes;': u'\u2297',
- 'cirE;': u'\u29c3',
- 'cire;': u'\u2257',
- 'cirfnint;': u'\u2a10',
- 'cirmid;': u'\u2aef',
- 'cirscir;': u'\u29c2',
- 'ClockwiseContourIntegral;': u'\u2232',
- 'CloseCurlyDoubleQuote;': u'\u201d',
- 'CloseCurlyQuote;': u'\u2019',
- 'clubs;': u'\u2663',
- 'clubsuit;': u'\u2663',
- 'Colon;': u'\u2237',
- 'colon;': u':',
- 'Colone;': u'\u2a74',
- 'colone;': u'\u2254',
- 'coloneq;': u'\u2254',
- 'comma;': u',',
- 'commat;': u'@',
- 'comp;': u'\u2201',
- 'compfn;': u'\u2218',
- 'complement;': u'\u2201',
- 'complexes;': u'\u2102',
- 'cong;': u'\u2245',
- 'congdot;': u'\u2a6d',
- 'Congruent;': u'\u2261',
- 'Conint;': u'\u222f',
- 'conint;': u'\u222e',
- 'ContourIntegral;': u'\u222e',
- 'Copf;': u'\u2102',
- 'copf;': u'\U0001d554',
- 'coprod;': u'\u2210',
- 'Coproduct;': u'\u2210',
- 'COPY': u'\xa9',
- 'copy': u'\xa9',
- 'COPY;': u'\xa9',
- 'copy;': u'\xa9',
- 'copysr;': u'\u2117',
- 'CounterClockwiseContourIntegral;': u'\u2233',
- 'crarr;': u'\u21b5',
- 'Cross;': u'\u2a2f',
- 'cross;': u'\u2717',
- 'Cscr;': u'\U0001d49e',
- 'cscr;': u'\U0001d4b8',
- 'csub;': u'\u2acf',
- 'csube;': u'\u2ad1',
- 'csup;': u'\u2ad0',
- 'csupe;': u'\u2ad2',
- 'ctdot;': u'\u22ef',
- 'cudarrl;': u'\u2938',
- 'cudarrr;': u'\u2935',
- 'cuepr;': u'\u22de',
- 'cuesc;': u'\u22df',
- 'cularr;': u'\u21b6',
- 'cularrp;': u'\u293d',
- 'Cup;': u'\u22d3',
- 'cup;': u'\u222a',
- 'cupbrcap;': u'\u2a48',
- 'CupCap;': u'\u224d',
- 'cupcap;': u'\u2a46',
- 'cupcup;': u'\u2a4a',
- 'cupdot;': u'\u228d',
- 'cupor;': u'\u2a45',
- 'cups;': u'\u222a\ufe00',
- 'curarr;': u'\u21b7',
- 'curarrm;': u'\u293c',
- 'curlyeqprec;': u'\u22de',
- 'curlyeqsucc;': u'\u22df',
- 'curlyvee;': u'\u22ce',
- 'curlywedge;': u'\u22cf',
- 'curren': u'\xa4',
- 'curren;': u'\xa4',
- 'curvearrowleft;': u'\u21b6',
- 'curvearrowright;': u'\u21b7',
- 'cuvee;': u'\u22ce',
- 'cuwed;': u'\u22cf',
- 'cwconint;': u'\u2232',
- 'cwint;': u'\u2231',
- 'cylcty;': u'\u232d',
- 'Dagger;': u'\u2021',
- 'dagger;': u'\u2020',
- 'daleth;': u'\u2138',
- 'Darr;': u'\u21a1',
- 'dArr;': u'\u21d3',
- 'darr;': u'\u2193',
- 'dash;': u'\u2010',
- 'Dashv;': u'\u2ae4',
- 'dashv;': u'\u22a3',
- 'dbkarow;': u'\u290f',
- 'dblac;': u'\u02dd',
- 'Dcaron;': u'\u010e',
- 'dcaron;': u'\u010f',
- 'Dcy;': u'\u0414',
- 'dcy;': u'\u0434',
- 'DD;': u'\u2145',
- 'dd;': u'\u2146',
- 'ddagger;': u'\u2021',
- 'ddarr;': u'\u21ca',
- 'DDotrahd;': u'\u2911',
- 'ddotseq;': u'\u2a77',
- 'deg': u'\xb0',
- 'deg;': u'\xb0',
- 'Del;': u'\u2207',
- 'Delta;': u'\u0394',
- 'delta;': u'\u03b4',
- 'demptyv;': u'\u29b1',
- 'dfisht;': u'\u297f',
- 'Dfr;': u'\U0001d507',
- 'dfr;': u'\U0001d521',
- 'dHar;': u'\u2965',
- 'dharl;': u'\u21c3',
- 'dharr;': u'\u21c2',
- 'DiacriticalAcute;': u'\xb4',
- 'DiacriticalDot;': u'\u02d9',
- 'DiacriticalDoubleAcute;': u'\u02dd',
- 'DiacriticalGrave;': u'`',
- 'DiacriticalTilde;': u'\u02dc',
- 'diam;': u'\u22c4',
- 'Diamond;': u'\u22c4',
- 'diamond;': u'\u22c4',
- 'diamondsuit;': u'\u2666',
- 'diams;': u'\u2666',
- 'die;': u'\xa8',
- 'DifferentialD;': u'\u2146',
- 'digamma;': u'\u03dd',
- 'disin;': u'\u22f2',
- 'div;': u'\xf7',
- 'divide': u'\xf7',
- 'divide;': u'\xf7',
- 'divideontimes;': u'\u22c7',
- 'divonx;': u'\u22c7',
- 'DJcy;': u'\u0402',
- 'djcy;': u'\u0452',
- 'dlcorn;': u'\u231e',
- 'dlcrop;': u'\u230d',
- 'dollar;': u'$',
- 'Dopf;': u'\U0001d53b',
- 'dopf;': u'\U0001d555',
- 'Dot;': u'\xa8',
- 'dot;': u'\u02d9',
- 'DotDot;': u'\u20dc',
- 'doteq;': u'\u2250',
- 'doteqdot;': u'\u2251',
- 'DotEqual;': u'\u2250',
- 'dotminus;': u'\u2238',
- 'dotplus;': u'\u2214',
- 'dotsquare;': u'\u22a1',
- 'doublebarwedge;': u'\u2306',
- 'DoubleContourIntegral;': u'\u222f',
- 'DoubleDot;': u'\xa8',
- 'DoubleDownArrow;': u'\u21d3',
- 'DoubleLeftArrow;': u'\u21d0',
- 'DoubleLeftRightArrow;': u'\u21d4',
- 'DoubleLeftTee;': u'\u2ae4',
- 'DoubleLongLeftArrow;': u'\u27f8',
- 'DoubleLongLeftRightArrow;': u'\u27fa',
- 'DoubleLongRightArrow;': u'\u27f9',
- 'DoubleRightArrow;': u'\u21d2',
- 'DoubleRightTee;': u'\u22a8',
- 'DoubleUpArrow;': u'\u21d1',
- 'DoubleUpDownArrow;': u'\u21d5',
- 'DoubleVerticalBar;': u'\u2225',
- 'DownArrow;': u'\u2193',
- 'Downarrow;': u'\u21d3',
- 'downarrow;': u'\u2193',
- 'DownArrowBar;': u'\u2913',
- 'DownArrowUpArrow;': u'\u21f5',
- 'DownBreve;': u'\u0311',
- 'downdownarrows;': u'\u21ca',
- 'downharpoonleft;': u'\u21c3',
- 'downharpoonright;': u'\u21c2',
- 'DownLeftRightVector;': u'\u2950',
- 'DownLeftTeeVector;': u'\u295e',
- 'DownLeftVector;': u'\u21bd',
- 'DownLeftVectorBar;': u'\u2956',
- 'DownRightTeeVector;': u'\u295f',
- 'DownRightVector;': u'\u21c1',
- 'DownRightVectorBar;': u'\u2957',
- 'DownTee;': u'\u22a4',
- 'DownTeeArrow;': u'\u21a7',
- 'drbkarow;': u'\u2910',
- 'drcorn;': u'\u231f',
- 'drcrop;': u'\u230c',
- 'Dscr;': u'\U0001d49f',
- 'dscr;': u'\U0001d4b9',
- 'DScy;': u'\u0405',
- 'dscy;': u'\u0455',
- 'dsol;': u'\u29f6',
- 'Dstrok;': u'\u0110',
- 'dstrok;': u'\u0111',
- 'dtdot;': u'\u22f1',
- 'dtri;': u'\u25bf',
- 'dtrif;': u'\u25be',
- 'duarr;': u'\u21f5',
- 'duhar;': u'\u296f',
- 'dwangle;': u'\u29a6',
- 'DZcy;': u'\u040f',
- 'dzcy;': u'\u045f',
- 'dzigrarr;': u'\u27ff',
- 'Eacute': u'\xc9',
- 'eacute': u'\xe9',
- 'Eacute;': u'\xc9',
- 'eacute;': u'\xe9',
- 'easter;': u'\u2a6e',
- 'Ecaron;': u'\u011a',
- 'ecaron;': u'\u011b',
- 'ecir;': u'\u2256',
- 'Ecirc': u'\xca',
- 'ecirc': u'\xea',
- 'Ecirc;': u'\xca',
- 'ecirc;': u'\xea',
- 'ecolon;': u'\u2255',
- 'Ecy;': u'\u042d',
- 'ecy;': u'\u044d',
- 'eDDot;': u'\u2a77',
- 'Edot;': u'\u0116',
- 'eDot;': u'\u2251',
- 'edot;': u'\u0117',
- 'ee;': u'\u2147',
- 'efDot;': u'\u2252',
- 'Efr;': u'\U0001d508',
- 'efr;': u'\U0001d522',
- 'eg;': u'\u2a9a',
- 'Egrave': u'\xc8',
- 'egrave': u'\xe8',
- 'Egrave;': u'\xc8',
- 'egrave;': u'\xe8',
- 'egs;': u'\u2a96',
- 'egsdot;': u'\u2a98',
- 'el;': u'\u2a99',
- 'Element;': u'\u2208',
- 'elinters;': u'\u23e7',
- 'ell;': u'\u2113',
- 'els;': u'\u2a95',
- 'elsdot;': u'\u2a97',
- 'Emacr;': u'\u0112',
- 'emacr;': u'\u0113',
- 'empty;': u'\u2205',
- 'emptyset;': u'\u2205',
- 'EmptySmallSquare;': u'\u25fb',
- 'emptyv;': u'\u2205',
- 'EmptyVerySmallSquare;': u'\u25ab',
- 'emsp13;': u'\u2004',
- 'emsp14;': u'\u2005',
- 'emsp;': u'\u2003',
- 'ENG;': u'\u014a',
- 'eng;': u'\u014b',
- 'ensp;': u'\u2002',
- 'Eogon;': u'\u0118',
- 'eogon;': u'\u0119',
- 'Eopf;': u'\U0001d53c',
- 'eopf;': u'\U0001d556',
- 'epar;': u'\u22d5',
- 'eparsl;': u'\u29e3',
- 'eplus;': u'\u2a71',
- 'epsi;': u'\u03b5',
- 'Epsilon;': u'\u0395',
- 'epsilon;': u'\u03b5',
- 'epsiv;': u'\u03f5',
- 'eqcirc;': u'\u2256',
- 'eqcolon;': u'\u2255',
- 'eqsim;': u'\u2242',
- 'eqslantgtr;': u'\u2a96',
- 'eqslantless;': u'\u2a95',
- 'Equal;': u'\u2a75',
- 'equals;': u'=',
- 'EqualTilde;': u'\u2242',
- 'equest;': u'\u225f',
- 'Equilibrium;': u'\u21cc',
- 'equiv;': u'\u2261',
- 'equivDD;': u'\u2a78',
- 'eqvparsl;': u'\u29e5',
- 'erarr;': u'\u2971',
- 'erDot;': u'\u2253',
- 'Escr;': u'\u2130',
- 'escr;': u'\u212f',
- 'esdot;': u'\u2250',
- 'Esim;': u'\u2a73',
- 'esim;': u'\u2242',
- 'Eta;': u'\u0397',
- 'eta;': u'\u03b7',
- 'ETH': u'\xd0',
- 'eth': u'\xf0',
- 'ETH;': u'\xd0',
- 'eth;': u'\xf0',
- 'Euml': u'\xcb',
- 'euml': u'\xeb',
- 'Euml;': u'\xcb',
- 'euml;': u'\xeb',
- 'euro;': u'\u20ac',
- 'excl;': u'!',
- 'exist;': u'\u2203',
- 'Exists;': u'\u2203',
- 'expectation;': u'\u2130',
- 'ExponentialE;': u'\u2147',
- 'exponentiale;': u'\u2147',
- 'fallingdotseq;': u'\u2252',
- 'Fcy;': u'\u0424',
- 'fcy;': u'\u0444',
- 'female;': u'\u2640',
- 'ffilig;': u'\ufb03',
- 'fflig;': u'\ufb00',
- 'ffllig;': u'\ufb04',
- 'Ffr;': u'\U0001d509',
- 'ffr;': u'\U0001d523',
- 'filig;': u'\ufb01',
- 'FilledSmallSquare;': u'\u25fc',
- 'FilledVerySmallSquare;': u'\u25aa',
- 'fjlig;': u'fj',
- 'flat;': u'\u266d',
- 'fllig;': u'\ufb02',
- 'fltns;': u'\u25b1',
- 'fnof;': u'\u0192',
- 'Fopf;': u'\U0001d53d',
- 'fopf;': u'\U0001d557',
- 'ForAll;': u'\u2200',
- 'forall;': u'\u2200',
- 'fork;': u'\u22d4',
- 'forkv;': u'\u2ad9',
- 'Fouriertrf;': u'\u2131',
- 'fpartint;': u'\u2a0d',
- 'frac12': u'\xbd',
- 'frac12;': u'\xbd',
- 'frac13;': u'\u2153',
- 'frac14': u'\xbc',
- 'frac14;': u'\xbc',
- 'frac15;': u'\u2155',
- 'frac16;': u'\u2159',
- 'frac18;': u'\u215b',
- 'frac23;': u'\u2154',
- 'frac25;': u'\u2156',
- 'frac34': u'\xbe',
- 'frac34;': u'\xbe',
- 'frac35;': u'\u2157',
- 'frac38;': u'\u215c',
- 'frac45;': u'\u2158',
- 'frac56;': u'\u215a',
- 'frac58;': u'\u215d',
- 'frac78;': u'\u215e',
- 'frasl;': u'\u2044',
- 'frown;': u'\u2322',
- 'Fscr;': u'\u2131',
- 'fscr;': u'\U0001d4bb',
- 'gacute;': u'\u01f5',
- 'Gamma;': u'\u0393',
- 'gamma;': u'\u03b3',
- 'Gammad;': u'\u03dc',
- 'gammad;': u'\u03dd',
- 'gap;': u'\u2a86',
- 'Gbreve;': u'\u011e',
- 'gbreve;': u'\u011f',
- 'Gcedil;': u'\u0122',
- 'Gcirc;': u'\u011c',
- 'gcirc;': u'\u011d',
- 'Gcy;': u'\u0413',
- 'gcy;': u'\u0433',
- 'Gdot;': u'\u0120',
- 'gdot;': u'\u0121',
- 'gE;': u'\u2267',
- 'ge;': u'\u2265',
- 'gEl;': u'\u2a8c',
- 'gel;': u'\u22db',
- 'geq;': u'\u2265',
- 'geqq;': u'\u2267',
- 'geqslant;': u'\u2a7e',
- 'ges;': u'\u2a7e',
- 'gescc;': u'\u2aa9',
- 'gesdot;': u'\u2a80',
- 'gesdoto;': u'\u2a82',
- 'gesdotol;': u'\u2a84',
- 'gesl;': u'\u22db\ufe00',
- 'gesles;': u'\u2a94',
- 'Gfr;': u'\U0001d50a',
- 'gfr;': u'\U0001d524',
- 'Gg;': u'\u22d9',
- 'gg;': u'\u226b',
- 'ggg;': u'\u22d9',
- 'gimel;': u'\u2137',
- 'GJcy;': u'\u0403',
- 'gjcy;': u'\u0453',
- 'gl;': u'\u2277',
- 'gla;': u'\u2aa5',
- 'glE;': u'\u2a92',
- 'glj;': u'\u2aa4',
- 'gnap;': u'\u2a8a',
- 'gnapprox;': u'\u2a8a',
- 'gnE;': u'\u2269',
- 'gne;': u'\u2a88',
- 'gneq;': u'\u2a88',
- 'gneqq;': u'\u2269',
- 'gnsim;': u'\u22e7',
- 'Gopf;': u'\U0001d53e',
- 'gopf;': u'\U0001d558',
- 'grave;': u'`',
- 'GreaterEqual;': u'\u2265',
- 'GreaterEqualLess;': u'\u22db',
- 'GreaterFullEqual;': u'\u2267',
- 'GreaterGreater;': u'\u2aa2',
- 'GreaterLess;': u'\u2277',
- 'GreaterSlantEqual;': u'\u2a7e',
- 'GreaterTilde;': u'\u2273',
- 'Gscr;': u'\U0001d4a2',
- 'gscr;': u'\u210a',
- 'gsim;': u'\u2273',
- 'gsime;': u'\u2a8e',
- 'gsiml;': u'\u2a90',
- 'GT': u'>',
- 'gt': u'>',
- 'GT;': u'>',
- 'Gt;': u'\u226b',
- 'gt;': u'>',
- 'gtcc;': u'\u2aa7',
- 'gtcir;': u'\u2a7a',
- 'gtdot;': u'\u22d7',
- 'gtlPar;': u'\u2995',
- 'gtquest;': u'\u2a7c',
- 'gtrapprox;': u'\u2a86',
- 'gtrarr;': u'\u2978',
- 'gtrdot;': u'\u22d7',
- 'gtreqless;': u'\u22db',
- 'gtreqqless;': u'\u2a8c',
- 'gtrless;': u'\u2277',
- 'gtrsim;': u'\u2273',
- 'gvertneqq;': u'\u2269\ufe00',
- 'gvnE;': u'\u2269\ufe00',
- 'Hacek;': u'\u02c7',
- 'hairsp;': u'\u200a',
- 'half;': u'\xbd',
- 'hamilt;': u'\u210b',
- 'HARDcy;': u'\u042a',
- 'hardcy;': u'\u044a',
- 'hArr;': u'\u21d4',
- 'harr;': u'\u2194',
- 'harrcir;': u'\u2948',
- 'harrw;': u'\u21ad',
- 'Hat;': u'^',
- 'hbar;': u'\u210f',
- 'Hcirc;': u'\u0124',
- 'hcirc;': u'\u0125',
- 'hearts;': u'\u2665',
- 'heartsuit;': u'\u2665',
- 'hellip;': u'\u2026',
- 'hercon;': u'\u22b9',
- 'Hfr;': u'\u210c',
- 'hfr;': u'\U0001d525',
- 'HilbertSpace;': u'\u210b',
- 'hksearow;': u'\u2925',
- 'hkswarow;': u'\u2926',
- 'hoarr;': u'\u21ff',
- 'homtht;': u'\u223b',
- 'hookleftarrow;': u'\u21a9',
- 'hookrightarrow;': u'\u21aa',
- 'Hopf;': u'\u210d',
- 'hopf;': u'\U0001d559',
- 'horbar;': u'\u2015',
- 'HorizontalLine;': u'\u2500',
- 'Hscr;': u'\u210b',
- 'hscr;': u'\U0001d4bd',
- 'hslash;': u'\u210f',
- 'Hstrok;': u'\u0126',
- 'hstrok;': u'\u0127',
- 'HumpDownHump;': u'\u224e',
- 'HumpEqual;': u'\u224f',
- 'hybull;': u'\u2043',
- 'hyphen;': u'\u2010',
- 'Iacute': u'\xcd',
- 'iacute': u'\xed',
- 'Iacute;': u'\xcd',
- 'iacute;': u'\xed',
- 'ic;': u'\u2063',
- 'Icirc': u'\xce',
- 'icirc': u'\xee',
- 'Icirc;': u'\xce',
- 'icirc;': u'\xee',
- 'Icy;': u'\u0418',
- 'icy;': u'\u0438',
- 'Idot;': u'\u0130',
- 'IEcy;': u'\u0415',
- 'iecy;': u'\u0435',
- 'iexcl': u'\xa1',
- 'iexcl;': u'\xa1',
- 'iff;': u'\u21d4',
- 'Ifr;': u'\u2111',
- 'ifr;': u'\U0001d526',
- 'Igrave': u'\xcc',
- 'igrave': u'\xec',
- 'Igrave;': u'\xcc',
- 'igrave;': u'\xec',
- 'ii;': u'\u2148',
- 'iiiint;': u'\u2a0c',
- 'iiint;': u'\u222d',
- 'iinfin;': u'\u29dc',
- 'iiota;': u'\u2129',
- 'IJlig;': u'\u0132',
- 'ijlig;': u'\u0133',
- 'Im;': u'\u2111',
- 'Imacr;': u'\u012a',
- 'imacr;': u'\u012b',
- 'image;': u'\u2111',
- 'ImaginaryI;': u'\u2148',
- 'imagline;': u'\u2110',
- 'imagpart;': u'\u2111',
- 'imath;': u'\u0131',
- 'imof;': u'\u22b7',
- 'imped;': u'\u01b5',
- 'Implies;': u'\u21d2',
- 'in;': u'\u2208',
- 'incare;': u'\u2105',
- 'infin;': u'\u221e',
- 'infintie;': u'\u29dd',
- 'inodot;': u'\u0131',
- 'Int;': u'\u222c',
- 'int;': u'\u222b',
- 'intcal;': u'\u22ba',
- 'integers;': u'\u2124',
- 'Integral;': u'\u222b',
- 'intercal;': u'\u22ba',
- 'Intersection;': u'\u22c2',
- 'intlarhk;': u'\u2a17',
- 'intprod;': u'\u2a3c',
- 'InvisibleComma;': u'\u2063',
- 'InvisibleTimes;': u'\u2062',
- 'IOcy;': u'\u0401',
- 'iocy;': u'\u0451',
- 'Iogon;': u'\u012e',
- 'iogon;': u'\u012f',
- 'Iopf;': u'\U0001d540',
- 'iopf;': u'\U0001d55a',
- 'Iota;': u'\u0399',
- 'iota;': u'\u03b9',
- 'iprod;': u'\u2a3c',
- 'iquest': u'\xbf',
- 'iquest;': u'\xbf',
- 'Iscr;': u'\u2110',
- 'iscr;': u'\U0001d4be',
- 'isin;': u'\u2208',
- 'isindot;': u'\u22f5',
- 'isinE;': u'\u22f9',
- 'isins;': u'\u22f4',
- 'isinsv;': u'\u22f3',
- 'isinv;': u'\u2208',
- 'it;': u'\u2062',
- 'Itilde;': u'\u0128',
- 'itilde;': u'\u0129',
- 'Iukcy;': u'\u0406',
- 'iukcy;': u'\u0456',
- 'Iuml': u'\xcf',
- 'iuml': u'\xef',
- 'Iuml;': u'\xcf',
- 'iuml;': u'\xef',
- 'Jcirc;': u'\u0134',
- 'jcirc;': u'\u0135',
- 'Jcy;': u'\u0419',
- 'jcy;': u'\u0439',
- 'Jfr;': u'\U0001d50d',
- 'jfr;': u'\U0001d527',
- 'jmath;': u'\u0237',
- 'Jopf;': u'\U0001d541',
- 'jopf;': u'\U0001d55b',
- 'Jscr;': u'\U0001d4a5',
- 'jscr;': u'\U0001d4bf',
- 'Jsercy;': u'\u0408',
- 'jsercy;': u'\u0458',
- 'Jukcy;': u'\u0404',
- 'jukcy;': u'\u0454',
- 'Kappa;': u'\u039a',
- 'kappa;': u'\u03ba',
- 'kappav;': u'\u03f0',
- 'Kcedil;': u'\u0136',
- 'kcedil;': u'\u0137',
- 'Kcy;': u'\u041a',
- 'kcy;': u'\u043a',
- 'Kfr;': u'\U0001d50e',
- 'kfr;': u'\U0001d528',
- 'kgreen;': u'\u0138',
- 'KHcy;': u'\u0425',
- 'khcy;': u'\u0445',
- 'KJcy;': u'\u040c',
- 'kjcy;': u'\u045c',
- 'Kopf;': u'\U0001d542',
- 'kopf;': u'\U0001d55c',
- 'Kscr;': u'\U0001d4a6',
- 'kscr;': u'\U0001d4c0',
- 'lAarr;': u'\u21da',
- 'Lacute;': u'\u0139',
- 'lacute;': u'\u013a',
- 'laemptyv;': u'\u29b4',
- 'lagran;': u'\u2112',
- 'Lambda;': u'\u039b',
- 'lambda;': u'\u03bb',
- 'Lang;': u'\u27ea',
- 'lang;': u'\u27e8',
- 'langd;': u'\u2991',
- 'langle;': u'\u27e8',
- 'lap;': u'\u2a85',
- 'Laplacetrf;': u'\u2112',
- 'laquo': u'\xab',
- 'laquo;': u'\xab',
- 'Larr;': u'\u219e',
- 'lArr;': u'\u21d0',
- 'larr;': u'\u2190',
- 'larrb;': u'\u21e4',
- 'larrbfs;': u'\u291f',
- 'larrfs;': u'\u291d',
- 'larrhk;': u'\u21a9',
- 'larrlp;': u'\u21ab',
- 'larrpl;': u'\u2939',
- 'larrsim;': u'\u2973',
- 'larrtl;': u'\u21a2',
- 'lat;': u'\u2aab',
- 'lAtail;': u'\u291b',
- 'latail;': u'\u2919',
- 'late;': u'\u2aad',
- 'lates;': u'\u2aad\ufe00',
- 'lBarr;': u'\u290e',
- 'lbarr;': u'\u290c',
- 'lbbrk;': u'\u2772',
- 'lbrace;': u'{',
- 'lbrack;': u'[',
- 'lbrke;': u'\u298b',
- 'lbrksld;': u'\u298f',
- 'lbrkslu;': u'\u298d',
- 'Lcaron;': u'\u013d',
- 'lcaron;': u'\u013e',
- 'Lcedil;': u'\u013b',
- 'lcedil;': u'\u013c',
- 'lceil;': u'\u2308',
- 'lcub;': u'{',
- 'Lcy;': u'\u041b',
- 'lcy;': u'\u043b',
- 'ldca;': u'\u2936',
- 'ldquo;': u'\u201c',
- 'ldquor;': u'\u201e',
- 'ldrdhar;': u'\u2967',
- 'ldrushar;': u'\u294b',
- 'ldsh;': u'\u21b2',
- 'lE;': u'\u2266',
- 'le;': u'\u2264',
- 'LeftAngleBracket;': u'\u27e8',
- 'LeftArrow;': u'\u2190',
- 'Leftarrow;': u'\u21d0',
- 'leftarrow;': u'\u2190',
- 'LeftArrowBar;': u'\u21e4',
- 'LeftArrowRightArrow;': u'\u21c6',
- 'leftarrowtail;': u'\u21a2',
- 'LeftCeiling;': u'\u2308',
- 'LeftDoubleBracket;': u'\u27e6',
- 'LeftDownTeeVector;': u'\u2961',
- 'LeftDownVector;': u'\u21c3',
- 'LeftDownVectorBar;': u'\u2959',
- 'LeftFloor;': u'\u230a',
- 'leftharpoondown;': u'\u21bd',
- 'leftharpoonup;': u'\u21bc',
- 'leftleftarrows;': u'\u21c7',
- 'LeftRightArrow;': u'\u2194',
- 'Leftrightarrow;': u'\u21d4',
- 'leftrightarrow;': u'\u2194',
- 'leftrightarrows;': u'\u21c6',
- 'leftrightharpoons;': u'\u21cb',
- 'leftrightsquigarrow;': u'\u21ad',
- 'LeftRightVector;': u'\u294e',
- 'LeftTee;': u'\u22a3',
- 'LeftTeeArrow;': u'\u21a4',
- 'LeftTeeVector;': u'\u295a',
- 'leftthreetimes;': u'\u22cb',
- 'LeftTriangle;': u'\u22b2',
- 'LeftTriangleBar;': u'\u29cf',
- 'LeftTriangleEqual;': u'\u22b4',
- 'LeftUpDownVector;': u'\u2951',
- 'LeftUpTeeVector;': u'\u2960',
- 'LeftUpVector;': u'\u21bf',
- 'LeftUpVectorBar;': u'\u2958',
- 'LeftVector;': u'\u21bc',
- 'LeftVectorBar;': u'\u2952',
- 'lEg;': u'\u2a8b',
- 'leg;': u'\u22da',
- 'leq;': u'\u2264',
- 'leqq;': u'\u2266',
- 'leqslant;': u'\u2a7d',
- 'les;': u'\u2a7d',
- 'lescc;': u'\u2aa8',
- 'lesdot;': u'\u2a7f',
- 'lesdoto;': u'\u2a81',
- 'lesdotor;': u'\u2a83',
- 'lesg;': u'\u22da\ufe00',
- 'lesges;': u'\u2a93',
- 'lessapprox;': u'\u2a85',
- 'lessdot;': u'\u22d6',
- 'lesseqgtr;': u'\u22da',
- 'lesseqqgtr;': u'\u2a8b',
- 'LessEqualGreater;': u'\u22da',
- 'LessFullEqual;': u'\u2266',
- 'LessGreater;': u'\u2276',
- 'lessgtr;': u'\u2276',
- 'LessLess;': u'\u2aa1',
- 'lesssim;': u'\u2272',
- 'LessSlantEqual;': u'\u2a7d',
- 'LessTilde;': u'\u2272',
- 'lfisht;': u'\u297c',
- 'lfloor;': u'\u230a',
- 'Lfr;': u'\U0001d50f',
- 'lfr;': u'\U0001d529',
- 'lg;': u'\u2276',
- 'lgE;': u'\u2a91',
- 'lHar;': u'\u2962',
- 'lhard;': u'\u21bd',
- 'lharu;': u'\u21bc',
- 'lharul;': u'\u296a',
- 'lhblk;': u'\u2584',
- 'LJcy;': u'\u0409',
- 'ljcy;': u'\u0459',
- 'Ll;': u'\u22d8',
- 'll;': u'\u226a',
- 'llarr;': u'\u21c7',
- 'llcorner;': u'\u231e',
- 'Lleftarrow;': u'\u21da',
- 'llhard;': u'\u296b',
- 'lltri;': u'\u25fa',
- 'Lmidot;': u'\u013f',
- 'lmidot;': u'\u0140',
- 'lmoust;': u'\u23b0',
- 'lmoustache;': u'\u23b0',
- 'lnap;': u'\u2a89',
- 'lnapprox;': u'\u2a89',
- 'lnE;': u'\u2268',
- 'lne;': u'\u2a87',
- 'lneq;': u'\u2a87',
- 'lneqq;': u'\u2268',
- 'lnsim;': u'\u22e6',
- 'loang;': u'\u27ec',
- 'loarr;': u'\u21fd',
- 'lobrk;': u'\u27e6',
- 'LongLeftArrow;': u'\u27f5',
- 'Longleftarrow;': u'\u27f8',
- 'longleftarrow;': u'\u27f5',
- 'LongLeftRightArrow;': u'\u27f7',
- 'Longleftrightarrow;': u'\u27fa',
- 'longleftrightarrow;': u'\u27f7',
- 'longmapsto;': u'\u27fc',
- 'LongRightArrow;': u'\u27f6',
- 'Longrightarrow;': u'\u27f9',
- 'longrightarrow;': u'\u27f6',
- 'looparrowleft;': u'\u21ab',
- 'looparrowright;': u'\u21ac',
- 'lopar;': u'\u2985',
- 'Lopf;': u'\U0001d543',
- 'lopf;': u'\U0001d55d',
- 'loplus;': u'\u2a2d',
- 'lotimes;': u'\u2a34',
- 'lowast;': u'\u2217',
- 'lowbar;': u'_',
- 'LowerLeftArrow;': u'\u2199',
- 'LowerRightArrow;': u'\u2198',
- 'loz;': u'\u25ca',
- 'lozenge;': u'\u25ca',
- 'lozf;': u'\u29eb',
- 'lpar;': u'(',
- 'lparlt;': u'\u2993',
- 'lrarr;': u'\u21c6',
- 'lrcorner;': u'\u231f',
- 'lrhar;': u'\u21cb',
- 'lrhard;': u'\u296d',
- 'lrm;': u'\u200e',
- 'lrtri;': u'\u22bf',
- 'lsaquo;': u'\u2039',
- 'Lscr;': u'\u2112',
- 'lscr;': u'\U0001d4c1',
- 'Lsh;': u'\u21b0',
- 'lsh;': u'\u21b0',
- 'lsim;': u'\u2272',
- 'lsime;': u'\u2a8d',
- 'lsimg;': u'\u2a8f',
- 'lsqb;': u'[',
- 'lsquo;': u'\u2018',
- 'lsquor;': u'\u201a',
- 'Lstrok;': u'\u0141',
- 'lstrok;': u'\u0142',
- 'LT': u'<',
- 'lt': u'<',
- 'LT;': u'<',
- 'Lt;': u'\u226a',
- 'lt;': u'<',
- 'ltcc;': u'\u2aa6',
- 'ltcir;': u'\u2a79',
- 'ltdot;': u'\u22d6',
- 'lthree;': u'\u22cb',
- 'ltimes;': u'\u22c9',
- 'ltlarr;': u'\u2976',
- 'ltquest;': u'\u2a7b',
- 'ltri;': u'\u25c3',
- 'ltrie;': u'\u22b4',
- 'ltrif;': u'\u25c2',
- 'ltrPar;': u'\u2996',
- 'lurdshar;': u'\u294a',
- 'luruhar;': u'\u2966',
- 'lvertneqq;': u'\u2268\ufe00',
- 'lvnE;': u'\u2268\ufe00',
- 'macr': u'\xaf',
- 'macr;': u'\xaf',
- 'male;': u'\u2642',
- 'malt;': u'\u2720',
- 'maltese;': u'\u2720',
- 'Map;': u'\u2905',
- 'map;': u'\u21a6',
- 'mapsto;': u'\u21a6',
- 'mapstodown;': u'\u21a7',
- 'mapstoleft;': u'\u21a4',
- 'mapstoup;': u'\u21a5',
- 'marker;': u'\u25ae',
- 'mcomma;': u'\u2a29',
- 'Mcy;': u'\u041c',
- 'mcy;': u'\u043c',
- 'mdash;': u'\u2014',
- 'mDDot;': u'\u223a',
- 'measuredangle;': u'\u2221',
- 'MediumSpace;': u'\u205f',
- 'Mellintrf;': u'\u2133',
- 'Mfr;': u'\U0001d510',
- 'mfr;': u'\U0001d52a',
- 'mho;': u'\u2127',
- 'micro': u'\xb5',
- 'micro;': u'\xb5',
- 'mid;': u'\u2223',
- 'midast;': u'*',
- 'midcir;': u'\u2af0',
- 'middot': u'\xb7',
- 'middot;': u'\xb7',
- 'minus;': u'\u2212',
- 'minusb;': u'\u229f',
- 'minusd;': u'\u2238',
- 'minusdu;': u'\u2a2a',
- 'MinusPlus;': u'\u2213',
- 'mlcp;': u'\u2adb',
- 'mldr;': u'\u2026',
- 'mnplus;': u'\u2213',
- 'models;': u'\u22a7',
- 'Mopf;': u'\U0001d544',
- 'mopf;': u'\U0001d55e',
- 'mp;': u'\u2213',
- 'Mscr;': u'\u2133',
- 'mscr;': u'\U0001d4c2',
- 'mstpos;': u'\u223e',
- 'Mu;': u'\u039c',
- 'mu;': u'\u03bc',
- 'multimap;': u'\u22b8',
- 'mumap;': u'\u22b8',
- 'nabla;': u'\u2207',
- 'Nacute;': u'\u0143',
- 'nacute;': u'\u0144',
- 'nang;': u'\u2220\u20d2',
- 'nap;': u'\u2249',
- 'napE;': u'\u2a70\u0338',
- 'napid;': u'\u224b\u0338',
- 'napos;': u'\u0149',
- 'napprox;': u'\u2249',
- 'natur;': u'\u266e',
- 'natural;': u'\u266e',
- 'naturals;': u'\u2115',
- 'nbsp': u'\xa0',
- 'nbsp;': u'\xa0',
- 'nbump;': u'\u224e\u0338',
- 'nbumpe;': u'\u224f\u0338',
- 'ncap;': u'\u2a43',
- 'Ncaron;': u'\u0147',
- 'ncaron;': u'\u0148',
- 'Ncedil;': u'\u0145',
- 'ncedil;': u'\u0146',
- 'ncong;': u'\u2247',
- 'ncongdot;': u'\u2a6d\u0338',
- 'ncup;': u'\u2a42',
- 'Ncy;': u'\u041d',
- 'ncy;': u'\u043d',
- 'ndash;': u'\u2013',
- 'ne;': u'\u2260',
- 'nearhk;': u'\u2924',
- 'neArr;': u'\u21d7',
- 'nearr;': u'\u2197',
- 'nearrow;': u'\u2197',
- 'nedot;': u'\u2250\u0338',
- 'NegativeMediumSpace;': u'\u200b',
- 'NegativeThickSpace;': u'\u200b',
- 'NegativeThinSpace;': u'\u200b',
- 'NegativeVeryThinSpace;': u'\u200b',
- 'nequiv;': u'\u2262',
- 'nesear;': u'\u2928',
- 'nesim;': u'\u2242\u0338',
- 'NestedGreaterGreater;': u'\u226b',
- 'NestedLessLess;': u'\u226a',
- 'NewLine;': u'\n',
- 'nexist;': u'\u2204',
- 'nexists;': u'\u2204',
- 'Nfr;': u'\U0001d511',
- 'nfr;': u'\U0001d52b',
- 'ngE;': u'\u2267\u0338',
- 'nge;': u'\u2271',
- 'ngeq;': u'\u2271',
- 'ngeqq;': u'\u2267\u0338',
- 'ngeqslant;': u'\u2a7e\u0338',
- 'nges;': u'\u2a7e\u0338',
- 'nGg;': u'\u22d9\u0338',
- 'ngsim;': u'\u2275',
- 'nGt;': u'\u226b\u20d2',
- 'ngt;': u'\u226f',
- 'ngtr;': u'\u226f',
- 'nGtv;': u'\u226b\u0338',
- 'nhArr;': u'\u21ce',
- 'nharr;': u'\u21ae',
- 'nhpar;': u'\u2af2',
- 'ni;': u'\u220b',
- 'nis;': u'\u22fc',
- 'nisd;': u'\u22fa',
- 'niv;': u'\u220b',
- 'NJcy;': u'\u040a',
- 'njcy;': u'\u045a',
- 'nlArr;': u'\u21cd',
- 'nlarr;': u'\u219a',
- 'nldr;': u'\u2025',
- 'nlE;': u'\u2266\u0338',
- 'nle;': u'\u2270',
- 'nLeftarrow;': u'\u21cd',
- 'nleftarrow;': u'\u219a',
- 'nLeftrightarrow;': u'\u21ce',
- 'nleftrightarrow;': u'\u21ae',
- 'nleq;': u'\u2270',
- 'nleqq;': u'\u2266\u0338',
- 'nleqslant;': u'\u2a7d\u0338',
- 'nles;': u'\u2a7d\u0338',
- 'nless;': u'\u226e',
- 'nLl;': u'\u22d8\u0338',
- 'nlsim;': u'\u2274',
- 'nLt;': u'\u226a\u20d2',
- 'nlt;': u'\u226e',
- 'nltri;': u'\u22ea',
- 'nltrie;': u'\u22ec',
- 'nLtv;': u'\u226a\u0338',
- 'nmid;': u'\u2224',
- 'NoBreak;': u'\u2060',
- 'NonBreakingSpace;': u'\xa0',
- 'Nopf;': u'\u2115',
- 'nopf;': u'\U0001d55f',
- 'not': u'\xac',
- 'Not;': u'\u2aec',
- 'not;': u'\xac',
- 'NotCongruent;': u'\u2262',
- 'NotCupCap;': u'\u226d',
- 'NotDoubleVerticalBar;': u'\u2226',
- 'NotElement;': u'\u2209',
- 'NotEqual;': u'\u2260',
- 'NotEqualTilde;': u'\u2242\u0338',
- 'NotExists;': u'\u2204',
- 'NotGreater;': u'\u226f',
- 'NotGreaterEqual;': u'\u2271',
- 'NotGreaterFullEqual;': u'\u2267\u0338',
- 'NotGreaterGreater;': u'\u226b\u0338',
- 'NotGreaterLess;': u'\u2279',
- 'NotGreaterSlantEqual;': u'\u2a7e\u0338',
- 'NotGreaterTilde;': u'\u2275',
- 'NotHumpDownHump;': u'\u224e\u0338',
- 'NotHumpEqual;': u'\u224f\u0338',
- 'notin;': u'\u2209',
- 'notindot;': u'\u22f5\u0338',
- 'notinE;': u'\u22f9\u0338',
- 'notinva;': u'\u2209',
- 'notinvb;': u'\u22f7',
- 'notinvc;': u'\u22f6',
- 'NotLeftTriangle;': u'\u22ea',
- 'NotLeftTriangleBar;': u'\u29cf\u0338',
- 'NotLeftTriangleEqual;': u'\u22ec',
- 'NotLess;': u'\u226e',
- 'NotLessEqual;': u'\u2270',
- 'NotLessGreater;': u'\u2278',
- 'NotLessLess;': u'\u226a\u0338',
- 'NotLessSlantEqual;': u'\u2a7d\u0338',
- 'NotLessTilde;': u'\u2274',
- 'NotNestedGreaterGreater;': u'\u2aa2\u0338',
- 'NotNestedLessLess;': u'\u2aa1\u0338',
- 'notni;': u'\u220c',
- 'notniva;': u'\u220c',
- 'notnivb;': u'\u22fe',
- 'notnivc;': u'\u22fd',
- 'NotPrecedes;': u'\u2280',
- 'NotPrecedesEqual;': u'\u2aaf\u0338',
- 'NotPrecedesSlantEqual;': u'\u22e0',
- 'NotReverseElement;': u'\u220c',
- 'NotRightTriangle;': u'\u22eb',
- 'NotRightTriangleBar;': u'\u29d0\u0338',
- 'NotRightTriangleEqual;': u'\u22ed',
- 'NotSquareSubset;': u'\u228f\u0338',
- 'NotSquareSubsetEqual;': u'\u22e2',
- 'NotSquareSuperset;': u'\u2290\u0338',
- 'NotSquareSupersetEqual;': u'\u22e3',
- 'NotSubset;': u'\u2282\u20d2',
- 'NotSubsetEqual;': u'\u2288',
- 'NotSucceeds;': u'\u2281',
- 'NotSucceedsEqual;': u'\u2ab0\u0338',
- 'NotSucceedsSlantEqual;': u'\u22e1',
- 'NotSucceedsTilde;': u'\u227f\u0338',
- 'NotSuperset;': u'\u2283\u20d2',
- 'NotSupersetEqual;': u'\u2289',
- 'NotTilde;': u'\u2241',
- 'NotTildeEqual;': u'\u2244',
- 'NotTildeFullEqual;': u'\u2247',
- 'NotTildeTilde;': u'\u2249',
- 'NotVerticalBar;': u'\u2224',
- 'npar;': u'\u2226',
- 'nparallel;': u'\u2226',
- 'nparsl;': u'\u2afd\u20e5',
- 'npart;': u'\u2202\u0338',
- 'npolint;': u'\u2a14',
- 'npr;': u'\u2280',
- 'nprcue;': u'\u22e0',
- 'npre;': u'\u2aaf\u0338',
- 'nprec;': u'\u2280',
- 'npreceq;': u'\u2aaf\u0338',
- 'nrArr;': u'\u21cf',
- 'nrarr;': u'\u219b',
- 'nrarrc;': u'\u2933\u0338',
- 'nrarrw;': u'\u219d\u0338',
- 'nRightarrow;': u'\u21cf',
- 'nrightarrow;': u'\u219b',
- 'nrtri;': u'\u22eb',
- 'nrtrie;': u'\u22ed',
- 'nsc;': u'\u2281',
- 'nsccue;': u'\u22e1',
- 'nsce;': u'\u2ab0\u0338',
- 'Nscr;': u'\U0001d4a9',
- 'nscr;': u'\U0001d4c3',
- 'nshortmid;': u'\u2224',
- 'nshortparallel;': u'\u2226',
- 'nsim;': u'\u2241',
- 'nsime;': u'\u2244',
- 'nsimeq;': u'\u2244',
- 'nsmid;': u'\u2224',
- 'nspar;': u'\u2226',
- 'nsqsube;': u'\u22e2',
- 'nsqsupe;': u'\u22e3',
- 'nsub;': u'\u2284',
- 'nsubE;': u'\u2ac5\u0338',
- 'nsube;': u'\u2288',
- 'nsubset;': u'\u2282\u20d2',
- 'nsubseteq;': u'\u2288',
- 'nsubseteqq;': u'\u2ac5\u0338',
- 'nsucc;': u'\u2281',
- 'nsucceq;': u'\u2ab0\u0338',
- 'nsup;': u'\u2285',
- 'nsupE;': u'\u2ac6\u0338',
- 'nsupe;': u'\u2289',
- 'nsupset;': u'\u2283\u20d2',
- 'nsupseteq;': u'\u2289',
- 'nsupseteqq;': u'\u2ac6\u0338',
- 'ntgl;': u'\u2279',
- 'Ntilde': u'\xd1',
- 'ntilde': u'\xf1',
- 'Ntilde;': u'\xd1',
- 'ntilde;': u'\xf1',
- 'ntlg;': u'\u2278',
- 'ntriangleleft;': u'\u22ea',
- 'ntrianglelefteq;': u'\u22ec',
- 'ntriangleright;': u'\u22eb',
- 'ntrianglerighteq;': u'\u22ed',
- 'Nu;': u'\u039d',
- 'nu;': u'\u03bd',
- 'num;': u'#',
- 'numero;': u'\u2116',
- 'numsp;': u'\u2007',
- 'nvap;': u'\u224d\u20d2',
- 'nVDash;': u'\u22af',
- 'nVdash;': u'\u22ae',
- 'nvDash;': u'\u22ad',
- 'nvdash;': u'\u22ac',
- 'nvge;': u'\u2265\u20d2',
- 'nvgt;': u'>\u20d2',
- 'nvHarr;': u'\u2904',
- 'nvinfin;': u'\u29de',
- 'nvlArr;': u'\u2902',
- 'nvle;': u'\u2264\u20d2',
- 'nvlt;': u'<\u20d2',
- 'nvltrie;': u'\u22b4\u20d2',
- 'nvrArr;': u'\u2903',
- 'nvrtrie;': u'\u22b5\u20d2',
- 'nvsim;': u'\u223c\u20d2',
- 'nwarhk;': u'\u2923',
- 'nwArr;': u'\u21d6',
- 'nwarr;': u'\u2196',
- 'nwarrow;': u'\u2196',
- 'nwnear;': u'\u2927',
- 'Oacute': u'\xd3',
- 'oacute': u'\xf3',
- 'Oacute;': u'\xd3',
- 'oacute;': u'\xf3',
- 'oast;': u'\u229b',
- 'ocir;': u'\u229a',
- 'Ocirc': u'\xd4',
- 'ocirc': u'\xf4',
- 'Ocirc;': u'\xd4',
- 'ocirc;': u'\xf4',
- 'Ocy;': u'\u041e',
- 'ocy;': u'\u043e',
- 'odash;': u'\u229d',
- 'Odblac;': u'\u0150',
- 'odblac;': u'\u0151',
- 'odiv;': u'\u2a38',
- 'odot;': u'\u2299',
- 'odsold;': u'\u29bc',
- 'OElig;': u'\u0152',
- 'oelig;': u'\u0153',
- 'ofcir;': u'\u29bf',
- 'Ofr;': u'\U0001d512',
- 'ofr;': u'\U0001d52c',
- 'ogon;': u'\u02db',
- 'Ograve': u'\xd2',
- 'ograve': u'\xf2',
- 'Ograve;': u'\xd2',
- 'ograve;': u'\xf2',
- 'ogt;': u'\u29c1',
- 'ohbar;': u'\u29b5',
- 'ohm;': u'\u03a9',
- 'oint;': u'\u222e',
- 'olarr;': u'\u21ba',
- 'olcir;': u'\u29be',
- 'olcross;': u'\u29bb',
- 'oline;': u'\u203e',
- 'olt;': u'\u29c0',
- 'Omacr;': u'\u014c',
- 'omacr;': u'\u014d',
- 'Omega;': u'\u03a9',
- 'omega;': u'\u03c9',
- 'Omicron;': u'\u039f',
- 'omicron;': u'\u03bf',
- 'omid;': u'\u29b6',
- 'ominus;': u'\u2296',
- 'Oopf;': u'\U0001d546',
- 'oopf;': u'\U0001d560',
- 'opar;': u'\u29b7',
- 'OpenCurlyDoubleQuote;': u'\u201c',
- 'OpenCurlyQuote;': u'\u2018',
- 'operp;': u'\u29b9',
- 'oplus;': u'\u2295',
- 'Or;': u'\u2a54',
- 'or;': u'\u2228',
- 'orarr;': u'\u21bb',
- 'ord;': u'\u2a5d',
- 'order;': u'\u2134',
- 'orderof;': u'\u2134',
- 'ordf': u'\xaa',
- 'ordf;': u'\xaa',
- 'ordm': u'\xba',
- 'ordm;': u'\xba',
- 'origof;': u'\u22b6',
- 'oror;': u'\u2a56',
- 'orslope;': u'\u2a57',
- 'orv;': u'\u2a5b',
- 'oS;': u'\u24c8',
- 'Oscr;': u'\U0001d4aa',
- 'oscr;': u'\u2134',
- 'Oslash': u'\xd8',
- 'oslash': u'\xf8',
- 'Oslash;': u'\xd8',
- 'oslash;': u'\xf8',
- 'osol;': u'\u2298',
- 'Otilde': u'\xd5',
- 'otilde': u'\xf5',
- 'Otilde;': u'\xd5',
- 'otilde;': u'\xf5',
- 'Otimes;': u'\u2a37',
- 'otimes;': u'\u2297',
- 'otimesas;': u'\u2a36',
- 'Ouml': u'\xd6',
- 'ouml': u'\xf6',
- 'Ouml;': u'\xd6',
- 'ouml;': u'\xf6',
- 'ovbar;': u'\u233d',
- 'OverBar;': u'\u203e',
- 'OverBrace;': u'\u23de',
- 'OverBracket;': u'\u23b4',
- 'OverParenthesis;': u'\u23dc',
- 'par;': u'\u2225',
- 'para': u'\xb6',
- 'para;': u'\xb6',
- 'parallel;': u'\u2225',
- 'parsim;': u'\u2af3',
- 'parsl;': u'\u2afd',
- 'part;': u'\u2202',
- 'PartialD;': u'\u2202',
- 'Pcy;': u'\u041f',
- 'pcy;': u'\u043f',
- 'percnt;': u'%',
- 'period;': u'.',
- 'permil;': u'\u2030',
- 'perp;': u'\u22a5',
- 'pertenk;': u'\u2031',
- 'Pfr;': u'\U0001d513',
- 'pfr;': u'\U0001d52d',
- 'Phi;': u'\u03a6',
- 'phi;': u'\u03c6',
- 'phiv;': u'\u03d5',
- 'phmmat;': u'\u2133',
- 'phone;': u'\u260e',
- 'Pi;': u'\u03a0',
- 'pi;': u'\u03c0',
- 'pitchfork;': u'\u22d4',
- 'piv;': u'\u03d6',
- 'planck;': u'\u210f',
- 'planckh;': u'\u210e',
- 'plankv;': u'\u210f',
- 'plus;': u'+',
- 'plusacir;': u'\u2a23',
- 'plusb;': u'\u229e',
- 'pluscir;': u'\u2a22',
- 'plusdo;': u'\u2214',
- 'plusdu;': u'\u2a25',
- 'pluse;': u'\u2a72',
- 'PlusMinus;': u'\xb1',
- 'plusmn': u'\xb1',
- 'plusmn;': u'\xb1',
- 'plussim;': u'\u2a26',
- 'plustwo;': u'\u2a27',
- 'pm;': u'\xb1',
- 'Poincareplane;': u'\u210c',
- 'pointint;': u'\u2a15',
- 'Popf;': u'\u2119',
- 'popf;': u'\U0001d561',
- 'pound': u'\xa3',
- 'pound;': u'\xa3',
- 'Pr;': u'\u2abb',
- 'pr;': u'\u227a',
- 'prap;': u'\u2ab7',
- 'prcue;': u'\u227c',
- 'prE;': u'\u2ab3',
- 'pre;': u'\u2aaf',
- 'prec;': u'\u227a',
- 'precapprox;': u'\u2ab7',
- 'preccurlyeq;': u'\u227c',
- 'Precedes;': u'\u227a',
- 'PrecedesEqual;': u'\u2aaf',
- 'PrecedesSlantEqual;': u'\u227c',
- 'PrecedesTilde;': u'\u227e',
- 'preceq;': u'\u2aaf',
- 'precnapprox;': u'\u2ab9',
- 'precneqq;': u'\u2ab5',
- 'precnsim;': u'\u22e8',
- 'precsim;': u'\u227e',
- 'Prime;': u'\u2033',
- 'prime;': u'\u2032',
- 'primes;': u'\u2119',
- 'prnap;': u'\u2ab9',
- 'prnE;': u'\u2ab5',
- 'prnsim;': u'\u22e8',
- 'prod;': u'\u220f',
- 'Product;': u'\u220f',
- 'profalar;': u'\u232e',
- 'profline;': u'\u2312',
- 'profsurf;': u'\u2313',
- 'prop;': u'\u221d',
- 'Proportion;': u'\u2237',
- 'Proportional;': u'\u221d',
- 'propto;': u'\u221d',
- 'prsim;': u'\u227e',
- 'prurel;': u'\u22b0',
- 'Pscr;': u'\U0001d4ab',
- 'pscr;': u'\U0001d4c5',
- 'Psi;': u'\u03a8',
- 'psi;': u'\u03c8',
- 'puncsp;': u'\u2008',
- 'Qfr;': u'\U0001d514',
- 'qfr;': u'\U0001d52e',
- 'qint;': u'\u2a0c',
- 'Qopf;': u'\u211a',
- 'qopf;': u'\U0001d562',
- 'qprime;': u'\u2057',
- 'Qscr;': u'\U0001d4ac',
- 'qscr;': u'\U0001d4c6',
- 'quaternions;': u'\u210d',
- 'quatint;': u'\u2a16',
- 'quest;': u'?',
- 'questeq;': u'\u225f',
- 'QUOT': u'"',
- 'quot': u'"',
- 'QUOT;': u'"',
- 'quot;': u'"',
- 'rAarr;': u'\u21db',
- 'race;': u'\u223d\u0331',
- 'Racute;': u'\u0154',
- 'racute;': u'\u0155',
- 'radic;': u'\u221a',
- 'raemptyv;': u'\u29b3',
- 'Rang;': u'\u27eb',
- 'rang;': u'\u27e9',
- 'rangd;': u'\u2992',
- 'range;': u'\u29a5',
- 'rangle;': u'\u27e9',
- 'raquo': u'\xbb',
- 'raquo;': u'\xbb',
- 'Rarr;': u'\u21a0',
- 'rArr;': u'\u21d2',
- 'rarr;': u'\u2192',
- 'rarrap;': u'\u2975',
- 'rarrb;': u'\u21e5',
- 'rarrbfs;': u'\u2920',
- 'rarrc;': u'\u2933',
- 'rarrfs;': u'\u291e',
- 'rarrhk;': u'\u21aa',
- 'rarrlp;': u'\u21ac',
- 'rarrpl;': u'\u2945',
- 'rarrsim;': u'\u2974',
- 'Rarrtl;': u'\u2916',
- 'rarrtl;': u'\u21a3',
- 'rarrw;': u'\u219d',
- 'rAtail;': u'\u291c',
- 'ratail;': u'\u291a',
- 'ratio;': u'\u2236',
- 'rationals;': u'\u211a',
- 'RBarr;': u'\u2910',
- 'rBarr;': u'\u290f',
- 'rbarr;': u'\u290d',
- 'rbbrk;': u'\u2773',
- 'rbrace;': u'}',
- 'rbrack;': u']',
- 'rbrke;': u'\u298c',
- 'rbrksld;': u'\u298e',
- 'rbrkslu;': u'\u2990',
- 'Rcaron;': u'\u0158',
- 'rcaron;': u'\u0159',
- 'Rcedil;': u'\u0156',
- 'rcedil;': u'\u0157',
- 'rceil;': u'\u2309',
- 'rcub;': u'}',
- 'Rcy;': u'\u0420',
- 'rcy;': u'\u0440',
- 'rdca;': u'\u2937',
- 'rdldhar;': u'\u2969',
- 'rdquo;': u'\u201d',
- 'rdquor;': u'\u201d',
- 'rdsh;': u'\u21b3',
- 'Re;': u'\u211c',
- 'real;': u'\u211c',
- 'realine;': u'\u211b',
- 'realpart;': u'\u211c',
- 'reals;': u'\u211d',
- 'rect;': u'\u25ad',
- 'REG': u'\xae',
- 'reg': u'\xae',
- 'REG;': u'\xae',
- 'reg;': u'\xae',
- 'ReverseElement;': u'\u220b',
- 'ReverseEquilibrium;': u'\u21cb',
- 'ReverseUpEquilibrium;': u'\u296f',
- 'rfisht;': u'\u297d',
- 'rfloor;': u'\u230b',
- 'Rfr;': u'\u211c',
- 'rfr;': u'\U0001d52f',
- 'rHar;': u'\u2964',
- 'rhard;': u'\u21c1',
- 'rharu;': u'\u21c0',
- 'rharul;': u'\u296c',
- 'Rho;': u'\u03a1',
- 'rho;': u'\u03c1',
- 'rhov;': u'\u03f1',
- 'RightAngleBracket;': u'\u27e9',
- 'RightArrow;': u'\u2192',
- 'Rightarrow;': u'\u21d2',
- 'rightarrow;': u'\u2192',
- 'RightArrowBar;': u'\u21e5',
- 'RightArrowLeftArrow;': u'\u21c4',
- 'rightarrowtail;': u'\u21a3',
- 'RightCeiling;': u'\u2309',
- 'RightDoubleBracket;': u'\u27e7',
- 'RightDownTeeVector;': u'\u295d',
- 'RightDownVector;': u'\u21c2',
- 'RightDownVectorBar;': u'\u2955',
- 'RightFloor;': u'\u230b',
- 'rightharpoondown;': u'\u21c1',
- 'rightharpoonup;': u'\u21c0',
- 'rightleftarrows;': u'\u21c4',
- 'rightleftharpoons;': u'\u21cc',
- 'rightrightarrows;': u'\u21c9',
- 'rightsquigarrow;': u'\u219d',
- 'RightTee;': u'\u22a2',
- 'RightTeeArrow;': u'\u21a6',
- 'RightTeeVector;': u'\u295b',
- 'rightthreetimes;': u'\u22cc',
- 'RightTriangle;': u'\u22b3',
- 'RightTriangleBar;': u'\u29d0',
- 'RightTriangleEqual;': u'\u22b5',
- 'RightUpDownVector;': u'\u294f',
- 'RightUpTeeVector;': u'\u295c',
- 'RightUpVector;': u'\u21be',
- 'RightUpVectorBar;': u'\u2954',
- 'RightVector;': u'\u21c0',
- 'RightVectorBar;': u'\u2953',
- 'ring;': u'\u02da',
- 'risingdotseq;': u'\u2253',
- 'rlarr;': u'\u21c4',
- 'rlhar;': u'\u21cc',
- 'rlm;': u'\u200f',
- 'rmoust;': u'\u23b1',
- 'rmoustache;': u'\u23b1',
- 'rnmid;': u'\u2aee',
- 'roang;': u'\u27ed',
- 'roarr;': u'\u21fe',
- 'robrk;': u'\u27e7',
- 'ropar;': u'\u2986',
- 'Ropf;': u'\u211d',
- 'ropf;': u'\U0001d563',
- 'roplus;': u'\u2a2e',
- 'rotimes;': u'\u2a35',
- 'RoundImplies;': u'\u2970',
- 'rpar;': u')',
- 'rpargt;': u'\u2994',
- 'rppolint;': u'\u2a12',
- 'rrarr;': u'\u21c9',
- 'Rrightarrow;': u'\u21db',
- 'rsaquo;': u'\u203a',
- 'Rscr;': u'\u211b',
- 'rscr;': u'\U0001d4c7',
- 'Rsh;': u'\u21b1',
- 'rsh;': u'\u21b1',
- 'rsqb;': u']',
- 'rsquo;': u'\u2019',
- 'rsquor;': u'\u2019',
- 'rthree;': u'\u22cc',
- 'rtimes;': u'\u22ca',
- 'rtri;': u'\u25b9',
- 'rtrie;': u'\u22b5',
- 'rtrif;': u'\u25b8',
- 'rtriltri;': u'\u29ce',
- 'RuleDelayed;': u'\u29f4',
- 'ruluhar;': u'\u2968',
- 'rx;': u'\u211e',
- 'Sacute;': u'\u015a',
- 'sacute;': u'\u015b',
- 'sbquo;': u'\u201a',
- 'Sc;': u'\u2abc',
- 'sc;': u'\u227b',
- 'scap;': u'\u2ab8',
- 'Scaron;': u'\u0160',
- 'scaron;': u'\u0161',
- 'sccue;': u'\u227d',
- 'scE;': u'\u2ab4',
- 'sce;': u'\u2ab0',
- 'Scedil;': u'\u015e',
- 'scedil;': u'\u015f',
- 'Scirc;': u'\u015c',
- 'scirc;': u'\u015d',
- 'scnap;': u'\u2aba',
- 'scnE;': u'\u2ab6',
- 'scnsim;': u'\u22e9',
- 'scpolint;': u'\u2a13',
- 'scsim;': u'\u227f',
- 'Scy;': u'\u0421',
- 'scy;': u'\u0441',
- 'sdot;': u'\u22c5',
- 'sdotb;': u'\u22a1',
- 'sdote;': u'\u2a66',
- 'searhk;': u'\u2925',
- 'seArr;': u'\u21d8',
- 'searr;': u'\u2198',
- 'searrow;': u'\u2198',
- 'sect': u'\xa7',
- 'sect;': u'\xa7',
- 'semi;': u';',
- 'seswar;': u'\u2929',
- 'setminus;': u'\u2216',
- 'setmn;': u'\u2216',
- 'sext;': u'\u2736',
- 'Sfr;': u'\U0001d516',
- 'sfr;': u'\U0001d530',
- 'sfrown;': u'\u2322',
- 'sharp;': u'\u266f',
- 'SHCHcy;': u'\u0429',
- 'shchcy;': u'\u0449',
- 'SHcy;': u'\u0428',
- 'shcy;': u'\u0448',
- 'ShortDownArrow;': u'\u2193',
- 'ShortLeftArrow;': u'\u2190',
- 'shortmid;': u'\u2223',
- 'shortparallel;': u'\u2225',
- 'ShortRightArrow;': u'\u2192',
- 'ShortUpArrow;': u'\u2191',
- 'shy': u'\xad',
- 'shy;': u'\xad',
- 'Sigma;': u'\u03a3',
- 'sigma;': u'\u03c3',
- 'sigmaf;': u'\u03c2',
- 'sigmav;': u'\u03c2',
- 'sim;': u'\u223c',
- 'simdot;': u'\u2a6a',
- 'sime;': u'\u2243',
- 'simeq;': u'\u2243',
- 'simg;': u'\u2a9e',
- 'simgE;': u'\u2aa0',
- 'siml;': u'\u2a9d',
- 'simlE;': u'\u2a9f',
- 'simne;': u'\u2246',
- 'simplus;': u'\u2a24',
- 'simrarr;': u'\u2972',
- 'slarr;': u'\u2190',
- 'SmallCircle;': u'\u2218',
- 'smallsetminus;': u'\u2216',
- 'smashp;': u'\u2a33',
- 'smeparsl;': u'\u29e4',
- 'smid;': u'\u2223',
- 'smile;': u'\u2323',
- 'smt;': u'\u2aaa',
- 'smte;': u'\u2aac',
- 'smtes;': u'\u2aac\ufe00',
- 'SOFTcy;': u'\u042c',
- 'softcy;': u'\u044c',
- 'sol;': u'/',
- 'solb;': u'\u29c4',
- 'solbar;': u'\u233f',
- 'Sopf;': u'\U0001d54a',
- 'sopf;': u'\U0001d564',
- 'spades;': u'\u2660',
- 'spadesuit;': u'\u2660',
- 'spar;': u'\u2225',
- 'sqcap;': u'\u2293',
- 'sqcaps;': u'\u2293\ufe00',
- 'sqcup;': u'\u2294',
- 'sqcups;': u'\u2294\ufe00',
- 'Sqrt;': u'\u221a',
- 'sqsub;': u'\u228f',
- 'sqsube;': u'\u2291',
- 'sqsubset;': u'\u228f',
- 'sqsubseteq;': u'\u2291',
- 'sqsup;': u'\u2290',
- 'sqsupe;': u'\u2292',
- 'sqsupset;': u'\u2290',
- 'sqsupseteq;': u'\u2292',
- 'squ;': u'\u25a1',
- 'Square;': u'\u25a1',
- 'square;': u'\u25a1',
- 'SquareIntersection;': u'\u2293',
- 'SquareSubset;': u'\u228f',
- 'SquareSubsetEqual;': u'\u2291',
- 'SquareSuperset;': u'\u2290',
- 'SquareSupersetEqual;': u'\u2292',
- 'SquareUnion;': u'\u2294',
- 'squarf;': u'\u25aa',
- 'squf;': u'\u25aa',
- 'srarr;': u'\u2192',
- 'Sscr;': u'\U0001d4ae',
- 'sscr;': u'\U0001d4c8',
- 'ssetmn;': u'\u2216',
- 'ssmile;': u'\u2323',
- 'sstarf;': u'\u22c6',
- 'Star;': u'\u22c6',
- 'star;': u'\u2606',
- 'starf;': u'\u2605',
- 'straightepsilon;': u'\u03f5',
- 'straightphi;': u'\u03d5',
- 'strns;': u'\xaf',
- 'Sub;': u'\u22d0',
- 'sub;': u'\u2282',
- 'subdot;': u'\u2abd',
- 'subE;': u'\u2ac5',
- 'sube;': u'\u2286',
- 'subedot;': u'\u2ac3',
- 'submult;': u'\u2ac1',
- 'subnE;': u'\u2acb',
- 'subne;': u'\u228a',
- 'subplus;': u'\u2abf',
- 'subrarr;': u'\u2979',
- 'Subset;': u'\u22d0',
- 'subset;': u'\u2282',
- 'subseteq;': u'\u2286',
- 'subseteqq;': u'\u2ac5',
- 'SubsetEqual;': u'\u2286',
- 'subsetneq;': u'\u228a',
- 'subsetneqq;': u'\u2acb',
- 'subsim;': u'\u2ac7',
- 'subsub;': u'\u2ad5',
- 'subsup;': u'\u2ad3',
- 'succ;': u'\u227b',
- 'succapprox;': u'\u2ab8',
- 'succcurlyeq;': u'\u227d',
- 'Succeeds;': u'\u227b',
- 'SucceedsEqual;': u'\u2ab0',
- 'SucceedsSlantEqual;': u'\u227d',
- 'SucceedsTilde;': u'\u227f',
- 'succeq;': u'\u2ab0',
- 'succnapprox;': u'\u2aba',
- 'succneqq;': u'\u2ab6',
- 'succnsim;': u'\u22e9',
- 'succsim;': u'\u227f',
- 'SuchThat;': u'\u220b',
- 'Sum;': u'\u2211',
- 'sum;': u'\u2211',
- 'sung;': u'\u266a',
- 'sup1': u'\xb9',
- 'sup1;': u'\xb9',
- 'sup2': u'\xb2',
- 'sup2;': u'\xb2',
- 'sup3': u'\xb3',
- 'sup3;': u'\xb3',
- 'Sup;': u'\u22d1',
- 'sup;': u'\u2283',
- 'supdot;': u'\u2abe',
- 'supdsub;': u'\u2ad8',
- 'supE;': u'\u2ac6',
- 'supe;': u'\u2287',
- 'supedot;': u'\u2ac4',
- 'Superset;': u'\u2283',
- 'SupersetEqual;': u'\u2287',
- 'suphsol;': u'\u27c9',
- 'suphsub;': u'\u2ad7',
- 'suplarr;': u'\u297b',
- 'supmult;': u'\u2ac2',
- 'supnE;': u'\u2acc',
- 'supne;': u'\u228b',
- 'supplus;': u'\u2ac0',
- 'Supset;': u'\u22d1',
- 'supset;': u'\u2283',
- 'supseteq;': u'\u2287',
- 'supseteqq;': u'\u2ac6',
- 'supsetneq;': u'\u228b',
- 'supsetneqq;': u'\u2acc',
- 'supsim;': u'\u2ac8',
- 'supsub;': u'\u2ad4',
- 'supsup;': u'\u2ad6',
- 'swarhk;': u'\u2926',
- 'swArr;': u'\u21d9',
- 'swarr;': u'\u2199',
- 'swarrow;': u'\u2199',
- 'swnwar;': u'\u292a',
- 'szlig': u'\xdf',
- 'szlig;': u'\xdf',
- 'Tab;': u'\t',
- 'target;': u'\u2316',
- 'Tau;': u'\u03a4',
- 'tau;': u'\u03c4',
- 'tbrk;': u'\u23b4',
- 'Tcaron;': u'\u0164',
- 'tcaron;': u'\u0165',
- 'Tcedil;': u'\u0162',
- 'tcedil;': u'\u0163',
- 'Tcy;': u'\u0422',
- 'tcy;': u'\u0442',
- 'tdot;': u'\u20db',
- 'telrec;': u'\u2315',
- 'Tfr;': u'\U0001d517',
- 'tfr;': u'\U0001d531',
- 'there4;': u'\u2234',
- 'Therefore;': u'\u2234',
- 'therefore;': u'\u2234',
- 'Theta;': u'\u0398',
- 'theta;': u'\u03b8',
- 'thetasym;': u'\u03d1',
- 'thetav;': u'\u03d1',
- 'thickapprox;': u'\u2248',
- 'thicksim;': u'\u223c',
- 'ThickSpace;': u'\u205f\u200a',
- 'thinsp;': u'\u2009',
- 'ThinSpace;': u'\u2009',
- 'thkap;': u'\u2248',
- 'thksim;': u'\u223c',
- 'THORN': u'\xde',
- 'thorn': u'\xfe',
- 'THORN;': u'\xde',
- 'thorn;': u'\xfe',
- 'Tilde;': u'\u223c',
- 'tilde;': u'\u02dc',
- 'TildeEqual;': u'\u2243',
- 'TildeFullEqual;': u'\u2245',
- 'TildeTilde;': u'\u2248',
- 'times': u'\xd7',
- 'times;': u'\xd7',
- 'timesb;': u'\u22a0',
- 'timesbar;': u'\u2a31',
- 'timesd;': u'\u2a30',
- 'tint;': u'\u222d',
- 'toea;': u'\u2928',
- 'top;': u'\u22a4',
- 'topbot;': u'\u2336',
- 'topcir;': u'\u2af1',
- 'Topf;': u'\U0001d54b',
- 'topf;': u'\U0001d565',
- 'topfork;': u'\u2ada',
- 'tosa;': u'\u2929',
- 'tprime;': u'\u2034',
- 'TRADE;': u'\u2122',
- 'trade;': u'\u2122',
- 'triangle;': u'\u25b5',
- 'triangledown;': u'\u25bf',
- 'triangleleft;': u'\u25c3',
- 'trianglelefteq;': u'\u22b4',
- 'triangleq;': u'\u225c',
- 'triangleright;': u'\u25b9',
- 'trianglerighteq;': u'\u22b5',
- 'tridot;': u'\u25ec',
- 'trie;': u'\u225c',
- 'triminus;': u'\u2a3a',
- 'TripleDot;': u'\u20db',
- 'triplus;': u'\u2a39',
- 'trisb;': u'\u29cd',
- 'tritime;': u'\u2a3b',
- 'trpezium;': u'\u23e2',
- 'Tscr;': u'\U0001d4af',
- 'tscr;': u'\U0001d4c9',
- 'TScy;': u'\u0426',
- 'tscy;': u'\u0446',
- 'TSHcy;': u'\u040b',
- 'tshcy;': u'\u045b',
- 'Tstrok;': u'\u0166',
- 'tstrok;': u'\u0167',
- 'twixt;': u'\u226c',
- 'twoheadleftarrow;': u'\u219e',
- 'twoheadrightarrow;': u'\u21a0',
- 'Uacute': u'\xda',
- 'uacute': u'\xfa',
- 'Uacute;': u'\xda',
- 'uacute;': u'\xfa',
- 'Uarr;': u'\u219f',
- 'uArr;': u'\u21d1',
- 'uarr;': u'\u2191',
- 'Uarrocir;': u'\u2949',
- 'Ubrcy;': u'\u040e',
- 'ubrcy;': u'\u045e',
- 'Ubreve;': u'\u016c',
- 'ubreve;': u'\u016d',
- 'Ucirc': u'\xdb',
- 'ucirc': u'\xfb',
- 'Ucirc;': u'\xdb',
- 'ucirc;': u'\xfb',
- 'Ucy;': u'\u0423',
- 'ucy;': u'\u0443',
- 'udarr;': u'\u21c5',
- 'Udblac;': u'\u0170',
- 'udblac;': u'\u0171',
- 'udhar;': u'\u296e',
- 'ufisht;': u'\u297e',
- 'Ufr;': u'\U0001d518',
- 'ufr;': u'\U0001d532',
- 'Ugrave': u'\xd9',
- 'ugrave': u'\xf9',
- 'Ugrave;': u'\xd9',
- 'ugrave;': u'\xf9',
- 'uHar;': u'\u2963',
- 'uharl;': u'\u21bf',
- 'uharr;': u'\u21be',
- 'uhblk;': u'\u2580',
- 'ulcorn;': u'\u231c',
- 'ulcorner;': u'\u231c',
- 'ulcrop;': u'\u230f',
- 'ultri;': u'\u25f8',
- 'Umacr;': u'\u016a',
- 'umacr;': u'\u016b',
- 'uml': u'\xa8',
- 'uml;': u'\xa8',
- 'UnderBar;': u'_',
- 'UnderBrace;': u'\u23df',
- 'UnderBracket;': u'\u23b5',
- 'UnderParenthesis;': u'\u23dd',
- 'Union;': u'\u22c3',
- 'UnionPlus;': u'\u228e',
- 'Uogon;': u'\u0172',
- 'uogon;': u'\u0173',
- 'Uopf;': u'\U0001d54c',
- 'uopf;': u'\U0001d566',
- 'UpArrow;': u'\u2191',
- 'Uparrow;': u'\u21d1',
- 'uparrow;': u'\u2191',
- 'UpArrowBar;': u'\u2912',
- 'UpArrowDownArrow;': u'\u21c5',
- 'UpDownArrow;': u'\u2195',
- 'Updownarrow;': u'\u21d5',
- 'updownarrow;': u'\u2195',
- 'UpEquilibrium;': u'\u296e',
- 'upharpoonleft;': u'\u21bf',
- 'upharpoonright;': u'\u21be',
- 'uplus;': u'\u228e',
- 'UpperLeftArrow;': u'\u2196',
- 'UpperRightArrow;': u'\u2197',
- 'Upsi;': u'\u03d2',
- 'upsi;': u'\u03c5',
- 'upsih;': u'\u03d2',
- 'Upsilon;': u'\u03a5',
- 'upsilon;': u'\u03c5',
- 'UpTee;': u'\u22a5',
- 'UpTeeArrow;': u'\u21a5',
- 'upuparrows;': u'\u21c8',
- 'urcorn;': u'\u231d',
- 'urcorner;': u'\u231d',
- 'urcrop;': u'\u230e',
- 'Uring;': u'\u016e',
- 'uring;': u'\u016f',
- 'urtri;': u'\u25f9',
- 'Uscr;': u'\U0001d4b0',
- 'uscr;': u'\U0001d4ca',
- 'utdot;': u'\u22f0',
- 'Utilde;': u'\u0168',
- 'utilde;': u'\u0169',
- 'utri;': u'\u25b5',
- 'utrif;': u'\u25b4',
- 'uuarr;': u'\u21c8',
- 'Uuml': u'\xdc',
- 'uuml': u'\xfc',
- 'Uuml;': u'\xdc',
- 'uuml;': u'\xfc',
- 'uwangle;': u'\u29a7',
- 'vangrt;': u'\u299c',
- 'varepsilon;': u'\u03f5',
- 'varkappa;': u'\u03f0',
- 'varnothing;': u'\u2205',
- 'varphi;': u'\u03d5',
- 'varpi;': u'\u03d6',
- 'varpropto;': u'\u221d',
- 'vArr;': u'\u21d5',
- 'varr;': u'\u2195',
- 'varrho;': u'\u03f1',
- 'varsigma;': u'\u03c2',
- 'varsubsetneq;': u'\u228a\ufe00',
- 'varsubsetneqq;': u'\u2acb\ufe00',
- 'varsupsetneq;': u'\u228b\ufe00',
- 'varsupsetneqq;': u'\u2acc\ufe00',
- 'vartheta;': u'\u03d1',
- 'vartriangleleft;': u'\u22b2',
- 'vartriangleright;': u'\u22b3',
- 'Vbar;': u'\u2aeb',
- 'vBar;': u'\u2ae8',
- 'vBarv;': u'\u2ae9',
- 'Vcy;': u'\u0412',
- 'vcy;': u'\u0432',
- 'VDash;': u'\u22ab',
- 'Vdash;': u'\u22a9',
- 'vDash;': u'\u22a8',
- 'vdash;': u'\u22a2',
- 'Vdashl;': u'\u2ae6',
- 'Vee;': u'\u22c1',
- 'vee;': u'\u2228',
- 'veebar;': u'\u22bb',
- 'veeeq;': u'\u225a',
- 'vellip;': u'\u22ee',
- 'Verbar;': u'\u2016',
- 'verbar;': u'|',
- 'Vert;': u'\u2016',
- 'vert;': u'|',
- 'VerticalBar;': u'\u2223',
- 'VerticalLine;': u'|',
- 'VerticalSeparator;': u'\u2758',
- 'VerticalTilde;': u'\u2240',
- 'VeryThinSpace;': u'\u200a',
- 'Vfr;': u'\U0001d519',
- 'vfr;': u'\U0001d533',
- 'vltri;': u'\u22b2',
- 'vnsub;': u'\u2282\u20d2',
- 'vnsup;': u'\u2283\u20d2',
- 'Vopf;': u'\U0001d54d',
- 'vopf;': u'\U0001d567',
- 'vprop;': u'\u221d',
- 'vrtri;': u'\u22b3',
- 'Vscr;': u'\U0001d4b1',
- 'vscr;': u'\U0001d4cb',
- 'vsubnE;': u'\u2acb\ufe00',
- 'vsubne;': u'\u228a\ufe00',
- 'vsupnE;': u'\u2acc\ufe00',
- 'vsupne;': u'\u228b\ufe00',
- 'Vvdash;': u'\u22aa',
- 'vzigzag;': u'\u299a',
- 'Wcirc;': u'\u0174',
- 'wcirc;': u'\u0175',
- 'wedbar;': u'\u2a5f',
- 'Wedge;': u'\u22c0',
- 'wedge;': u'\u2227',
- 'wedgeq;': u'\u2259',
- 'weierp;': u'\u2118',
- 'Wfr;': u'\U0001d51a',
- 'wfr;': u'\U0001d534',
- 'Wopf;': u'\U0001d54e',
- 'wopf;': u'\U0001d568',
- 'wp;': u'\u2118',
- 'wr;': u'\u2240',
- 'wreath;': u'\u2240',
- 'Wscr;': u'\U0001d4b2',
- 'wscr;': u'\U0001d4cc',
- 'xcap;': u'\u22c2',
- 'xcirc;': u'\u25ef',
- 'xcup;': u'\u22c3',
- 'xdtri;': u'\u25bd',
- 'Xfr;': u'\U0001d51b',
- 'xfr;': u'\U0001d535',
- 'xhArr;': u'\u27fa',
- 'xharr;': u'\u27f7',
- 'Xi;': u'\u039e',
- 'xi;': u'\u03be',
- 'xlArr;': u'\u27f8',
- 'xlarr;': u'\u27f5',
- 'xmap;': u'\u27fc',
- 'xnis;': u'\u22fb',
- 'xodot;': u'\u2a00',
- 'Xopf;': u'\U0001d54f',
- 'xopf;': u'\U0001d569',
- 'xoplus;': u'\u2a01',
- 'xotime;': u'\u2a02',
- 'xrArr;': u'\u27f9',
- 'xrarr;': u'\u27f6',
- 'Xscr;': u'\U0001d4b3',
- 'xscr;': u'\U0001d4cd',
- 'xsqcup;': u'\u2a06',
- 'xuplus;': u'\u2a04',
- 'xutri;': u'\u25b3',
- 'xvee;': u'\u22c1',
- 'xwedge;': u'\u22c0',
- 'Yacute': u'\xdd',
- 'yacute': u'\xfd',
- 'Yacute;': u'\xdd',
- 'yacute;': u'\xfd',
- 'YAcy;': u'\u042f',
- 'yacy;': u'\u044f',
- 'Ycirc;': u'\u0176',
- 'ycirc;': u'\u0177',
- 'Ycy;': u'\u042b',
- 'ycy;': u'\u044b',
- 'yen': u'\xa5',
- 'yen;': u'\xa5',
- 'Yfr;': u'\U0001d51c',
- 'yfr;': u'\U0001d536',
- 'YIcy;': u'\u0407',
- 'yicy;': u'\u0457',
- 'Yopf;': u'\U0001d550',
- 'yopf;': u'\U0001d56a',
- 'Yscr;': u'\U0001d4b4',
- 'yscr;': u'\U0001d4ce',
- 'YUcy;': u'\u042e',
- 'yucy;': u'\u044e',
- 'yuml': u'\xff',
- 'Yuml;': u'\u0178',
- 'yuml;': u'\xff',
- 'Zacute;': u'\u0179',
- 'zacute;': u'\u017a',
- 'Zcaron;': u'\u017d',
- 'zcaron;': u'\u017e',
- 'Zcy;': u'\u0417',
- 'zcy;': u'\u0437',
- 'Zdot;': u'\u017b',
- 'zdot;': u'\u017c',
- 'zeetrf;': u'\u2128',
- 'ZeroWidthSpace;': u'\u200b',
- 'Zeta;': u'\u0396',
- 'zeta;': u'\u03b6',
- 'Zfr;': u'\u2128',
- 'zfr;': u'\U0001d537',
- 'ZHcy;': u'\u0416',
- 'zhcy;': u'\u0436',
- 'zigrarr;': u'\u21dd',
- 'Zopf;': u'\u2124',
- 'zopf;': u'\U0001d56b',
- 'Zscr;': u'\U0001d4b5',
- 'zscr;': u'\U0001d4cf',
- 'zwj;': u'\u200d',
- 'zwnj;': u'\u200c',
+ 'ApplyFunction;': '\u2061',
+ 'approx;': '\u2248',
+ 'approxeq;': '\u224a',
+ 'Aring': '\xc5',
+ 'aring': '\xe5',
+ 'Aring;': '\xc5',
+ 'aring;': '\xe5',
+ 'Ascr;': '\U0001d49c',
+ 'ascr;': '\U0001d4b6',
+ 'Assign;': '\u2254',
+ 'ast;': '*',
+ 'asymp;': '\u2248',
+ 'asympeq;': '\u224d',
+ 'Atilde': '\xc3',
+ 'atilde': '\xe3',
+ 'Atilde;': '\xc3',
+ 'atilde;': '\xe3',
+ 'Auml': '\xc4',
+ 'auml': '\xe4',
+ 'Auml;': '\xc4',
+ 'auml;': '\xe4',
+ 'awconint;': '\u2233',
+ 'awint;': '\u2a11',
+ 'backcong;': '\u224c',
+ 'backepsilon;': '\u03f6',
+ 'backprime;': '\u2035',
+ 'backsim;': '\u223d',
+ 'backsimeq;': '\u22cd',
+ 'Backslash;': '\u2216',
+ 'Barv;': '\u2ae7',
+ 'barvee;': '\u22bd',
+ 'Barwed;': '\u2306',
+ 'barwed;': '\u2305',
+ 'barwedge;': '\u2305',
+ 'bbrk;': '\u23b5',
+ 'bbrktbrk;': '\u23b6',
+ 'bcong;': '\u224c',
+ 'Bcy;': '\u0411',
+ 'bcy;': '\u0431',
+ 'bdquo;': '\u201e',
+ 'becaus;': '\u2235',
+ 'Because;': '\u2235',
+ 'because;': '\u2235',
+ 'bemptyv;': '\u29b0',
+ 'bepsi;': '\u03f6',
+ 'bernou;': '\u212c',
+ 'Bernoullis;': '\u212c',
+ 'Beta;': '\u0392',
+ 'beta;': '\u03b2',
+ 'beth;': '\u2136',
+ 'between;': '\u226c',
+ 'Bfr;': '\U0001d505',
+ 'bfr;': '\U0001d51f',
+ 'bigcap;': '\u22c2',
+ 'bigcirc;': '\u25ef',
+ 'bigcup;': '\u22c3',
+ 'bigodot;': '\u2a00',
+ 'bigoplus;': '\u2a01',
+ 'bigotimes;': '\u2a02',
+ 'bigsqcup;': '\u2a06',
+ 'bigstar;': '\u2605',
+ 'bigtriangledown;': '\u25bd',
+ 'bigtriangleup;': '\u25b3',
+ 'biguplus;': '\u2a04',
+ 'bigvee;': '\u22c1',
+ 'bigwedge;': '\u22c0',
+ 'bkarow;': '\u290d',
+ 'blacklozenge;': '\u29eb',
+ 'blacksquare;': '\u25aa',
+ 'blacktriangle;': '\u25b4',
+ 'blacktriangledown;': '\u25be',
+ 'blacktriangleleft;': '\u25c2',
+ 'blacktriangleright;': '\u25b8',
+ 'blank;': '\u2423',
+ 'blk12;': '\u2592',
+ 'blk14;': '\u2591',
+ 'blk34;': '\u2593',
+ 'block;': '\u2588',
+ 'bne;': '=\u20e5',
+ 'bnequiv;': '\u2261\u20e5',
+ 'bNot;': '\u2aed',
+ 'bnot;': '\u2310',
+ 'Bopf;': '\U0001d539',
+ 'bopf;': '\U0001d553',
+ 'bot;': '\u22a5',
+ 'bottom;': '\u22a5',
+ 'bowtie;': '\u22c8',
+ 'boxbox;': '\u29c9',
+ 'boxDL;': '\u2557',
+ 'boxDl;': '\u2556',
+ 'boxdL;': '\u2555',
+ 'boxdl;': '\u2510',
+ 'boxDR;': '\u2554',
+ 'boxDr;': '\u2553',
+ 'boxdR;': '\u2552',
+ 'boxdr;': '\u250c',
+ 'boxH;': '\u2550',
+ 'boxh;': '\u2500',
+ 'boxHD;': '\u2566',
+ 'boxHd;': '\u2564',
+ 'boxhD;': '\u2565',
+ 'boxhd;': '\u252c',
+ 'boxHU;': '\u2569',
+ 'boxHu;': '\u2567',
+ 'boxhU;': '\u2568',
+ 'boxhu;': '\u2534',
+ 'boxminus;': '\u229f',
+ 'boxplus;': '\u229e',
+ 'boxtimes;': '\u22a0',
+ 'boxUL;': '\u255d',
+ 'boxUl;': '\u255c',
+ 'boxuL;': '\u255b',
+ 'boxul;': '\u2518',
+ 'boxUR;': '\u255a',
+ 'boxUr;': '\u2559',
+ 'boxuR;': '\u2558',
+ 'boxur;': '\u2514',
+ 'boxV;': '\u2551',
+ 'boxv;': '\u2502',
+ 'boxVH;': '\u256c',
+ 'boxVh;': '\u256b',
+ 'boxvH;': '\u256a',
+ 'boxvh;': '\u253c',
+ 'boxVL;': '\u2563',
+ 'boxVl;': '\u2562',
+ 'boxvL;': '\u2561',
+ 'boxvl;': '\u2524',
+ 'boxVR;': '\u2560',
+ 'boxVr;': '\u255f',
+ 'boxvR;': '\u255e',
+ 'boxvr;': '\u251c',
+ 'bprime;': '\u2035',
+ 'Breve;': '\u02d8',
+ 'breve;': '\u02d8',
+ 'brvbar': '\xa6',
+ 'brvbar;': '\xa6',
+ 'Bscr;': '\u212c',
+ 'bscr;': '\U0001d4b7',
+ 'bsemi;': '\u204f',
+ 'bsim;': '\u223d',
+ 'bsime;': '\u22cd',
+ 'bsol;': '\\',
+ 'bsolb;': '\u29c5',
+ 'bsolhsub;': '\u27c8',
+ 'bull;': '\u2022',
+ 'bullet;': '\u2022',
+ 'bump;': '\u224e',
+ 'bumpE;': '\u2aae',
+ 'bumpe;': '\u224f',
+ 'Bumpeq;': '\u224e',
+ 'bumpeq;': '\u224f',
+ 'Cacute;': '\u0106',
+ 'cacute;': '\u0107',
+ 'Cap;': '\u22d2',
+ 'cap;': '\u2229',
+ 'capand;': '\u2a44',
+ 'capbrcup;': '\u2a49',
+ 'capcap;': '\u2a4b',
+ 'capcup;': '\u2a47',
+ 'capdot;': '\u2a40',
+ 'CapitalDifferentialD;': '\u2145',
+ 'caps;': '\u2229\ufe00',
+ 'caret;': '\u2041',
+ 'caron;': '\u02c7',
+ 'Cayleys;': '\u212d',
+ 'ccaps;': '\u2a4d',
+ 'Ccaron;': '\u010c',
+ 'ccaron;': '\u010d',
+ 'Ccedil': '\xc7',
+ 'ccedil': '\xe7',
+ 'Ccedil;': '\xc7',
+ 'ccedil;': '\xe7',
+ 'Ccirc;': '\u0108',
+ 'ccirc;': '\u0109',
+ 'Cconint;': '\u2230',
+ 'ccups;': '\u2a4c',
+ 'ccupssm;': '\u2a50',
+ 'Cdot;': '\u010a',
+ 'cdot;': '\u010b',
+ 'cedil': '\xb8',
+ 'cedil;': '\xb8',
+ 'Cedilla;': '\xb8',
+ 'cemptyv;': '\u29b2',
+ 'cent': '\xa2',
+ 'cent;': '\xa2',
+ 'CenterDot;': '\xb7',
+ 'centerdot;': '\xb7',
+ 'Cfr;': '\u212d',
+ 'cfr;': '\U0001d520',
+ 'CHcy;': '\u0427',
+ 'chcy;': '\u0447',
+ 'check;': '\u2713',
+ 'checkmark;': '\u2713',
+ 'Chi;': '\u03a7',
+ 'chi;': '\u03c7',
+ 'cir;': '\u25cb',
+ 'circ;': '\u02c6',
+ 'circeq;': '\u2257',
+ 'circlearrowleft;': '\u21ba',
+ 'circlearrowright;': '\u21bb',
+ 'circledast;': '\u229b',
+ 'circledcirc;': '\u229a',
+ 'circleddash;': '\u229d',
+ 'CircleDot;': '\u2299',
+ 'circledR;': '\xae',
+ 'circledS;': '\u24c8',
+ 'CircleMinus;': '\u2296',
+ 'CirclePlus;': '\u2295',
+ 'CircleTimes;': '\u2297',
+ 'cirE;': '\u29c3',
+ 'cire;': '\u2257',
+ 'cirfnint;': '\u2a10',
+ 'cirmid;': '\u2aef',
+ 'cirscir;': '\u29c2',
+ 'ClockwiseContourIntegral;': '\u2232',
+ 'CloseCurlyDoubleQuote;': '\u201d',
+ 'CloseCurlyQuote;': '\u2019',
+ 'clubs;': '\u2663',
+ 'clubsuit;': '\u2663',
+ 'Colon;': '\u2237',
+ 'colon;': ':',
+ 'Colone;': '\u2a74',
+ 'colone;': '\u2254',
+ 'coloneq;': '\u2254',
+ 'comma;': ',',
+ 'commat;': '@',
+ 'comp;': '\u2201',
+ 'compfn;': '\u2218',
+ 'complement;': '\u2201',
+ 'complexes;': '\u2102',
+ 'cong;': '\u2245',
+ 'congdot;': '\u2a6d',
+ 'Congruent;': '\u2261',
+ 'Conint;': '\u222f',
+ 'conint;': '\u222e',
+ 'ContourIntegral;': '\u222e',
+ 'Copf;': '\u2102',
+ 'copf;': '\U0001d554',
+ 'coprod;': '\u2210',
+ 'Coproduct;': '\u2210',
+ 'COPY': '\xa9',
+ 'copy': '\xa9',
+ 'COPY;': '\xa9',
+ 'copy;': '\xa9',
+ 'copysr;': '\u2117',
+ 'CounterClockwiseContourIntegral;': '\u2233',
+ 'crarr;': '\u21b5',
+ 'Cross;': '\u2a2f',
+ 'cross;': '\u2717',
+ 'Cscr;': '\U0001d49e',
+ 'cscr;': '\U0001d4b8',
+ 'csub;': '\u2acf',
+ 'csube;': '\u2ad1',
+ 'csup;': '\u2ad0',
+ 'csupe;': '\u2ad2',
+ 'ctdot;': '\u22ef',
+ 'cudarrl;': '\u2938',
+ 'cudarrr;': '\u2935',
+ 'cuepr;': '\u22de',
+ 'cuesc;': '\u22df',
+ 'cularr;': '\u21b6',
+ 'cularrp;': '\u293d',
+ 'Cup;': '\u22d3',
+ 'cup;': '\u222a',
+ 'cupbrcap;': '\u2a48',
+ 'CupCap;': '\u224d',
+ 'cupcap;': '\u2a46',
+ 'cupcup;': '\u2a4a',
+ 'cupdot;': '\u228d',
+ 'cupor;': '\u2a45',
+ 'cups;': '\u222a\ufe00',
+ 'curarr;': '\u21b7',
+ 'curarrm;': '\u293c',
+ 'curlyeqprec;': '\u22de',
+ 'curlyeqsucc;': '\u22df',
+ 'curlyvee;': '\u22ce',
+ 'curlywedge;': '\u22cf',
+ 'curren': '\xa4',
+ 'curren;': '\xa4',
+ 'curvearrowleft;': '\u21b6',
+ 'curvearrowright;': '\u21b7',
+ 'cuvee;': '\u22ce',
+ 'cuwed;': '\u22cf',
+ 'cwconint;': '\u2232',
+ 'cwint;': '\u2231',
+ 'cylcty;': '\u232d',
+ 'Dagger;': '\u2021',
+ 'dagger;': '\u2020',
+ 'daleth;': '\u2138',
+ 'Darr;': '\u21a1',
+ 'dArr;': '\u21d3',
+ 'darr;': '\u2193',
+ 'dash;': '\u2010',
+ 'Dashv;': '\u2ae4',
+ 'dashv;': '\u22a3',
+ 'dbkarow;': '\u290f',
+ 'dblac;': '\u02dd',
+ 'Dcaron;': '\u010e',
+ 'dcaron;': '\u010f',
+ 'Dcy;': '\u0414',
+ 'dcy;': '\u0434',
+ 'DD;': '\u2145',
+ 'dd;': '\u2146',
+ 'ddagger;': '\u2021',
+ 'ddarr;': '\u21ca',
+ 'DDotrahd;': '\u2911',
+ 'ddotseq;': '\u2a77',
+ 'deg': '\xb0',
+ 'deg;': '\xb0',
+ 'Del;': '\u2207',
+ 'Delta;': '\u0394',
+ 'delta;': '\u03b4',
+ 'demptyv;': '\u29b1',
+ 'dfisht;': '\u297f',
+ 'Dfr;': '\U0001d507',
+ 'dfr;': '\U0001d521',
+ 'dHar;': '\u2965',
+ 'dharl;': '\u21c3',
+ 'dharr;': '\u21c2',
+ 'DiacriticalAcute;': '\xb4',
+ 'DiacriticalDot;': '\u02d9',
+ 'DiacriticalDoubleAcute;': '\u02dd',
+ 'DiacriticalGrave;': '`',
+ 'DiacriticalTilde;': '\u02dc',
+ 'diam;': '\u22c4',
+ 'Diamond;': '\u22c4',
+ 'diamond;': '\u22c4',
+ 'diamondsuit;': '\u2666',
+ 'diams;': '\u2666',
+ 'die;': '\xa8',
+ 'DifferentialD;': '\u2146',
+ 'digamma;': '\u03dd',
+ 'disin;': '\u22f2',
+ 'div;': '\xf7',
+ 'divide': '\xf7',
+ 'divide;': '\xf7',
+ 'divideontimes;': '\u22c7',
+ 'divonx;': '\u22c7',
+ 'DJcy;': '\u0402',
+ 'djcy;': '\u0452',
+ 'dlcorn;': '\u231e',
+ 'dlcrop;': '\u230d',
+ 'dollar;': '$',
+ 'Dopf;': '\U0001d53b',
+ 'dopf;': '\U0001d555',
+ 'Dot;': '\xa8',
+ 'dot;': '\u02d9',
+ 'DotDot;': '\u20dc',
+ 'doteq;': '\u2250',
+ 'doteqdot;': '\u2251',
+ 'DotEqual;': '\u2250',
+ 'dotminus;': '\u2238',
+ 'dotplus;': '\u2214',
+ 'dotsquare;': '\u22a1',
+ 'doublebarwedge;': '\u2306',
+ 'DoubleContourIntegral;': '\u222f',
+ 'DoubleDot;': '\xa8',
+ 'DoubleDownArrow;': '\u21d3',
+ 'DoubleLeftArrow;': '\u21d0',
+ 'DoubleLeftRightArrow;': '\u21d4',
+ 'DoubleLeftTee;': '\u2ae4',
+ 'DoubleLongLeftArrow;': '\u27f8',
+ 'DoubleLongLeftRightArrow;': '\u27fa',
+ 'DoubleLongRightArrow;': '\u27f9',
+ 'DoubleRightArrow;': '\u21d2',
+ 'DoubleRightTee;': '\u22a8',
+ 'DoubleUpArrow;': '\u21d1',
+ 'DoubleUpDownArrow;': '\u21d5',
+ 'DoubleVerticalBar;': '\u2225',
+ 'DownArrow;': '\u2193',
+ 'Downarrow;': '\u21d3',
+ 'downarrow;': '\u2193',
+ 'DownArrowBar;': '\u2913',
+ 'DownArrowUpArrow;': '\u21f5',
+ 'DownBreve;': '\u0311',
+ 'downdownarrows;': '\u21ca',
+ 'downharpoonleft;': '\u21c3',
+ 'downharpoonright;': '\u21c2',
+ 'DownLeftRightVector;': '\u2950',
+ 'DownLeftTeeVector;': '\u295e',
+ 'DownLeftVector;': '\u21bd',
+ 'DownLeftVectorBar;': '\u2956',
+ 'DownRightTeeVector;': '\u295f',
+ 'DownRightVector;': '\u21c1',
+ 'DownRightVectorBar;': '\u2957',
+ 'DownTee;': '\u22a4',
+ 'DownTeeArrow;': '\u21a7',
+ 'drbkarow;': '\u2910',
+ 'drcorn;': '\u231f',
+ 'drcrop;': '\u230c',
+ 'Dscr;': '\U0001d49f',
+ 'dscr;': '\U0001d4b9',
+ 'DScy;': '\u0405',
+ 'dscy;': '\u0455',
+ 'dsol;': '\u29f6',
+ 'Dstrok;': '\u0110',
+ 'dstrok;': '\u0111',
+ 'dtdot;': '\u22f1',
+ 'dtri;': '\u25bf',
+ 'dtrif;': '\u25be',
+ 'duarr;': '\u21f5',
+ 'duhar;': '\u296f',
+ 'dwangle;': '\u29a6',
+ 'DZcy;': '\u040f',
+ 'dzcy;': '\u045f',
+ 'dzigrarr;': '\u27ff',
+ 'Eacute': '\xc9',
+ 'eacute': '\xe9',
+ 'Eacute;': '\xc9',
+ 'eacute;': '\xe9',
+ 'easter;': '\u2a6e',
+ 'Ecaron;': '\u011a',
+ 'ecaron;': '\u011b',
+ 'ecir;': '\u2256',
+ 'Ecirc': '\xca',
+ 'ecirc': '\xea',
+ 'Ecirc;': '\xca',
+ 'ecirc;': '\xea',
+ 'ecolon;': '\u2255',
+ 'Ecy;': '\u042d',
+ 'ecy;': '\u044d',
+ 'eDDot;': '\u2a77',
+ 'Edot;': '\u0116',
+ 'eDot;': '\u2251',
+ 'edot;': '\u0117',
+ 'ee;': '\u2147',
+ 'efDot;': '\u2252',
+ 'Efr;': '\U0001d508',
+ 'efr;': '\U0001d522',
+ 'eg;': '\u2a9a',
+ 'Egrave': '\xc8',
+ 'egrave': '\xe8',
+ 'Egrave;': '\xc8',
+ 'egrave;': '\xe8',
+ 'egs;': '\u2a96',
+ 'egsdot;': '\u2a98',
+ 'el;': '\u2a99',
+ 'Element;': '\u2208',
+ 'elinters;': '\u23e7',
+ 'ell;': '\u2113',
+ 'els;': '\u2a95',
+ 'elsdot;': '\u2a97',
+ 'Emacr;': '\u0112',
+ 'emacr;': '\u0113',
+ 'empty;': '\u2205',
+ 'emptyset;': '\u2205',
+ 'EmptySmallSquare;': '\u25fb',
+ 'emptyv;': '\u2205',
+ 'EmptyVerySmallSquare;': '\u25ab',
+ 'emsp13;': '\u2004',
+ 'emsp14;': '\u2005',
+ 'emsp;': '\u2003',
+ 'ENG;': '\u014a',
+ 'eng;': '\u014b',
+ 'ensp;': '\u2002',
+ 'Eogon;': '\u0118',
+ 'eogon;': '\u0119',
+ 'Eopf;': '\U0001d53c',
+ 'eopf;': '\U0001d556',
+ 'epar;': '\u22d5',
+ 'eparsl;': '\u29e3',
+ 'eplus;': '\u2a71',
+ 'epsi;': '\u03b5',
+ 'Epsilon;': '\u0395',
+ 'epsilon;': '\u03b5',
+ 'epsiv;': '\u03f5',
+ 'eqcirc;': '\u2256',
+ 'eqcolon;': '\u2255',
+ 'eqsim;': '\u2242',
+ 'eqslantgtr;': '\u2a96',
+ 'eqslantless;': '\u2a95',
+ 'Equal;': '\u2a75',
+ 'equals;': '=',
+ 'EqualTilde;': '\u2242',
+ 'equest;': '\u225f',
+ 'Equilibrium;': '\u21cc',
+ 'equiv;': '\u2261',
+ 'equivDD;': '\u2a78',
+ 'eqvparsl;': '\u29e5',
+ 'erarr;': '\u2971',
+ 'erDot;': '\u2253',
+ 'Escr;': '\u2130',
+ 'escr;': '\u212f',
+ 'esdot;': '\u2250',
+ 'Esim;': '\u2a73',
+ 'esim;': '\u2242',
+ 'Eta;': '\u0397',
+ 'eta;': '\u03b7',
+ 'ETH': '\xd0',
+ 'eth': '\xf0',
+ 'ETH;': '\xd0',
+ 'eth;': '\xf0',
+ 'Euml': '\xcb',
+ 'euml': '\xeb',
+ 'Euml;': '\xcb',
+ 'euml;': '\xeb',
+ 'euro;': '\u20ac',
+ 'excl;': '!',
+ 'exist;': '\u2203',
+ 'Exists;': '\u2203',
+ 'expectation;': '\u2130',
+ 'ExponentialE;': '\u2147',
+ 'exponentiale;': '\u2147',
+ 'fallingdotseq;': '\u2252',
+ 'Fcy;': '\u0424',
+ 'fcy;': '\u0444',
+ 'female;': '\u2640',
+ 'ffilig;': '\ufb03',
+ 'fflig;': '\ufb00',
+ 'ffllig;': '\ufb04',
+ 'Ffr;': '\U0001d509',
+ 'ffr;': '\U0001d523',
+ 'filig;': '\ufb01',
+ 'FilledSmallSquare;': '\u25fc',
+ 'FilledVerySmallSquare;': '\u25aa',
+ 'fjlig;': 'fj',
+ 'flat;': '\u266d',
+ 'fllig;': '\ufb02',
+ 'fltns;': '\u25b1',
+ 'fnof;': '\u0192',
+ 'Fopf;': '\U0001d53d',
+ 'fopf;': '\U0001d557',
+ 'ForAll;': '\u2200',
+ 'forall;': '\u2200',
+ 'fork;': '\u22d4',
+ 'forkv;': '\u2ad9',
+ 'Fouriertrf;': '\u2131',
+ 'fpartint;': '\u2a0d',
+ 'frac12': '\xbd',
+ 'frac12;': '\xbd',
+ 'frac13;': '\u2153',
+ 'frac14': '\xbc',
+ 'frac14;': '\xbc',
+ 'frac15;': '\u2155',
+ 'frac16;': '\u2159',
+ 'frac18;': '\u215b',
+ 'frac23;': '\u2154',
+ 'frac25;': '\u2156',
+ 'frac34': '\xbe',
+ 'frac34;': '\xbe',
+ 'frac35;': '\u2157',
+ 'frac38;': '\u215c',
+ 'frac45;': '\u2158',
+ 'frac56;': '\u215a',
+ 'frac58;': '\u215d',
+ 'frac78;': '\u215e',
+ 'frasl;': '\u2044',
+ 'frown;': '\u2322',
+ 'Fscr;': '\u2131',
+ 'fscr;': '\U0001d4bb',
+ 'gacute;': '\u01f5',
+ 'Gamma;': '\u0393',
+ 'gamma;': '\u03b3',
+ 'Gammad;': '\u03dc',
+ 'gammad;': '\u03dd',
+ 'gap;': '\u2a86',
+ 'Gbreve;': '\u011e',
+ 'gbreve;': '\u011f',
+ 'Gcedil;': '\u0122',
+ 'Gcirc;': '\u011c',
+ 'gcirc;': '\u011d',
+ 'Gcy;': '\u0413',
+ 'gcy;': '\u0433',
+ 'Gdot;': '\u0120',
+ 'gdot;': '\u0121',
+ 'gE;': '\u2267',
+ 'ge;': '\u2265',
+ 'gEl;': '\u2a8c',
+ 'gel;': '\u22db',
+ 'geq;': '\u2265',
+ 'geqq;': '\u2267',
+ 'geqslant;': '\u2a7e',
+ 'ges;': '\u2a7e',
+ 'gescc;': '\u2aa9',
+ 'gesdot;': '\u2a80',
+ 'gesdoto;': '\u2a82',
+ 'gesdotol;': '\u2a84',
+ 'gesl;': '\u22db\ufe00',
+ 'gesles;': '\u2a94',
+ 'Gfr;': '\U0001d50a',
+ 'gfr;': '\U0001d524',
+ 'Gg;': '\u22d9',
+ 'gg;': '\u226b',
+ 'ggg;': '\u22d9',
+ 'gimel;': '\u2137',
+ 'GJcy;': '\u0403',
+ 'gjcy;': '\u0453',
+ 'gl;': '\u2277',
+ 'gla;': '\u2aa5',
+ 'glE;': '\u2a92',
+ 'glj;': '\u2aa4',
+ 'gnap;': '\u2a8a',
+ 'gnapprox;': '\u2a8a',
+ 'gnE;': '\u2269',
+ 'gne;': '\u2a88',
+ 'gneq;': '\u2a88',
+ 'gneqq;': '\u2269',
+ 'gnsim;': '\u22e7',
+ 'Gopf;': '\U0001d53e',
+ 'gopf;': '\U0001d558',
+ 'grave;': '`',
+ 'GreaterEqual;': '\u2265',
+ 'GreaterEqualLess;': '\u22db',
+ 'GreaterFullEqual;': '\u2267',
+ 'GreaterGreater;': '\u2aa2',
+ 'GreaterLess;': '\u2277',
+ 'GreaterSlantEqual;': '\u2a7e',
+ 'GreaterTilde;': '\u2273',
+ 'Gscr;': '\U0001d4a2',
+ 'gscr;': '\u210a',
+ 'gsim;': '\u2273',
+ 'gsime;': '\u2a8e',
+ 'gsiml;': '\u2a90',
+ 'GT': '>',
+ 'gt': '>',
+ 'GT;': '>',
+ 'Gt;': '\u226b',
+ 'gt;': '>',
+ 'gtcc;': '\u2aa7',
+ 'gtcir;': '\u2a7a',
+ 'gtdot;': '\u22d7',
+ 'gtlPar;': '\u2995',
+ 'gtquest;': '\u2a7c',
+ 'gtrapprox;': '\u2a86',
+ 'gtrarr;': '\u2978',
+ 'gtrdot;': '\u22d7',
+ 'gtreqless;': '\u22db',
+ 'gtreqqless;': '\u2a8c',
+ 'gtrless;': '\u2277',
+ 'gtrsim;': '\u2273',
+ 'gvertneqq;': '\u2269\ufe00',
+ 'gvnE;': '\u2269\ufe00',
+ 'Hacek;': '\u02c7',
+ 'hairsp;': '\u200a',
+ 'half;': '\xbd',
+ 'hamilt;': '\u210b',
+ 'HARDcy;': '\u042a',
+ 'hardcy;': '\u044a',
+ 'hArr;': '\u21d4',
+ 'harr;': '\u2194',
+ 'harrcir;': '\u2948',
+ 'harrw;': '\u21ad',
+ 'Hat;': '^',
+ 'hbar;': '\u210f',
+ 'Hcirc;': '\u0124',
+ 'hcirc;': '\u0125',
+ 'hearts;': '\u2665',
+ 'heartsuit;': '\u2665',
+ 'hellip;': '\u2026',
+ 'hercon;': '\u22b9',
+ 'Hfr;': '\u210c',
+ 'hfr;': '\U0001d525',
+ 'HilbertSpace;': '\u210b',
+ 'hksearow;': '\u2925',
+ 'hkswarow;': '\u2926',
+ 'hoarr;': '\u21ff',
+ 'homtht;': '\u223b',
+ 'hookleftarrow;': '\u21a9',
+ 'hookrightarrow;': '\u21aa',
+ 'Hopf;': '\u210d',
+ 'hopf;': '\U0001d559',
+ 'horbar;': '\u2015',
+ 'HorizontalLine;': '\u2500',
+ 'Hscr;': '\u210b',
+ 'hscr;': '\U0001d4bd',
+ 'hslash;': '\u210f',
+ 'Hstrok;': '\u0126',
+ 'hstrok;': '\u0127',
+ 'HumpDownHump;': '\u224e',
+ 'HumpEqual;': '\u224f',
+ 'hybull;': '\u2043',
+ 'hyphen;': '\u2010',
+ 'Iacute': '\xcd',
+ 'iacute': '\xed',
+ 'Iacute;': '\xcd',
+ 'iacute;': '\xed',
+ 'ic;': '\u2063',
+ 'Icirc': '\xce',
+ 'icirc': '\xee',
+ 'Icirc;': '\xce',
+ 'icirc;': '\xee',
+ 'Icy;': '\u0418',
+ 'icy;': '\u0438',
+ 'Idot;': '\u0130',
+ 'IEcy;': '\u0415',
+ 'iecy;': '\u0435',
+ 'iexcl': '\xa1',
+ 'iexcl;': '\xa1',
+ 'iff;': '\u21d4',
+ 'Ifr;': '\u2111',
+ 'ifr;': '\U0001d526',
+ 'Igrave': '\xcc',
+ 'igrave': '\xec',
+ 'Igrave;': '\xcc',
+ 'igrave;': '\xec',
+ 'ii;': '\u2148',
+ 'iiiint;': '\u2a0c',
+ 'iiint;': '\u222d',
+ 'iinfin;': '\u29dc',
+ 'iiota;': '\u2129',
+ 'IJlig;': '\u0132',
+ 'ijlig;': '\u0133',
+ 'Im;': '\u2111',
+ 'Imacr;': '\u012a',
+ 'imacr;': '\u012b',
+ 'image;': '\u2111',
+ 'ImaginaryI;': '\u2148',
+ 'imagline;': '\u2110',
+ 'imagpart;': '\u2111',
+ 'imath;': '\u0131',
+ 'imof;': '\u22b7',
+ 'imped;': '\u01b5',
+ 'Implies;': '\u21d2',
+ 'in;': '\u2208',
+ 'incare;': '\u2105',
+ 'infin;': '\u221e',
+ 'infintie;': '\u29dd',
+ 'inodot;': '\u0131',
+ 'Int;': '\u222c',
+ 'int;': '\u222b',
+ 'intcal;': '\u22ba',
+ 'integers;': '\u2124',
+ 'Integral;': '\u222b',
+ 'intercal;': '\u22ba',
+ 'Intersection;': '\u22c2',
+ 'intlarhk;': '\u2a17',
+ 'intprod;': '\u2a3c',
+ 'InvisibleComma;': '\u2063',
+ 'InvisibleTimes;': '\u2062',
+ 'IOcy;': '\u0401',
+ 'iocy;': '\u0451',
+ 'Iogon;': '\u012e',
+ 'iogon;': '\u012f',
+ 'Iopf;': '\U0001d540',
+ 'iopf;': '\U0001d55a',
+ 'Iota;': '\u0399',
+ 'iota;': '\u03b9',
+ 'iprod;': '\u2a3c',
+ 'iquest': '\xbf',
+ 'iquest;': '\xbf',
+ 'Iscr;': '\u2110',
+ 'iscr;': '\U0001d4be',
+ 'isin;': '\u2208',
+ 'isindot;': '\u22f5',
+ 'isinE;': '\u22f9',
+ 'isins;': '\u22f4',
+ 'isinsv;': '\u22f3',
+ 'isinv;': '\u2208',
+ 'it;': '\u2062',
+ 'Itilde;': '\u0128',
+ 'itilde;': '\u0129',
+ 'Iukcy;': '\u0406',
+ 'iukcy;': '\u0456',
+ 'Iuml': '\xcf',
+ 'iuml': '\xef',
+ 'Iuml;': '\xcf',
+ 'iuml;': '\xef',
+ 'Jcirc;': '\u0134',
+ 'jcirc;': '\u0135',
+ 'Jcy;': '\u0419',
+ 'jcy;': '\u0439',
+ 'Jfr;': '\U0001d50d',
+ 'jfr;': '\U0001d527',
+ 'jmath;': '\u0237',
+ 'Jopf;': '\U0001d541',
+ 'jopf;': '\U0001d55b',
+ 'Jscr;': '\U0001d4a5',
+ 'jscr;': '\U0001d4bf',
+ 'Jsercy;': '\u0408',
+ 'jsercy;': '\u0458',
+ 'Jukcy;': '\u0404',
+ 'jukcy;': '\u0454',
+ 'Kappa;': '\u039a',
+ 'kappa;': '\u03ba',
+ 'kappav;': '\u03f0',
+ 'Kcedil;': '\u0136',
+ 'kcedil;': '\u0137',
+ 'Kcy;': '\u041a',
+ 'kcy;': '\u043a',
+ 'Kfr;': '\U0001d50e',
+ 'kfr;': '\U0001d528',
+ 'kgreen;': '\u0138',
+ 'KHcy;': '\u0425',
+ 'khcy;': '\u0445',
+ 'KJcy;': '\u040c',
+ 'kjcy;': '\u045c',
+ 'Kopf;': '\U0001d542',
+ 'kopf;': '\U0001d55c',
+ 'Kscr;': '\U0001d4a6',
+ 'kscr;': '\U0001d4c0',
+ 'lAarr;': '\u21da',
+ 'Lacute;': '\u0139',
+ 'lacute;': '\u013a',
+ 'laemptyv;': '\u29b4',
+ 'lagran;': '\u2112',
+ 'Lambda;': '\u039b',
+ 'lambda;': '\u03bb',
+ 'Lang;': '\u27ea',
+ 'lang;': '\u27e8',
+ 'langd;': '\u2991',
+ 'langle;': '\u27e8',
+ 'lap;': '\u2a85',
+ 'Laplacetrf;': '\u2112',
+ 'laquo': '\xab',
+ 'laquo;': '\xab',
+ 'Larr;': '\u219e',
+ 'lArr;': '\u21d0',
+ 'larr;': '\u2190',
+ 'larrb;': '\u21e4',
+ 'larrbfs;': '\u291f',
+ 'larrfs;': '\u291d',
+ 'larrhk;': '\u21a9',
+ 'larrlp;': '\u21ab',
+ 'larrpl;': '\u2939',
+ 'larrsim;': '\u2973',
+ 'larrtl;': '\u21a2',
+ 'lat;': '\u2aab',
+ 'lAtail;': '\u291b',
+ 'latail;': '\u2919',
+ 'late;': '\u2aad',
+ 'lates;': '\u2aad\ufe00',
+ 'lBarr;': '\u290e',
+ 'lbarr;': '\u290c',
+ 'lbbrk;': '\u2772',
+ 'lbrace;': '{',
+ 'lbrack;': '[',
+ 'lbrke;': '\u298b',
+ 'lbrksld;': '\u298f',
+ 'lbrkslu;': '\u298d',
+ 'Lcaron;': '\u013d',
+ 'lcaron;': '\u013e',
+ 'Lcedil;': '\u013b',
+ 'lcedil;': '\u013c',
+ 'lceil;': '\u2308',
+ 'lcub;': '{',
+ 'Lcy;': '\u041b',
+ 'lcy;': '\u043b',
+ 'ldca;': '\u2936',
+ 'ldquo;': '\u201c',
+ 'ldquor;': '\u201e',
+ 'ldrdhar;': '\u2967',
+ 'ldrushar;': '\u294b',
+ 'ldsh;': '\u21b2',
+ 'lE;': '\u2266',
+ 'le;': '\u2264',
+ 'LeftAngleBracket;': '\u27e8',
+ 'LeftArrow;': '\u2190',
+ 'Leftarrow;': '\u21d0',
+ 'leftarrow;': '\u2190',
+ 'LeftArrowBar;': '\u21e4',
+ 'LeftArrowRightArrow;': '\u21c6',
+ 'leftarrowtail;': '\u21a2',
+ 'LeftCeiling;': '\u2308',
+ 'LeftDoubleBracket;': '\u27e6',
+ 'LeftDownTeeVector;': '\u2961',
+ 'LeftDownVector;': '\u21c3',
+ 'LeftDownVectorBar;': '\u2959',
+ 'LeftFloor;': '\u230a',
+ 'leftharpoondown;': '\u21bd',
+ 'leftharpoonup;': '\u21bc',
+ 'leftleftarrows;': '\u21c7',
+ 'LeftRightArrow;': '\u2194',
+ 'Leftrightarrow;': '\u21d4',
+ 'leftrightarrow;': '\u2194',
+ 'leftrightarrows;': '\u21c6',
+ 'leftrightharpoons;': '\u21cb',
+ 'leftrightsquigarrow;': '\u21ad',
+ 'LeftRightVector;': '\u294e',
+ 'LeftTee;': '\u22a3',
+ 'LeftTeeArrow;': '\u21a4',
+ 'LeftTeeVector;': '\u295a',
+ 'leftthreetimes;': '\u22cb',
+ 'LeftTriangle;': '\u22b2',
+ 'LeftTriangleBar;': '\u29cf',
+ 'LeftTriangleEqual;': '\u22b4',
+ 'LeftUpDownVector;': '\u2951',
+ 'LeftUpTeeVector;': '\u2960',
+ 'LeftUpVector;': '\u21bf',
+ 'LeftUpVectorBar;': '\u2958',
+ 'LeftVector;': '\u21bc',
+ 'LeftVectorBar;': '\u2952',
+ 'lEg;': '\u2a8b',
+ 'leg;': '\u22da',
+ 'leq;': '\u2264',
+ 'leqq;': '\u2266',
+ 'leqslant;': '\u2a7d',
+ 'les;': '\u2a7d',
+ 'lescc;': '\u2aa8',
+ 'lesdot;': '\u2a7f',
+ 'lesdoto;': '\u2a81',
+ 'lesdotor;': '\u2a83',
+ 'lesg;': '\u22da\ufe00',
+ 'lesges;': '\u2a93',
+ 'lessapprox;': '\u2a85',
+ 'lessdot;': '\u22d6',
+ 'lesseqgtr;': '\u22da',
+ 'lesseqqgtr;': '\u2a8b',
+ 'LessEqualGreater;': '\u22da',
+ 'LessFullEqual;': '\u2266',
+ 'LessGreater;': '\u2276',
+ 'lessgtr;': '\u2276',
+ 'LessLess;': '\u2aa1',
+ 'lesssim;': '\u2272',
+ 'LessSlantEqual;': '\u2a7d',
+ 'LessTilde;': '\u2272',
+ 'lfisht;': '\u297c',
+ 'lfloor;': '\u230a',
+ 'Lfr;': '\U0001d50f',
+ 'lfr;': '\U0001d529',
+ 'lg;': '\u2276',
+ 'lgE;': '\u2a91',
+ 'lHar;': '\u2962',
+ 'lhard;': '\u21bd',
+ 'lharu;': '\u21bc',
+ 'lharul;': '\u296a',
+ 'lhblk;': '\u2584',
+ 'LJcy;': '\u0409',
+ 'ljcy;': '\u0459',
+ 'Ll;': '\u22d8',
+ 'll;': '\u226a',
+ 'llarr;': '\u21c7',
+ 'llcorner;': '\u231e',
+ 'Lleftarrow;': '\u21da',
+ 'llhard;': '\u296b',
+ 'lltri;': '\u25fa',
+ 'Lmidot;': '\u013f',
+ 'lmidot;': '\u0140',
+ 'lmoust;': '\u23b0',
+ 'lmoustache;': '\u23b0',
+ 'lnap;': '\u2a89',
+ 'lnapprox;': '\u2a89',
+ 'lnE;': '\u2268',
+ 'lne;': '\u2a87',
+ 'lneq;': '\u2a87',
+ 'lneqq;': '\u2268',
+ 'lnsim;': '\u22e6',
+ 'loang;': '\u27ec',
+ 'loarr;': '\u21fd',
+ 'lobrk;': '\u27e6',
+ 'LongLeftArrow;': '\u27f5',
+ 'Longleftarrow;': '\u27f8',
+ 'longleftarrow;': '\u27f5',
+ 'LongLeftRightArrow;': '\u27f7',
+ 'Longleftrightarrow;': '\u27fa',
+ 'longleftrightarrow;': '\u27f7',
+ 'longmapsto;': '\u27fc',
+ 'LongRightArrow;': '\u27f6',
+ 'Longrightarrow;': '\u27f9',
+ 'longrightarrow;': '\u27f6',
+ 'looparrowleft;': '\u21ab',
+ 'looparrowright;': '\u21ac',
+ 'lopar;': '\u2985',
+ 'Lopf;': '\U0001d543',
+ 'lopf;': '\U0001d55d',
+ 'loplus;': '\u2a2d',
+ 'lotimes;': '\u2a34',
+ 'lowast;': '\u2217',
+ 'lowbar;': '_',
+ 'LowerLeftArrow;': '\u2199',
+ 'LowerRightArrow;': '\u2198',
+ 'loz;': '\u25ca',
+ 'lozenge;': '\u25ca',
+ 'lozf;': '\u29eb',
+ 'lpar;': '(',
+ 'lparlt;': '\u2993',
+ 'lrarr;': '\u21c6',
+ 'lrcorner;': '\u231f',
+ 'lrhar;': '\u21cb',
+ 'lrhard;': '\u296d',
+ 'lrm;': '\u200e',
+ 'lrtri;': '\u22bf',
+ 'lsaquo;': '\u2039',
+ 'Lscr;': '\u2112',
+ 'lscr;': '\U0001d4c1',
+ 'Lsh;': '\u21b0',
+ 'lsh;': '\u21b0',
+ 'lsim;': '\u2272',
+ 'lsime;': '\u2a8d',
+ 'lsimg;': '\u2a8f',
+ 'lsqb;': '[',
+ 'lsquo;': '\u2018',
+ 'lsquor;': '\u201a',
+ 'Lstrok;': '\u0141',
+ 'lstrok;': '\u0142',
+ 'LT': '<',
+ 'lt': '<',
+ 'LT;': '<',
+ 'Lt;': '\u226a',
+ 'lt;': '<',
+ 'ltcc;': '\u2aa6',
+ 'ltcir;': '\u2a79',
+ 'ltdot;': '\u22d6',
+ 'lthree;': '\u22cb',
+ 'ltimes;': '\u22c9',
+ 'ltlarr;': '\u2976',
+ 'ltquest;': '\u2a7b',
+ 'ltri;': '\u25c3',
+ 'ltrie;': '\u22b4',
+ 'ltrif;': '\u25c2',
+ 'ltrPar;': '\u2996',
+ 'lurdshar;': '\u294a',
+ 'luruhar;': '\u2966',
+ 'lvertneqq;': '\u2268\ufe00',
+ 'lvnE;': '\u2268\ufe00',
+ 'macr': '\xaf',
+ 'macr;': '\xaf',
+ 'male;': '\u2642',
+ 'malt;': '\u2720',
+ 'maltese;': '\u2720',
+ 'Map;': '\u2905',
+ 'map;': '\u21a6',
+ 'mapsto;': '\u21a6',
+ 'mapstodown;': '\u21a7',
+ 'mapstoleft;': '\u21a4',
+ 'mapstoup;': '\u21a5',
+ 'marker;': '\u25ae',
+ 'mcomma;': '\u2a29',
+ 'Mcy;': '\u041c',
+ 'mcy;': '\u043c',
+ 'mdash;': '\u2014',
+ 'mDDot;': '\u223a',
+ 'measuredangle;': '\u2221',
+ 'MediumSpace;': '\u205f',
+ 'Mellintrf;': '\u2133',
+ 'Mfr;': '\U0001d510',
+ 'mfr;': '\U0001d52a',
+ 'mho;': '\u2127',
+ 'micro': '\xb5',
+ 'micro;': '\xb5',
+ 'mid;': '\u2223',
+ 'midast;': '*',
+ 'midcir;': '\u2af0',
+ 'middot': '\xb7',
+ 'middot;': '\xb7',
+ 'minus;': '\u2212',
+ 'minusb;': '\u229f',
+ 'minusd;': '\u2238',
+ 'minusdu;': '\u2a2a',
+ 'MinusPlus;': '\u2213',
+ 'mlcp;': '\u2adb',
+ 'mldr;': '\u2026',
+ 'mnplus;': '\u2213',
+ 'models;': '\u22a7',
+ 'Mopf;': '\U0001d544',
+ 'mopf;': '\U0001d55e',
+ 'mp;': '\u2213',
+ 'Mscr;': '\u2133',
+ 'mscr;': '\U0001d4c2',
+ 'mstpos;': '\u223e',
+ 'Mu;': '\u039c',
+ 'mu;': '\u03bc',
+ 'multimap;': '\u22b8',
+ 'mumap;': '\u22b8',
+ 'nabla;': '\u2207',
+ 'Nacute;': '\u0143',
+ 'nacute;': '\u0144',
+ 'nang;': '\u2220\u20d2',
+ 'nap;': '\u2249',
+ 'napE;': '\u2a70\u0338',
+ 'napid;': '\u224b\u0338',
+ 'napos;': '\u0149',
+ 'napprox;': '\u2249',
+ 'natur;': '\u266e',
+ 'natural;': '\u266e',
+ 'naturals;': '\u2115',
+ 'nbsp': '\xa0',
+ 'nbsp;': '\xa0',
+ 'nbump;': '\u224e\u0338',
+ 'nbumpe;': '\u224f\u0338',
+ 'ncap;': '\u2a43',
+ 'Ncaron;': '\u0147',
+ 'ncaron;': '\u0148',
+ 'Ncedil;': '\u0145',
+ 'ncedil;': '\u0146',
+ 'ncong;': '\u2247',
+ 'ncongdot;': '\u2a6d\u0338',
+ 'ncup;': '\u2a42',
+ 'Ncy;': '\u041d',
+ 'ncy;': '\u043d',
+ 'ndash;': '\u2013',
+ 'ne;': '\u2260',
+ 'nearhk;': '\u2924',
+ 'neArr;': '\u21d7',
+ 'nearr;': '\u2197',
+ 'nearrow;': '\u2197',
+ 'nedot;': '\u2250\u0338',
+ 'NegativeMediumSpace;': '\u200b',
+ 'NegativeThickSpace;': '\u200b',
+ 'NegativeThinSpace;': '\u200b',
+ 'NegativeVeryThinSpace;': '\u200b',
+ 'nequiv;': '\u2262',
+ 'nesear;': '\u2928',
+ 'nesim;': '\u2242\u0338',
+ 'NestedGreaterGreater;': '\u226b',
+ 'NestedLessLess;': '\u226a',
+ 'NewLine;': '\n',
+ 'nexist;': '\u2204',
+ 'nexists;': '\u2204',
+ 'Nfr;': '\U0001d511',
+ 'nfr;': '\U0001d52b',
+ 'ngE;': '\u2267\u0338',
+ 'nge;': '\u2271',
+ 'ngeq;': '\u2271',
+ 'ngeqq;': '\u2267\u0338',
+ 'ngeqslant;': '\u2a7e\u0338',
+ 'nges;': '\u2a7e\u0338',
+ 'nGg;': '\u22d9\u0338',
+ 'ngsim;': '\u2275',
+ 'nGt;': '\u226b\u20d2',
+ 'ngt;': '\u226f',
+ 'ngtr;': '\u226f',
+ 'nGtv;': '\u226b\u0338',
+ 'nhArr;': '\u21ce',
+ 'nharr;': '\u21ae',
+ 'nhpar;': '\u2af2',
+ 'ni;': '\u220b',
+ 'nis;': '\u22fc',
+ 'nisd;': '\u22fa',
+ 'niv;': '\u220b',
+ 'NJcy;': '\u040a',
+ 'njcy;': '\u045a',
+ 'nlArr;': '\u21cd',
+ 'nlarr;': '\u219a',
+ 'nldr;': '\u2025',
+ 'nlE;': '\u2266\u0338',
+ 'nle;': '\u2270',
+ 'nLeftarrow;': '\u21cd',
+ 'nleftarrow;': '\u219a',
+ 'nLeftrightarrow;': '\u21ce',
+ 'nleftrightarrow;': '\u21ae',
+ 'nleq;': '\u2270',
+ 'nleqq;': '\u2266\u0338',
+ 'nleqslant;': '\u2a7d\u0338',
+ 'nles;': '\u2a7d\u0338',
+ 'nless;': '\u226e',
+ 'nLl;': '\u22d8\u0338',
+ 'nlsim;': '\u2274',
+ 'nLt;': '\u226a\u20d2',
+ 'nlt;': '\u226e',
+ 'nltri;': '\u22ea',
+ 'nltrie;': '\u22ec',
+ 'nLtv;': '\u226a\u0338',
+ 'nmid;': '\u2224',
+ 'NoBreak;': '\u2060',
+ 'NonBreakingSpace;': '\xa0',
+ 'Nopf;': '\u2115',
+ 'nopf;': '\U0001d55f',
+ 'not': '\xac',
+ 'Not;': '\u2aec',
+ 'not;': '\xac',
+ 'NotCongruent;': '\u2262',
+ 'NotCupCap;': '\u226d',
+ 'NotDoubleVerticalBar;': '\u2226',
+ 'NotElement;': '\u2209',
+ 'NotEqual;': '\u2260',
+ 'NotEqualTilde;': '\u2242\u0338',
+ 'NotExists;': '\u2204',
+ 'NotGreater;': '\u226f',
+ 'NotGreaterEqual;': '\u2271',
+ 'NotGreaterFullEqual;': '\u2267\u0338',
+ 'NotGreaterGreater;': '\u226b\u0338',
+ 'NotGreaterLess;': '\u2279',
+ 'NotGreaterSlantEqual;': '\u2a7e\u0338',
+ 'NotGreaterTilde;': '\u2275',
+ 'NotHumpDownHump;': '\u224e\u0338',
+ 'NotHumpEqual;': '\u224f\u0338',
+ 'notin;': '\u2209',
+ 'notindot;': '\u22f5\u0338',
+ 'notinE;': '\u22f9\u0338',
+ 'notinva;': '\u2209',
+ 'notinvb;': '\u22f7',
+ 'notinvc;': '\u22f6',
+ 'NotLeftTriangle;': '\u22ea',
+ 'NotLeftTriangleBar;': '\u29cf\u0338',
+ 'NotLeftTriangleEqual;': '\u22ec',
+ 'NotLess;': '\u226e',
+ 'NotLessEqual;': '\u2270',
+ 'NotLessGreater;': '\u2278',
+ 'NotLessLess;': '\u226a\u0338',
+ 'NotLessSlantEqual;': '\u2a7d\u0338',
+ 'NotLessTilde;': '\u2274',
+ 'NotNestedGreaterGreater;': '\u2aa2\u0338',
+ 'NotNestedLessLess;': '\u2aa1\u0338',
+ 'notni;': '\u220c',
+ 'notniva;': '\u220c',
+ 'notnivb;': '\u22fe',
+ 'notnivc;': '\u22fd',
+ 'NotPrecedes;': '\u2280',
+ 'NotPrecedesEqual;': '\u2aaf\u0338',
+ 'NotPrecedesSlantEqual;': '\u22e0',
+ 'NotReverseElement;': '\u220c',
+ 'NotRightTriangle;': '\u22eb',
+ 'NotRightTriangleBar;': '\u29d0\u0338',
+ 'NotRightTriangleEqual;': '\u22ed',
+ 'NotSquareSubset;': '\u228f\u0338',
+ 'NotSquareSubsetEqual;': '\u22e2',
+ 'NotSquareSuperset;': '\u2290\u0338',
+ 'NotSquareSupersetEqual;': '\u22e3',
+ 'NotSubset;': '\u2282\u20d2',
+ 'NotSubsetEqual;': '\u2288',
+ 'NotSucceeds;': '\u2281',
+ 'NotSucceedsEqual;': '\u2ab0\u0338',
+ 'NotSucceedsSlantEqual;': '\u22e1',
+ 'NotSucceedsTilde;': '\u227f\u0338',
+ 'NotSuperset;': '\u2283\u20d2',
+ 'NotSupersetEqual;': '\u2289',
+ 'NotTilde;': '\u2241',
+ 'NotTildeEqual;': '\u2244',
+ 'NotTildeFullEqual;': '\u2247',
+ 'NotTildeTilde;': '\u2249',
+ 'NotVerticalBar;': '\u2224',
+ 'npar;': '\u2226',
+ 'nparallel;': '\u2226',
+ 'nparsl;': '\u2afd\u20e5',
+ 'npart;': '\u2202\u0338',
+ 'npolint;': '\u2a14',
+ 'npr;': '\u2280',
+ 'nprcue;': '\u22e0',
+ 'npre;': '\u2aaf\u0338',
+ 'nprec;': '\u2280',
+ 'npreceq;': '\u2aaf\u0338',
+ 'nrArr;': '\u21cf',
+ 'nrarr;': '\u219b',
+ 'nrarrc;': '\u2933\u0338',
+ 'nrarrw;': '\u219d\u0338',
+ 'nRightarrow;': '\u21cf',
+ 'nrightarrow;': '\u219b',
+ 'nrtri;': '\u22eb',
+ 'nrtrie;': '\u22ed',
+ 'nsc;': '\u2281',
+ 'nsccue;': '\u22e1',
+ 'nsce;': '\u2ab0\u0338',
+ 'Nscr;': '\U0001d4a9',
+ 'nscr;': '\U0001d4c3',
+ 'nshortmid;': '\u2224',
+ 'nshortparallel;': '\u2226',
+ 'nsim;': '\u2241',
+ 'nsime;': '\u2244',
+ 'nsimeq;': '\u2244',
+ 'nsmid;': '\u2224',
+ 'nspar;': '\u2226',
+ 'nsqsube;': '\u22e2',
+ 'nsqsupe;': '\u22e3',
+ 'nsub;': '\u2284',
+ 'nsubE;': '\u2ac5\u0338',
+ 'nsube;': '\u2288',
+ 'nsubset;': '\u2282\u20d2',
+ 'nsubseteq;': '\u2288',
+ 'nsubseteqq;': '\u2ac5\u0338',
+ 'nsucc;': '\u2281',
+ 'nsucceq;': '\u2ab0\u0338',
+ 'nsup;': '\u2285',
+ 'nsupE;': '\u2ac6\u0338',
+ 'nsupe;': '\u2289',
+ 'nsupset;': '\u2283\u20d2',
+ 'nsupseteq;': '\u2289',
+ 'nsupseteqq;': '\u2ac6\u0338',
+ 'ntgl;': '\u2279',
+ 'Ntilde': '\xd1',
+ 'ntilde': '\xf1',
+ 'Ntilde;': '\xd1',
+ 'ntilde;': '\xf1',
+ 'ntlg;': '\u2278',
+ 'ntriangleleft;': '\u22ea',
+ 'ntrianglelefteq;': '\u22ec',
+ 'ntriangleright;': '\u22eb',
+ 'ntrianglerighteq;': '\u22ed',
+ 'Nu;': '\u039d',
+ 'nu;': '\u03bd',
+ 'num;': '#',
+ 'numero;': '\u2116',
+ 'numsp;': '\u2007',
+ 'nvap;': '\u224d\u20d2',
+ 'nVDash;': '\u22af',
+ 'nVdash;': '\u22ae',
+ 'nvDash;': '\u22ad',
+ 'nvdash;': '\u22ac',
+ 'nvge;': '\u2265\u20d2',
+ 'nvgt;': '>\u20d2',
+ 'nvHarr;': '\u2904',
+ 'nvinfin;': '\u29de',
+ 'nvlArr;': '\u2902',
+ 'nvle;': '\u2264\u20d2',
+ 'nvlt;': '<\u20d2',
+ 'nvltrie;': '\u22b4\u20d2',
+ 'nvrArr;': '\u2903',
+ 'nvrtrie;': '\u22b5\u20d2',
+ 'nvsim;': '\u223c\u20d2',
+ 'nwarhk;': '\u2923',
+ 'nwArr;': '\u21d6',
+ 'nwarr;': '\u2196',
+ 'nwarrow;': '\u2196',
+ 'nwnear;': '\u2927',
+ 'Oacute': '\xd3',
+ 'oacute': '\xf3',
+ 'Oacute;': '\xd3',
+ 'oacute;': '\xf3',
+ 'oast;': '\u229b',
+ 'ocir;': '\u229a',
+ 'Ocirc': '\xd4',
+ 'ocirc': '\xf4',
+ 'Ocirc;': '\xd4',
+ 'ocirc;': '\xf4',
+ 'Ocy;': '\u041e',
+ 'ocy;': '\u043e',
+ 'odash;': '\u229d',
+ 'Odblac;': '\u0150',
+ 'odblac;': '\u0151',
+ 'odiv;': '\u2a38',
+ 'odot;': '\u2299',
+ 'odsold;': '\u29bc',
+ 'OElig;': '\u0152',
+ 'oelig;': '\u0153',
+ 'ofcir;': '\u29bf',
+ 'Ofr;': '\U0001d512',
+ 'ofr;': '\U0001d52c',
+ 'ogon;': '\u02db',
+ 'Ograve': '\xd2',
+ 'ograve': '\xf2',
+ 'Ograve;': '\xd2',
+ 'ograve;': '\xf2',
+ 'ogt;': '\u29c1',
+ 'ohbar;': '\u29b5',
+ 'ohm;': '\u03a9',
+ 'oint;': '\u222e',
+ 'olarr;': '\u21ba',
+ 'olcir;': '\u29be',
+ 'olcross;': '\u29bb',
+ 'oline;': '\u203e',
+ 'olt;': '\u29c0',
+ 'Omacr;': '\u014c',
+ 'omacr;': '\u014d',
+ 'Omega;': '\u03a9',
+ 'omega;': '\u03c9',
+ 'Omicron;': '\u039f',
+ 'omicron;': '\u03bf',
+ 'omid;': '\u29b6',
+ 'ominus;': '\u2296',
+ 'Oopf;': '\U0001d546',
+ 'oopf;': '\U0001d560',
+ 'opar;': '\u29b7',
+ 'OpenCurlyDoubleQuote;': '\u201c',
+ 'OpenCurlyQuote;': '\u2018',
+ 'operp;': '\u29b9',
+ 'oplus;': '\u2295',
+ 'Or;': '\u2a54',
+ 'or;': '\u2228',
+ 'orarr;': '\u21bb',
+ 'ord;': '\u2a5d',
+ 'order;': '\u2134',
+ 'orderof;': '\u2134',
+ 'ordf': '\xaa',
+ 'ordf;': '\xaa',
+ 'ordm': '\xba',
+ 'ordm;': '\xba',
+ 'origof;': '\u22b6',
+ 'oror;': '\u2a56',
+ 'orslope;': '\u2a57',
+ 'orv;': '\u2a5b',
+ 'oS;': '\u24c8',
+ 'Oscr;': '\U0001d4aa',
+ 'oscr;': '\u2134',
+ 'Oslash': '\xd8',
+ 'oslash': '\xf8',
+ 'Oslash;': '\xd8',
+ 'oslash;': '\xf8',
+ 'osol;': '\u2298',
+ 'Otilde': '\xd5',
+ 'otilde': '\xf5',
+ 'Otilde;': '\xd5',
+ 'otilde;': '\xf5',
+ 'Otimes;': '\u2a37',
+ 'otimes;': '\u2297',
+ 'otimesas;': '\u2a36',
+ 'Ouml': '\xd6',
+ 'ouml': '\xf6',
+ 'Ouml;': '\xd6',
+ 'ouml;': '\xf6',
+ 'ovbar;': '\u233d',
+ 'OverBar;': '\u203e',
+ 'OverBrace;': '\u23de',
+ 'OverBracket;': '\u23b4',
+ 'OverParenthesis;': '\u23dc',
+ 'par;': '\u2225',
+ 'para': '\xb6',
+ 'para;': '\xb6',
+ 'parallel;': '\u2225',
+ 'parsim;': '\u2af3',
+ 'parsl;': '\u2afd',
+ 'part;': '\u2202',
+ 'PartialD;': '\u2202',
+ 'Pcy;': '\u041f',
+ 'pcy;': '\u043f',
+ 'percnt;': '%',
+ 'period;': '.',
+ 'permil;': '\u2030',
+ 'perp;': '\u22a5',
+ 'pertenk;': '\u2031',
+ 'Pfr;': '\U0001d513',
+ 'pfr;': '\U0001d52d',
+ 'Phi;': '\u03a6',
+ 'phi;': '\u03c6',
+ 'phiv;': '\u03d5',
+ 'phmmat;': '\u2133',
+ 'phone;': '\u260e',
+ 'Pi;': '\u03a0',
+ 'pi;': '\u03c0',
+ 'pitchfork;': '\u22d4',
+ 'piv;': '\u03d6',
+ 'planck;': '\u210f',
+ 'planckh;': '\u210e',
+ 'plankv;': '\u210f',
+ 'plus;': '+',
+ 'plusacir;': '\u2a23',
+ 'plusb;': '\u229e',
+ 'pluscir;': '\u2a22',
+ 'plusdo;': '\u2214',
+ 'plusdu;': '\u2a25',
+ 'pluse;': '\u2a72',
+ 'PlusMinus;': '\xb1',
+ 'plusmn': '\xb1',
+ 'plusmn;': '\xb1',
+ 'plussim;': '\u2a26',
+ 'plustwo;': '\u2a27',
+ 'pm;': '\xb1',
+ 'Poincareplane;': '\u210c',
+ 'pointint;': '\u2a15',
+ 'Popf;': '\u2119',
+ 'popf;': '\U0001d561',
+ 'pound': '\xa3',
+ 'pound;': '\xa3',
+ 'Pr;': '\u2abb',
+ 'pr;': '\u227a',
+ 'prap;': '\u2ab7',
+ 'prcue;': '\u227c',
+ 'prE;': '\u2ab3',
+ 'pre;': '\u2aaf',
+ 'prec;': '\u227a',
+ 'precapprox;': '\u2ab7',
+ 'preccurlyeq;': '\u227c',
+ 'Precedes;': '\u227a',
+ 'PrecedesEqual;': '\u2aaf',
+ 'PrecedesSlantEqual;': '\u227c',
+ 'PrecedesTilde;': '\u227e',
+ 'preceq;': '\u2aaf',
+ 'precnapprox;': '\u2ab9',
+ 'precneqq;': '\u2ab5',
+ 'precnsim;': '\u22e8',
+ 'precsim;': '\u227e',
+ 'Prime;': '\u2033',
+ 'prime;': '\u2032',
+ 'primes;': '\u2119',
+ 'prnap;': '\u2ab9',
+ 'prnE;': '\u2ab5',
+ 'prnsim;': '\u22e8',
+ 'prod;': '\u220f',
+ 'Product;': '\u220f',
+ 'profalar;': '\u232e',
+ 'profline;': '\u2312',
+ 'profsurf;': '\u2313',
+ 'prop;': '\u221d',
+ 'Proportion;': '\u2237',
+ 'Proportional;': '\u221d',
+ 'propto;': '\u221d',
+ 'prsim;': '\u227e',
+ 'prurel;': '\u22b0',
+ 'Pscr;': '\U0001d4ab',
+ 'pscr;': '\U0001d4c5',
+ 'Psi;': '\u03a8',
+ 'psi;': '\u03c8',
+ 'puncsp;': '\u2008',
+ 'Qfr;': '\U0001d514',
+ 'qfr;': '\U0001d52e',
+ 'qint;': '\u2a0c',
+ 'Qopf;': '\u211a',
+ 'qopf;': '\U0001d562',
+ 'qprime;': '\u2057',
+ 'Qscr;': '\U0001d4ac',
+ 'qscr;': '\U0001d4c6',
+ 'quaternions;': '\u210d',
+ 'quatint;': '\u2a16',
+ 'quest;': '?',
+ 'questeq;': '\u225f',
+ 'QUOT': '"',
+ 'quot': '"',
+ 'QUOT;': '"',
+ 'quot;': '"',
+ 'rAarr;': '\u21db',
+ 'race;': '\u223d\u0331',
+ 'Racute;': '\u0154',
+ 'racute;': '\u0155',
+ 'radic;': '\u221a',
+ 'raemptyv;': '\u29b3',
+ 'Rang;': '\u27eb',
+ 'rang;': '\u27e9',
+ 'rangd;': '\u2992',
+ 'range;': '\u29a5',
+ 'rangle;': '\u27e9',
+ 'raquo': '\xbb',
+ 'raquo;': '\xbb',
+ 'Rarr;': '\u21a0',
+ 'rArr;': '\u21d2',
+ 'rarr;': '\u2192',
+ 'rarrap;': '\u2975',
+ 'rarrb;': '\u21e5',
+ 'rarrbfs;': '\u2920',
+ 'rarrc;': '\u2933',
+ 'rarrfs;': '\u291e',
+ 'rarrhk;': '\u21aa',
+ 'rarrlp;': '\u21ac',
+ 'rarrpl;': '\u2945',
+ 'rarrsim;': '\u2974',
+ 'Rarrtl;': '\u2916',
+ 'rarrtl;': '\u21a3',
+ 'rarrw;': '\u219d',
+ 'rAtail;': '\u291c',
+ 'ratail;': '\u291a',
+ 'ratio;': '\u2236',
+ 'rationals;': '\u211a',
+ 'RBarr;': '\u2910',
+ 'rBarr;': '\u290f',
+ 'rbarr;': '\u290d',
+ 'rbbrk;': '\u2773',
+ 'rbrace;': '}',
+ 'rbrack;': ']',
+ 'rbrke;': '\u298c',
+ 'rbrksld;': '\u298e',
+ 'rbrkslu;': '\u2990',
+ 'Rcaron;': '\u0158',
+ 'rcaron;': '\u0159',
+ 'Rcedil;': '\u0156',
+ 'rcedil;': '\u0157',
+ 'rceil;': '\u2309',
+ 'rcub;': '}',
+ 'Rcy;': '\u0420',
+ 'rcy;': '\u0440',
+ 'rdca;': '\u2937',
+ 'rdldhar;': '\u2969',
+ 'rdquo;': '\u201d',
+ 'rdquor;': '\u201d',
+ 'rdsh;': '\u21b3',
+ 'Re;': '\u211c',
+ 'real;': '\u211c',
+ 'realine;': '\u211b',
+ 'realpart;': '\u211c',
+ 'reals;': '\u211d',
+ 'rect;': '\u25ad',
+ 'REG': '\xae',
+ 'reg': '\xae',
+ 'REG;': '\xae',
+ 'reg;': '\xae',
+ 'ReverseElement;': '\u220b',
+ 'ReverseEquilibrium;': '\u21cb',
+ 'ReverseUpEquilibrium;': '\u296f',
+ 'rfisht;': '\u297d',
+ 'rfloor;': '\u230b',
+ 'Rfr;': '\u211c',
+ 'rfr;': '\U0001d52f',
+ 'rHar;': '\u2964',
+ 'rhard;': '\u21c1',
+ 'rharu;': '\u21c0',
+ 'rharul;': '\u296c',
+ 'Rho;': '\u03a1',
+ 'rho;': '\u03c1',
+ 'rhov;': '\u03f1',
+ 'RightAngleBracket;': '\u27e9',
+ 'RightArrow;': '\u2192',
+ 'Rightarrow;': '\u21d2',
+ 'rightarrow;': '\u2192',
+ 'RightArrowBar;': '\u21e5',
+ 'RightArrowLeftArrow;': '\u21c4',
+ 'rightarrowtail;': '\u21a3',
+ 'RightCeiling;': '\u2309',
+ 'RightDoubleBracket;': '\u27e7',
+ 'RightDownTeeVector;': '\u295d',
+ 'RightDownVector;': '\u21c2',
+ 'RightDownVectorBar;': '\u2955',
+ 'RightFloor;': '\u230b',
+ 'rightharpoondown;': '\u21c1',
+ 'rightharpoonup;': '\u21c0',
+ 'rightleftarrows;': '\u21c4',
+ 'rightleftharpoons;': '\u21cc',
+ 'rightrightarrows;': '\u21c9',
+ 'rightsquigarrow;': '\u219d',
+ 'RightTee;': '\u22a2',
+ 'RightTeeArrow;': '\u21a6',
+ 'RightTeeVector;': '\u295b',
+ 'rightthreetimes;': '\u22cc',
+ 'RightTriangle;': '\u22b3',
+ 'RightTriangleBar;': '\u29d0',
+ 'RightTriangleEqual;': '\u22b5',
+ 'RightUpDownVector;': '\u294f',
+ 'RightUpTeeVector;': '\u295c',
+ 'RightUpVector;': '\u21be',
+ 'RightUpVectorBar;': '\u2954',
+ 'RightVector;': '\u21c0',
+ 'RightVectorBar;': '\u2953',
+ 'ring;': '\u02da',
+ 'risingdotseq;': '\u2253',
+ 'rlarr;': '\u21c4',
+ 'rlhar;': '\u21cc',
+ 'rlm;': '\u200f',
+ 'rmoust;': '\u23b1',
+ 'rmoustache;': '\u23b1',
+ 'rnmid;': '\u2aee',
+ 'roang;': '\u27ed',
+ 'roarr;': '\u21fe',
+ 'robrk;': '\u27e7',
+ 'ropar;': '\u2986',
+ 'Ropf;': '\u211d',
+ 'ropf;': '\U0001d563',
+ 'roplus;': '\u2a2e',
+ 'rotimes;': '\u2a35',
+ 'RoundImplies;': '\u2970',
+ 'rpar;': ')',
+ 'rpargt;': '\u2994',
+ 'rppolint;': '\u2a12',
+ 'rrarr;': '\u21c9',
+ 'Rrightarrow;': '\u21db',
+ 'rsaquo;': '\u203a',
+ 'Rscr;': '\u211b',
+ 'rscr;': '\U0001d4c7',
+ 'Rsh;': '\u21b1',
+ 'rsh;': '\u21b1',
+ 'rsqb;': ']',
+ 'rsquo;': '\u2019',
+ 'rsquor;': '\u2019',
+ 'rthree;': '\u22cc',
+ 'rtimes;': '\u22ca',
+ 'rtri;': '\u25b9',
+ 'rtrie;': '\u22b5',
+ 'rtrif;': '\u25b8',
+ 'rtriltri;': '\u29ce',
+ 'RuleDelayed;': '\u29f4',
+ 'ruluhar;': '\u2968',
+ 'rx;': '\u211e',
+ 'Sacute;': '\u015a',
+ 'sacute;': '\u015b',
+ 'sbquo;': '\u201a',
+ 'Sc;': '\u2abc',
+ 'sc;': '\u227b',
+ 'scap;': '\u2ab8',
+ 'Scaron;': '\u0160',
+ 'scaron;': '\u0161',
+ 'sccue;': '\u227d',
+ 'scE;': '\u2ab4',
+ 'sce;': '\u2ab0',
+ 'Scedil;': '\u015e',
+ 'scedil;': '\u015f',
+ 'Scirc;': '\u015c',
+ 'scirc;': '\u015d',
+ 'scnap;': '\u2aba',
+ 'scnE;': '\u2ab6',
+ 'scnsim;': '\u22e9',
+ 'scpolint;': '\u2a13',
+ 'scsim;': '\u227f',
+ 'Scy;': '\u0421',
+ 'scy;': '\u0441',
+ 'sdot;': '\u22c5',
+ 'sdotb;': '\u22a1',
+ 'sdote;': '\u2a66',
+ 'searhk;': '\u2925',
+ 'seArr;': '\u21d8',
+ 'searr;': '\u2198',
+ 'searrow;': '\u2198',
+ 'sect': '\xa7',
+ 'sect;': '\xa7',
+ 'semi;': ';',
+ 'seswar;': '\u2929',
+ 'setminus;': '\u2216',
+ 'setmn;': '\u2216',
+ 'sext;': '\u2736',
+ 'Sfr;': '\U0001d516',
+ 'sfr;': '\U0001d530',
+ 'sfrown;': '\u2322',
+ 'sharp;': '\u266f',
+ 'SHCHcy;': '\u0429',
+ 'shchcy;': '\u0449',
+ 'SHcy;': '\u0428',
+ 'shcy;': '\u0448',
+ 'ShortDownArrow;': '\u2193',
+ 'ShortLeftArrow;': '\u2190',
+ 'shortmid;': '\u2223',
+ 'shortparallel;': '\u2225',
+ 'ShortRightArrow;': '\u2192',
+ 'ShortUpArrow;': '\u2191',
+ 'shy': '\xad',
+ 'shy;': '\xad',
+ 'Sigma;': '\u03a3',
+ 'sigma;': '\u03c3',
+ 'sigmaf;': '\u03c2',
+ 'sigmav;': '\u03c2',
+ 'sim;': '\u223c',
+ 'simdot;': '\u2a6a',
+ 'sime;': '\u2243',
+ 'simeq;': '\u2243',
+ 'simg;': '\u2a9e',
+ 'simgE;': '\u2aa0',
+ 'siml;': '\u2a9d',
+ 'simlE;': '\u2a9f',
+ 'simne;': '\u2246',
+ 'simplus;': '\u2a24',
+ 'simrarr;': '\u2972',
+ 'slarr;': '\u2190',
+ 'SmallCircle;': '\u2218',
+ 'smallsetminus;': '\u2216',
+ 'smashp;': '\u2a33',
+ 'smeparsl;': '\u29e4',
+ 'smid;': '\u2223',
+ 'smile;': '\u2323',
+ 'smt;': '\u2aaa',
+ 'smte;': '\u2aac',
+ 'smtes;': '\u2aac\ufe00',
+ 'SOFTcy;': '\u042c',
+ 'softcy;': '\u044c',
+ 'sol;': '/',
+ 'solb;': '\u29c4',
+ 'solbar;': '\u233f',
+ 'Sopf;': '\U0001d54a',
+ 'sopf;': '\U0001d564',
+ 'spades;': '\u2660',
+ 'spadesuit;': '\u2660',
+ 'spar;': '\u2225',
+ 'sqcap;': '\u2293',
+ 'sqcaps;': '\u2293\ufe00',
+ 'sqcup;': '\u2294',
+ 'sqcups;': '\u2294\ufe00',
+ 'Sqrt;': '\u221a',
+ 'sqsub;': '\u228f',
+ 'sqsube;': '\u2291',
+ 'sqsubset;': '\u228f',
+ 'sqsubseteq;': '\u2291',
+ 'sqsup;': '\u2290',
+ 'sqsupe;': '\u2292',
+ 'sqsupset;': '\u2290',
+ 'sqsupseteq;': '\u2292',
+ 'squ;': '\u25a1',
+ 'Square;': '\u25a1',
+ 'square;': '\u25a1',
+ 'SquareIntersection;': '\u2293',
+ 'SquareSubset;': '\u228f',
+ 'SquareSubsetEqual;': '\u2291',
+ 'SquareSuperset;': '\u2290',
+ 'SquareSupersetEqual;': '\u2292',
+ 'SquareUnion;': '\u2294',
+ 'squarf;': '\u25aa',
+ 'squf;': '\u25aa',
+ 'srarr;': '\u2192',
+ 'Sscr;': '\U0001d4ae',
+ 'sscr;': '\U0001d4c8',
+ 'ssetmn;': '\u2216',
+ 'ssmile;': '\u2323',
+ 'sstarf;': '\u22c6',
+ 'Star;': '\u22c6',
+ 'star;': '\u2606',
+ 'starf;': '\u2605',
+ 'straightepsilon;': '\u03f5',
+ 'straightphi;': '\u03d5',
+ 'strns;': '\xaf',
+ 'Sub;': '\u22d0',
+ 'sub;': '\u2282',
+ 'subdot;': '\u2abd',
+ 'subE;': '\u2ac5',
+ 'sube;': '\u2286',
+ 'subedot;': '\u2ac3',
+ 'submult;': '\u2ac1',
+ 'subnE;': '\u2acb',
+ 'subne;': '\u228a',
+ 'subplus;': '\u2abf',
+ 'subrarr;': '\u2979',
+ 'Subset;': '\u22d0',
+ 'subset;': '\u2282',
+ 'subseteq;': '\u2286',
+ 'subseteqq;': '\u2ac5',
+ 'SubsetEqual;': '\u2286',
+ 'subsetneq;': '\u228a',
+ 'subsetneqq;': '\u2acb',
+ 'subsim;': '\u2ac7',
+ 'subsub;': '\u2ad5',
+ 'subsup;': '\u2ad3',
+ 'succ;': '\u227b',
+ 'succapprox;': '\u2ab8',
+ 'succcurlyeq;': '\u227d',
+ 'Succeeds;': '\u227b',
+ 'SucceedsEqual;': '\u2ab0',
+ 'SucceedsSlantEqual;': '\u227d',
+ 'SucceedsTilde;': '\u227f',
+ 'succeq;': '\u2ab0',
+ 'succnapprox;': '\u2aba',
+ 'succneqq;': '\u2ab6',
+ 'succnsim;': '\u22e9',
+ 'succsim;': '\u227f',
+ 'SuchThat;': '\u220b',
+ 'Sum;': '\u2211',
+ 'sum;': '\u2211',
+ 'sung;': '\u266a',
+ 'sup1': '\xb9',
+ 'sup1;': '\xb9',
+ 'sup2': '\xb2',
+ 'sup2;': '\xb2',
+ 'sup3': '\xb3',
+ 'sup3;': '\xb3',
+ 'Sup;': '\u22d1',
+ 'sup;': '\u2283',
+ 'supdot;': '\u2abe',
+ 'supdsub;': '\u2ad8',
+ 'supE;': '\u2ac6',
+ 'supe;': '\u2287',
+ 'supedot;': '\u2ac4',
+ 'Superset;': '\u2283',
+ 'SupersetEqual;': '\u2287',
+ 'suphsol;': '\u27c9',
+ 'suphsub;': '\u2ad7',
+ 'suplarr;': '\u297b',
+ 'supmult;': '\u2ac2',
+ 'supnE;': '\u2acc',
+ 'supne;': '\u228b',
+ 'supplus;': '\u2ac0',
+ 'Supset;': '\u22d1',
+ 'supset;': '\u2283',
+ 'supseteq;': '\u2287',
+ 'supseteqq;': '\u2ac6',
+ 'supsetneq;': '\u228b',
+ 'supsetneqq;': '\u2acc',
+ 'supsim;': '\u2ac8',
+ 'supsub;': '\u2ad4',
+ 'supsup;': '\u2ad6',
+ 'swarhk;': '\u2926',
+ 'swArr;': '\u21d9',
+ 'swarr;': '\u2199',
+ 'swarrow;': '\u2199',
+ 'swnwar;': '\u292a',
+ 'szlig': '\xdf',
+ 'szlig;': '\xdf',
+ 'Tab;': '\t',
+ 'target;': '\u2316',
+ 'Tau;': '\u03a4',
+ 'tau;': '\u03c4',
+ 'tbrk;': '\u23b4',
+ 'Tcaron;': '\u0164',
+ 'tcaron;': '\u0165',
+ 'Tcedil;': '\u0162',
+ 'tcedil;': '\u0163',
+ 'Tcy;': '\u0422',
+ 'tcy;': '\u0442',
+ 'tdot;': '\u20db',
+ 'telrec;': '\u2315',
+ 'Tfr;': '\U0001d517',
+ 'tfr;': '\U0001d531',
+ 'there4;': '\u2234',
+ 'Therefore;': '\u2234',
+ 'therefore;': '\u2234',
+ 'Theta;': '\u0398',
+ 'theta;': '\u03b8',
+ 'thetasym;': '\u03d1',
+ 'thetav;': '\u03d1',
+ 'thickapprox;': '\u2248',
+ 'thicksim;': '\u223c',
+ 'ThickSpace;': '\u205f\u200a',
+ 'thinsp;': '\u2009',
+ 'ThinSpace;': '\u2009',
+ 'thkap;': '\u2248',
+ 'thksim;': '\u223c',
+ 'THORN': '\xde',
+ 'thorn': '\xfe',
+ 'THORN;': '\xde',
+ 'thorn;': '\xfe',
+ 'Tilde;': '\u223c',
+ 'tilde;': '\u02dc',
+ 'TildeEqual;': '\u2243',
+ 'TildeFullEqual;': '\u2245',
+ 'TildeTilde;': '\u2248',
+ 'times': '\xd7',
+ 'times;': '\xd7',
+ 'timesb;': '\u22a0',
+ 'timesbar;': '\u2a31',
+ 'timesd;': '\u2a30',
+ 'tint;': '\u222d',
+ 'toea;': '\u2928',
+ 'top;': '\u22a4',
+ 'topbot;': '\u2336',
+ 'topcir;': '\u2af1',
+ 'Topf;': '\U0001d54b',
+ 'topf;': '\U0001d565',
+ 'topfork;': '\u2ada',
+ 'tosa;': '\u2929',
+ 'tprime;': '\u2034',
+ 'TRADE;': '\u2122',
+ 'trade;': '\u2122',
+ 'triangle;': '\u25b5',
+ 'triangledown;': '\u25bf',
+ 'triangleleft;': '\u25c3',
+ 'trianglelefteq;': '\u22b4',
+ 'triangleq;': '\u225c',
+ 'triangleright;': '\u25b9',
+ 'trianglerighteq;': '\u22b5',
+ 'tridot;': '\u25ec',
+ 'trie;': '\u225c',
+ 'triminus;': '\u2a3a',
+ 'TripleDot;': '\u20db',
+ 'triplus;': '\u2a39',
+ 'trisb;': '\u29cd',
+ 'tritime;': '\u2a3b',
+ 'trpezium;': '\u23e2',
+ 'Tscr;': '\U0001d4af',
+ 'tscr;': '\U0001d4c9',
+ 'TScy;': '\u0426',
+ 'tscy;': '\u0446',
+ 'TSHcy;': '\u040b',
+ 'tshcy;': '\u045b',
+ 'Tstrok;': '\u0166',
+ 'tstrok;': '\u0167',
+ 'twixt;': '\u226c',
+ 'twoheadleftarrow;': '\u219e',
+ 'twoheadrightarrow;': '\u21a0',
+ 'Uacute': '\xda',
+ 'uacute': '\xfa',
+ 'Uacute;': '\xda',
+ 'uacute;': '\xfa',
+ 'Uarr;': '\u219f',
+ 'uArr;': '\u21d1',
+ 'uarr;': '\u2191',
+ 'Uarrocir;': '\u2949',
+ 'Ubrcy;': '\u040e',
+ 'ubrcy;': '\u045e',
+ 'Ubreve;': '\u016c',
+ 'ubreve;': '\u016d',
+ 'Ucirc': '\xdb',
+ 'ucirc': '\xfb',
+ 'Ucirc;': '\xdb',
+ 'ucirc;': '\xfb',
+ 'Ucy;': '\u0423',
+ 'ucy;': '\u0443',
+ 'udarr;': '\u21c5',
+ 'Udblac;': '\u0170',
+ 'udblac;': '\u0171',
+ 'udhar;': '\u296e',
+ 'ufisht;': '\u297e',
+ 'Ufr;': '\U0001d518',
+ 'ufr;': '\U0001d532',
+ 'Ugrave': '\xd9',
+ 'ugrave': '\xf9',
+ 'Ugrave;': '\xd9',
+ 'ugrave;': '\xf9',
+ 'uHar;': '\u2963',
+ 'uharl;': '\u21bf',
+ 'uharr;': '\u21be',
+ 'uhblk;': '\u2580',
+ 'ulcorn;': '\u231c',
+ 'ulcorner;': '\u231c',
+ 'ulcrop;': '\u230f',
+ 'ultri;': '\u25f8',
+ 'Umacr;': '\u016a',
+ 'umacr;': '\u016b',
+ 'uml': '\xa8',
+ 'uml;': '\xa8',
+ 'UnderBar;': '_',
+ 'UnderBrace;': '\u23df',
+ 'UnderBracket;': '\u23b5',
+ 'UnderParenthesis;': '\u23dd',
+ 'Union;': '\u22c3',
+ 'UnionPlus;': '\u228e',
+ 'Uogon;': '\u0172',
+ 'uogon;': '\u0173',
+ 'Uopf;': '\U0001d54c',
+ 'uopf;': '\U0001d566',
+ 'UpArrow;': '\u2191',
+ 'Uparrow;': '\u21d1',
+ 'uparrow;': '\u2191',
+ 'UpArrowBar;': '\u2912',
+ 'UpArrowDownArrow;': '\u21c5',
+ 'UpDownArrow;': '\u2195',
+ 'Updownarrow;': '\u21d5',
+ 'updownarrow;': '\u2195',
+ 'UpEquilibrium;': '\u296e',
+ 'upharpoonleft;': '\u21bf',
+ 'upharpoonright;': '\u21be',
+ 'uplus;': '\u228e',
+ 'UpperLeftArrow;': '\u2196',
+ 'UpperRightArrow;': '\u2197',
+ 'Upsi;': '\u03d2',
+ 'upsi;': '\u03c5',
+ 'upsih;': '\u03d2',
+ 'Upsilon;': '\u03a5',
+ 'upsilon;': '\u03c5',
+ 'UpTee;': '\u22a5',
+ 'UpTeeArrow;': '\u21a5',
+ 'upuparrows;': '\u21c8',
+ 'urcorn;': '\u231d',
+ 'urcorner;': '\u231d',
+ 'urcrop;': '\u230e',
+ 'Uring;': '\u016e',
+ 'uring;': '\u016f',
+ 'urtri;': '\u25f9',
+ 'Uscr;': '\U0001d4b0',
+ 'uscr;': '\U0001d4ca',
+ 'utdot;': '\u22f0',
+ 'Utilde;': '\u0168',
+ 'utilde;': '\u0169',
+ 'utri;': '\u25b5',
+ 'utrif;': '\u25b4',
+ 'uuarr;': '\u21c8',
+ 'Uuml': '\xdc',
+ 'uuml': '\xfc',
+ 'Uuml;': '\xdc',
+ 'uuml;': '\xfc',
+ 'uwangle;': '\u29a7',
+ 'vangrt;': '\u299c',
+ 'varepsilon;': '\u03f5',
+ 'varkappa;': '\u03f0',
+ 'varnothing;': '\u2205',
+ 'varphi;': '\u03d5',
+ 'varpi;': '\u03d6',
+ 'varpropto;': '\u221d',
+ 'vArr;': '\u21d5',
+ 'varr;': '\u2195',
+ 'varrho;': '\u03f1',
+ 'varsigma;': '\u03c2',
+ 'varsubsetneq;': '\u228a\ufe00',
+ 'varsubsetneqq;': '\u2acb\ufe00',
+ 'varsupsetneq;': '\u228b\ufe00',
+ 'varsupsetneqq;': '\u2acc\ufe00',
+ 'vartheta;': '\u03d1',
+ 'vartriangleleft;': '\u22b2',
+ 'vartriangleright;': '\u22b3',
+ 'Vbar;': '\u2aeb',
+ 'vBar;': '\u2ae8',
+ 'vBarv;': '\u2ae9',
+ 'Vcy;': '\u0412',
+ 'vcy;': '\u0432',
+ 'VDash;': '\u22ab',
+ 'Vdash;': '\u22a9',
+ 'vDash;': '\u22a8',
+ 'vdash;': '\u22a2',
+ 'Vdashl;': '\u2ae6',
+ 'Vee;': '\u22c1',
+ 'vee;': '\u2228',
+ 'veebar;': '\u22bb',
+ 'veeeq;': '\u225a',
+ 'vellip;': '\u22ee',
+ 'Verbar;': '\u2016',
+ 'verbar;': '|',
+ 'Vert;': '\u2016',
+ 'vert;': '|',
+ 'VerticalBar;': '\u2223',
+ 'VerticalLine;': '|',
+ 'VerticalSeparator;': '\u2758',
+ 'VerticalTilde;': '\u2240',
+ 'VeryThinSpace;': '\u200a',
+ 'Vfr;': '\U0001d519',
+ 'vfr;': '\U0001d533',
+ 'vltri;': '\u22b2',
+ 'vnsub;': '\u2282\u20d2',
+ 'vnsup;': '\u2283\u20d2',
+ 'Vopf;': '\U0001d54d',
+ 'vopf;': '\U0001d567',
+ 'vprop;': '\u221d',
+ 'vrtri;': '\u22b3',
+ 'Vscr;': '\U0001d4b1',
+ 'vscr;': '\U0001d4cb',
+ 'vsubnE;': '\u2acb\ufe00',
+ 'vsubne;': '\u228a\ufe00',
+ 'vsupnE;': '\u2acc\ufe00',
+ 'vsupne;': '\u228b\ufe00',
+ 'Vvdash;': '\u22aa',
+ 'vzigzag;': '\u299a',
+ 'Wcirc;': '\u0174',
+ 'wcirc;': '\u0175',
+ 'wedbar;': '\u2a5f',
+ 'Wedge;': '\u22c0',
+ 'wedge;': '\u2227',
+ 'wedgeq;': '\u2259',
+ 'weierp;': '\u2118',
+ 'Wfr;': '\U0001d51a',
+ 'wfr;': '\U0001d534',
+ 'Wopf;': '\U0001d54e',
+ 'wopf;': '\U0001d568',
+ 'wp;': '\u2118',
+ 'wr;': '\u2240',
+ 'wreath;': '\u2240',
+ 'Wscr;': '\U0001d4b2',
+ 'wscr;': '\U0001d4cc',
+ 'xcap;': '\u22c2',
+ 'xcirc;': '\u25ef',
+ 'xcup;': '\u22c3',
+ 'xdtri;': '\u25bd',
+ 'Xfr;': '\U0001d51b',
+ 'xfr;': '\U0001d535',
+ 'xhArr;': '\u27fa',
+ 'xharr;': '\u27f7',
+ 'Xi;': '\u039e',
+ 'xi;': '\u03be',
+ 'xlArr;': '\u27f8',
+ 'xlarr;': '\u27f5',
+ 'xmap;': '\u27fc',
+ 'xnis;': '\u22fb',
+ 'xodot;': '\u2a00',
+ 'Xopf;': '\U0001d54f',
+ 'xopf;': '\U0001d569',
+ 'xoplus;': '\u2a01',
+ 'xotime;': '\u2a02',
+ 'xrArr;': '\u27f9',
+ 'xrarr;': '\u27f6',
+ 'Xscr;': '\U0001d4b3',
+ 'xscr;': '\U0001d4cd',
+ 'xsqcup;': '\u2a06',
+ 'xuplus;': '\u2a04',
+ 'xutri;': '\u25b3',
+ 'xvee;': '\u22c1',
+ 'xwedge;': '\u22c0',
+ 'Yacute': '\xdd',
+ 'yacute': '\xfd',
+ 'Yacute;': '\xdd',
+ 'yacute;': '\xfd',
+ 'YAcy;': '\u042f',
+ 'yacy;': '\u044f',
+ 'Ycirc;': '\u0176',
+ 'ycirc;': '\u0177',
+ 'Ycy;': '\u042b',
+ 'ycy;': '\u044b',
+ 'yen': '\xa5',
+ 'yen;': '\xa5',
+ 'Yfr;': '\U0001d51c',
+ 'yfr;': '\U0001d536',
+ 'YIcy;': '\u0407',
+ 'yicy;': '\u0457',
+ 'Yopf;': '\U0001d550',
+ 'yopf;': '\U0001d56a',
+ 'Yscr;': '\U0001d4b4',
+ 'yscr;': '\U0001d4ce',
+ 'YUcy;': '\u042e',
+ 'yucy;': '\u044e',
+ 'yuml': '\xff',
+ 'Yuml;': '\u0178',
+ 'yuml;': '\xff',
+ 'Zacute;': '\u0179',
+ 'zacute;': '\u017a',
+ 'Zcaron;': '\u017d',
+ 'zcaron;': '\u017e',
+ 'Zcy;': '\u0417',
+ 'zcy;': '\u0437',
+ 'Zdot;': '\u017b',
+ 'zdot;': '\u017c',
+ 'zeetrf;': '\u2128',
+ 'ZeroWidthSpace;': '\u200b',
+ 'Zeta;': '\u0396',
+ 'zeta;': '\u03b6',
+ 'Zfr;': '\u2128',
+ 'zfr;': '\U0001d537',
+ 'ZHcy;': '\u0416',
+ 'zhcy;': '\u0436',
+ 'zigrarr;': '\u21dd',
+ 'Zopf;': '\u2124',
+ 'zopf;': '\U0001d56b',
+ 'Zscr;': '\U0001d4b5',
+ 'zscr;': '\U0001d4cf',
+ 'zwj;': '\u200d',
+ 'zwnj;': '\u200c',
}
@@ -2411,7 +2411,7 @@ class EntitySubstitution(object):
# followed by \u0338.
particles.add("%s(?![%s])" % (short, ignore))
- for long_entities in long_entities_by_first_character.values():
+ for long_entities in list(long_entities_by_first_character.values()):
for long_entity in long_entities:
particles.add(long_entity)
@@ -2423,8 +2423,8 @@ class EntitySubstitution(object):
# named entities, the codepoint2name name should take
# precedence where possible, since that's the more easily
# recognizable one.
- for codepoint, name in codepoint2name.items():
- character = unichr(codepoint)
+ for codepoint, name in list(codepoint2name.items()):
+ character = chr(codepoint)
unicode_to_name[character] = name
return unicode_to_name, name_to_unicode, re.compile(re_definition)
@@ -2699,7 +2699,7 @@ class EncodingDetector:
:return: A 2-tuple (modified data, implied encoding)
"""
encoding = None
- if isinstance(data, unicode):
+ if isinstance(data, str):
# Unicode data cannot have a byte-order mark.
return data, encoding
if (len(data) >= 4) and (data[:2] == b'\xfe\xff') \
@@ -2746,7 +2746,7 @@ class EncodingDetector:
if isinstance(markup, bytes):
res = encoding_res[bytes]
else:
- res = encoding_res[unicode]
+ res = encoding_res[str]
xml_re = res['xml']
html_re = res['html']
@@ -2830,9 +2830,9 @@ class UnicodeDammit:
)
# Short-circuit if the data is in Unicode to begin with.
- if isinstance(markup, unicode) or markup == '':
+ if isinstance(markup, str) or markup == '':
self.markup = markup
- self.unicode_markup = unicode(markup)
+ self.unicode_markup = str(markup)
self.original_encoding = None
return
@@ -2922,7 +2922,7 @@ class UnicodeDammit:
:param encoding: The name of an encoding.
"""
- return unicode(data, encoding, errors)
+ return str(data, encoding, errors)
@property
def declared_html_encoding(self):
diff --git a/bs4/diagnose.py b/bs4/diagnose.py
index e4f2f47..500e92d 100644
--- a/bs4/diagnose.py
+++ b/bs4/diagnose.py
@@ -4,8 +4,8 @@
__license__ = "MIT"
import cProfile
-from StringIO import StringIO
-from HTMLParser import HTMLParser
+from io import StringIO
+from html.parser import HTMLParser
import bs4
from bs4 import BeautifulSoup, __version__
from bs4.builder import builder_registry
@@ -25,8 +25,8 @@ def diagnose(data):
:param data: A string containing markup that needs to be explained.
:return: None; diagnostics are printed to standard output.
"""
- print("Diagnostic running on Beautiful Soup %s" % __version__)
- print("Python version %s" % sys.version)
+ print(("Diagnostic running on Beautiful Soup %s" % __version__))
+ print(("Python version %s" % sys.version))
basic_parsers = ["html.parser", "html5lib", "lxml"]
for name in basic_parsers:
@@ -35,16 +35,16 @@ def diagnose(data):
break
else:
basic_parsers.remove(name)
- print(
+ print((
"I noticed that %s is not installed. Installing it may help." %
- name)
+ name))
if 'lxml' in basic_parsers:
basic_parsers.append("lxml-xml")
try:
from lxml import etree
- print("Found lxml version %s" % ".".join(map(str,etree.LXML_VERSION)))
- except ImportError, e:
+ print(("Found lxml version %s" % ".".join(map(str,etree.LXML_VERSION))))
+ except ImportError as e:
print(
"lxml is not installed or couldn't be imported.")
@@ -52,21 +52,21 @@ def diagnose(data):
if 'html5lib' in basic_parsers:
try:
import html5lib
- print("Found html5lib version %s" % html5lib.__version__)
- except ImportError, e:
+ print(("Found html5lib version %s" % html5lib.__version__))
+ except ImportError as e:
print(
"html5lib is not installed or couldn't be imported.")
if hasattr(data, 'read'):
data = data.read()
elif data.startswith("http:") or data.startswith("https:"):
- print('"%s" looks like a URL. Beautiful Soup is not an HTTP client.' % data)
+ print(('"%s" looks like a URL. Beautiful Soup is not an HTTP client.' % data))
print("You need to use some other library to get the document behind the URL, and feed that document to Beautiful Soup.")
return
else:
try:
if os.path.exists(data):
- print('"%s" looks like a filename. Reading data from the file.' % data)
+ print(('"%s" looks like a filename. Reading data from the file.' % data))
with open(data) as fp:
data = fp.read()
except ValueError:
@@ -76,19 +76,19 @@ def diagnose(data):
print("")
for parser in basic_parsers:
- print("Trying to parse your markup with %s" % parser)
+ print(("Trying to parse your markup with %s" % parser))
success = False
try:
soup = BeautifulSoup(data, features=parser)
success = True
- except Exception, e:
- print("%s could not parse the markup." % parser)
+ except Exception as e:
+ print(("%s could not parse the markup." % parser))
traceback.print_exc()
if success:
- print("Here's what %s did with the markup:" % parser)
- print(soup.prettify())
+ print(("Here's what %s did with the markup:" % parser))
+ print((soup.prettify()))
- print("-" * 80)
+ print(("-" * 80))
def lxml_trace(data, html=True, **kwargs):
"""Print out the lxml events that occur during parsing.
@@ -104,7 +104,7 @@ def lxml_trace(data, html=True, **kwargs):
"""
from lxml import etree
for event, element in etree.iterparse(StringIO(data), html=html, **kwargs):
- print("%s, %4s, %s" % (event, element.tag, element.text))
+ print(("%s, %4s, %s" % (event, element.tag, element.text)))
class AnnouncingParser(HTMLParser):
"""Subclass of HTMLParser that announces parse events, without doing
@@ -193,9 +193,9 @@ def rdoc(num_elements=1000):
def benchmark_parsers(num_elements=100000):
"""Very basic head-to-head performance benchmark."""
- print("Comparative parser benchmark on Beautiful Soup %s" % __version__)
+ print(("Comparative parser benchmark on Beautiful Soup %s" % __version__))
data = rdoc(num_elements)
- print("Generated a large invalid HTML document (%d bytes)." % len(data))
+ print(("Generated a large invalid HTML document (%d bytes)." % len(data)))
for parser in ["lxml", ["lxml", "html"], "html5lib", "html.parser"]:
success = False
@@ -204,24 +204,24 @@ def benchmark_parsers(num_elements=100000):
soup = BeautifulSoup(data, parser)
b = time.time()
success = True
- except Exception, e:
- print("%s could not parse the markup." % parser)
+ except Exception as e:
+ print(("%s could not parse the markup." % parser))
traceback.print_exc()
if success:
- print("BS4+%s parsed the markup in %.2fs." % (parser, b-a))
+ print(("BS4+%s parsed the markup in %.2fs." % (parser, b-a)))
from lxml import etree
a = time.time()
etree.HTML(data)
b = time.time()
- print("Raw lxml parsed the markup in %.2fs." % (b-a))
+ print(("Raw lxml parsed the markup in %.2fs." % (b-a)))
import html5lib
parser = html5lib.HTMLParser()
a = time.time()
parser.parse(data)
b = time.time()
- print("Raw html5lib parsed the markup in %.2fs." % (b-a))
+ print(("Raw html5lib parsed the markup in %.2fs." % (b-a)))
def profile(num_elements=100000, parser="lxml"):
"""Use Python's profiler on a randomly generated document."""
diff --git a/bs4/element.py b/bs4/element.py
index e7867a9..82a986e 100644
--- a/bs4/element.py
+++ b/bs4/element.py
@@ -3,14 +3,14 @@ __license__ = "MIT"
try:
from collections.abc import Callable # Python 3.6
-except ImportError , e:
+except ImportError as e:
from collections import Callable
import re
import sys
import warnings
try:
import soupsieve
-except ImportError, e:
+except ImportError as e:
soupsieve = None
warnings.warn(
'The soupsieve package is not installed. CSS selectors cannot be used.'
@@ -57,22 +57,22 @@ def _alias(attr):
# Source:
# https://docs.python.org/3/library/codecs.html#python-specific-encodings
PYTHON_SPECIFIC_ENCODINGS = set([
- u"idna",
- u"mbcs",
- u"oem",
- u"palmos",
- u"punycode",
- u"raw_unicode_escape",
- u"undefined",
- u"unicode_escape",
- u"raw-unicode-escape",
- u"unicode-escape",
- u"string-escape",
- u"string_escape",
+ "idna",
+ "mbcs",
+ "oem",
+ "palmos",
+ "punycode",
+ "raw_unicode_escape",
+ "undefined",
+ "unicode_escape",
+ "raw-unicode-escape",
+ "unicode-escape",
+ "string-escape",
+ "string_escape",
])
-class NamespacedAttribute(unicode):
+class NamespacedAttribute(str):
"""A namespaced string (e.g. 'xml:lang') that remembers the namespace
('xml') and the name ('lang') that were used to create it.
"""
@@ -84,18 +84,18 @@ class NamespacedAttribute(unicode):
name = None
if not name:
- obj = unicode.__new__(cls, prefix)
+ obj = str.__new__(cls, prefix)
elif not prefix:
# Not really namespaced.
- obj = unicode.__new__(cls, name)
+ obj = str.__new__(cls, name)
else:
- obj = unicode.__new__(cls, prefix + ":" + name)
+ obj = str.__new__(cls, prefix + ":" + name)
obj.prefix = prefix
obj.name = name
obj.namespace = namespace
return obj
-class AttributeValueWithCharsetSubstitution(unicode):
+class AttributeValueWithCharsetSubstitution(str):
"""A stand-in object for a character encoding specified in HTML."""
class CharsetMetaAttributeValue(AttributeValueWithCharsetSubstitution):
@@ -106,7 +106,7 @@ class CharsetMetaAttributeValue(AttributeValueWithCharsetSubstitution):
"""
def __new__(cls, original_value):
- obj = unicode.__new__(cls, original_value)
+ obj = str.__new__(cls, original_value)
obj.original_value = original_value
return obj
@@ -134,9 +134,9 @@ class ContentMetaAttributeValue(AttributeValueWithCharsetSubstitution):
match = cls.CHARSET_RE.search(original_value)
if match is None:
# No substitution necessary.
- return unicode.__new__(unicode, original_value)
+ return str.__new__(str, original_value)
- obj = unicode.__new__(cls, original_value)
+ obj = str.__new__(cls, original_value)
obj.original_value = original_value
return obj
@@ -272,7 +272,7 @@ class PageElement(object):
for string in self._all_strings(True):
yield string
- def get_text(self, separator=u"", strip=False,
+ def get_text(self, separator="", strip=False,
types=default):
"""Get all child strings of this PageElement, concatenated using the
given separator.
@@ -418,7 +418,7 @@ class PageElement(object):
raise ValueError("Cannot insert None into a tag.")
if new_child is self:
raise ValueError("Cannot insert a tag into itself.")
- if (isinstance(new_child, basestring)
+ if (isinstance(new_child, str)
and not isinstance(new_child, NavigableString)):
new_child = NavigableString(new_child)
@@ -795,7 +795,7 @@ class PageElement(object):
result = (element for element in generator
if isinstance(element, Tag))
return ResultSet(strainer, result)
- elif isinstance(name, basestring):
+ elif isinstance(name, str):
# Optimization to find all tags with a given name.
if name.count(':') == 1:
# This is a name with a prefix. If this is a namespace-aware document,
@@ -914,7 +914,7 @@ class PageElement(object):
return self.parents
-class NavigableString(unicode, PageElement):
+class NavigableString(str, PageElement):
"""A Python Unicode string that is part of a parse tree.
When Beautiful Soup parses the markup <b>penguin</b>, it will
@@ -937,10 +937,10 @@ class NavigableString(unicode, PageElement):
passed in to the superclass's __new__ or the superclass won't know
how to handle non-ASCII characters.
"""
- if isinstance(value, unicode):
- u = unicode.__new__(cls, value)
+ if isinstance(value, str):
+ u = str.__new__(cls, value)
else:
- u = unicode.__new__(cls, value, DEFAULT_OUTPUT_ENCODING)
+ u = str.__new__(cls, value, DEFAULT_OUTPUT_ENCODING)
u.setup()
return u
@@ -951,7 +951,7 @@ class NavigableString(unicode, PageElement):
return type(self)(self)
def __getnewargs__(self):
- return (unicode(self),)
+ return (str(self),)
def __getattr__(self, attr):
"""text.string gives you text. This is for backwards
@@ -1059,30 +1059,30 @@ class PreformattedString(NavigableString):
class CData(PreformattedString):
"""A CDATA block."""
- PREFIX = u'<![CDATA['
- SUFFIX = u']]>'
+ PREFIX = '<![CDATA['
+ SUFFIX = ']]>'
class ProcessingInstruction(PreformattedString):
"""A SGML processing instruction."""
- PREFIX = u'<?'
- SUFFIX = u'>'
+ PREFIX = '<?'
+ SUFFIX = '>'
class XMLProcessingInstruction(ProcessingInstruction):
"""An XML processing instruction."""
- PREFIX = u'<?'
- SUFFIX = u'?>'
+ PREFIX = '<?'
+ SUFFIX = '?>'
class Comment(PreformattedString):
"""An HTML or XML comment."""
- PREFIX = u'<!--'
- SUFFIX = u'-->'
+ PREFIX = '<!--'
+ SUFFIX = '-->'
class Declaration(PreformattedString):
"""An XML declaration."""
- PREFIX = u'<?'
- SUFFIX = u'?>'
+ PREFIX = '<?'
+ SUFFIX = '?>'
class Doctype(PreformattedString):
@@ -1110,8 +1110,8 @@ class Doctype(PreformattedString):
return Doctype(value)
- PREFIX = u'<!DOCTYPE '
- SUFFIX = u'>\n'
+ PREFIX = '<!DOCTYPE '
+ SUFFIX = '>\n'
class Stylesheet(NavigableString):
@@ -1496,7 +1496,7 @@ class Tag(PageElement):
def __contains__(self, x):
return x in self.contents
- def __nonzero__(self):
+ def __bool__(self):
"A tag is non-None even if it has no contents."
return True
@@ -1645,8 +1645,8 @@ class Tag(PageElement):
else:
if isinstance(val, list) or isinstance(val, tuple):
val = ' '.join(val)
- elif not isinstance(val, basestring):
- val = unicode(val)
+ elif not isinstance(val, str):
+ val = str(val)
elif (
isinstance(val, AttributeValueWithCharsetSubstitution)
and eventual_encoding is not None
@@ -1655,7 +1655,7 @@ class Tag(PageElement):
text = formatter.attribute_value(val)
decoded = (
- unicode(key) + '='
+ str(key) + '='
+ formatter.quoted_attribute_value(text))
attrs.append(decoded)
close = ''
@@ -2014,7 +2014,7 @@ class SoupStrainer(object):
else:
attrs = kwargs
normalized_attrs = {}
- for key, value in attrs.items():
+ for key, value in list(attrs.items()):
normalized_attrs[key] = self._normalize_search_value(value)
self.attrs = normalized_attrs
@@ -2023,7 +2023,7 @@ class SoupStrainer(object):
def _normalize_search_value(self, value):
# Leave it alone if it's a Unicode string, a callable, a
# regular expression, a boolean, or None.
- if (isinstance(value, unicode) or isinstance(value, Callable) or hasattr(value, 'match')
+ if (isinstance(value, str) or isinstance(value, Callable) or hasattr(value, 'match')
or isinstance(value, bool) or value is None):
return value
@@ -2036,7 +2036,7 @@ class SoupStrainer(object):
new_value = []
for v in value:
if (hasattr(v, '__iter__') and not isinstance(v, bytes)
- and not isinstance(v, unicode)):
+ and not isinstance(v, str)):
# This is almost certainly the user's mistake. In the
# interests of avoiding infinite loops, we'll let
# it through as-is rather than doing a recursive call.
@@ -2048,7 +2048,7 @@ class SoupStrainer(object):
# Otherwise, convert it into a Unicode string.
# The unicode(str()) thing is so this will do the same thing on Python 2
# and Python 3.
- return unicode(str(value))
+ return str(str(value))
def __str__(self):
"""A human-readable representation of this SoupStrainer."""
@@ -2076,7 +2076,7 @@ class SoupStrainer(object):
markup = markup_name
markup_attrs = markup
- if isinstance(self.name, basestring):
+ if isinstance(self.name, str):
# Optimization for a very common case where the user is
# searching for a tag with one specific name, and we're
# looking at a tag with a different name.
@@ -2132,7 +2132,7 @@ class SoupStrainer(object):
found = None
# If given a list of items, scan it for a text element that
# matches.
- if hasattr(markup, '__iter__') and not isinstance(markup, (Tag, basestring)):
+ if hasattr(markup, '__iter__') and not isinstance(markup, (Tag, str)):
for element in markup:
if isinstance(element, NavigableString) \
and self.search(element):
@@ -2145,7 +2145,7 @@ class SoupStrainer(object):
found = self.search_tag(markup)
# If it's text, make sure the text matches.
elif isinstance(markup, NavigableString) or \
- isinstance(markup, basestring):
+ isinstance(markup, str):
if not self.name and not self.attrs and self._matches(markup, self.text):
found = markup
else:
@@ -2190,7 +2190,7 @@ class SoupStrainer(object):
return not match_against
if (hasattr(match_against, '__iter__')
- and not isinstance(match_against, basestring)):
+ and not isinstance(match_against, str)):
# We're asked to match against an iterable of items.
# The markup must be match at least one item in the
# iterable. We'll try each one in turn.
@@ -2217,7 +2217,7 @@ class SoupStrainer(object):
# the tag's name and once against its prefixed name.
match = False
- if not match and isinstance(match_against, unicode):
+ if not match and isinstance(match_against, str):
# Exact string match
match = markup == match_against
diff --git a/bs4/formatter.py b/bs4/formatter.py
index 82d4689..3bd9f85 100644
--- a/bs4/formatter.py
+++ b/bs4/formatter.py
@@ -89,7 +89,7 @@ class Formatter(EntitySubstitution):
"""
if not self.entity_substitution:
return ns
- from element import NavigableString
+ from .element import NavigableString
if (isinstance(ns, NavigableString)
and ns.parent is not None
and ns.parent.name in self.cdata_containing_tags):
@@ -122,7 +122,7 @@ class Formatter(EntitySubstitution):
return []
return sorted(
(k, (None if self.empty_attributes_are_booleans and v == '' else v))
- for k, v in tag.attrs.items()
+ for k, v in list(tag.attrs.items())
)
class HTMLFormatter(Formatter):
diff --git a/bs4/testing.py b/bs4/testing.py
index 5b0eb7c..2f9046a 100644
--- a/bs4/testing.py
+++ b/bs4/testing.py
@@ -26,7 +26,7 @@ from bs4.element import (
from bs4.builder import HTMLParserTreeBuilder
default_builder = HTMLParserTreeBuilder
-BAD_DOCUMENT = u"""A bare string
+BAD_DOCUMENT = """A bare string
<!DOCTYPE xsl:stylesheet SYSTEM "htmlent.dtd">
<!DOCTYPE xsl:stylesheet PUBLIC "htmlent.dtd">
<div><![CDATA[A CDATA section where it doesn't belong]]></div>
@@ -95,7 +95,7 @@ class SoupTest(unittest.TestCase):
# Verify that every tag that was opened was eventually closed.
# There are no tags in the open tag counter.
- assert all(v==0 for v in obj.open_tag_counter.values())
+ assert all(v==0 for v in list(obj.open_tag_counter.values()))
# The only tag in the tag stack is the one for the root
# document.
@@ -407,7 +407,7 @@ class HTMLTreeBuilderSmokeTest(TreeBuilderSmokeTest):
# process_markup correctly sets processing_instruction_class
# even when the markup is already Unicode and there is no
# need to process anything.
- markup = u"""<?PITarget PIContent?>"""
+ markup = """<?PITarget PIContent?>"""
soup = self.soup(markup)
self.assertEqual(markup, soup.decode())
@@ -579,14 +579,14 @@ Hello, world!
# "&T" and "&p" look like incomplete character entities, but they are
# not.
self.assertSoupEquals(
- u"<p>&bull; AT&T is in the s&p 500</p>",
- u"<p>\u2022 AT&amp;T is in the s&amp;p 500</p>"
+ "<p>&bull; AT&T is in the s&p 500</p>",
+ "<p>\u2022 AT&amp;T is in the s&amp;p 500</p>"
)
def test_apos_entity(self):
self.assertSoupEquals(
- u"<p>Bob&apos;s Bar</p>",
- u"<p>Bob's Bar</p>",
+ "<p>Bob&apos;s Bar</p>",
+ "<p>Bob's Bar</p>",
)
def test_entities_in_foreign_document_encoding(self):
@@ -599,17 +599,17 @@ Hello, world!
# characters.
markup = "<p>&#147;Hello&#148; &#45;&#9731;</p>"
soup = self.soup(markup)
- self.assertEquals(u"“Hello” -☃", soup.p.string)
+ self.assertEqual("“Hello” -☃", soup.p.string)
def test_entities_in_attributes_converted_to_unicode(self):
- expect = u'<p id="pi\N{LATIN SMALL LETTER N WITH TILDE}ata"></p>'
+ expect = '<p id="pi\N{LATIN SMALL LETTER N WITH TILDE}ata"></p>'
self.assertSoupEquals('<p id="pi&#241;ata"></p>', expect)
self.assertSoupEquals('<p id="pi&#xf1;ata"></p>', expect)
self.assertSoupEquals('<p id="pi&#Xf1;ata"></p>', expect)
self.assertSoupEquals('<p id="pi&ntilde;ata"></p>', expect)
def test_entities_in_text_converted_to_unicode(self):
- expect = u'<p>pi\N{LATIN SMALL LETTER N WITH TILDE}ata</p>'
+ expect = '<p>pi\N{LATIN SMALL LETTER N WITH TILDE}ata</p>'
self.assertSoupEquals("<p>pi&#241;ata</p>", expect)
self.assertSoupEquals("<p>pi&#xf1;ata</p>", expect)
self.assertSoupEquals("<p>pi&#Xf1;ata</p>", expect)
@@ -620,7 +620,7 @@ Hello, world!
'<p>I said "good day!"</p>')
def test_out_of_range_entity(self):
- expect = u"\N{REPLACEMENT CHARACTER}"
+ expect = "\N{REPLACEMENT CHARACTER}"
self.assertSoupEquals("&#10000000000000;", expect)
self.assertSoupEquals("&#x10000000000000;", expect)
self.assertSoupEquals("&#1000000000;", expect)
@@ -698,9 +698,9 @@ Hello, world!
# A seemingly innocuous document... but it's in Unicode! And
# it contains characters that can't be represented in the
# encoding found in the declaration! The horror!
- markup = u'<html><head><meta encoding="euc-jp"></head><body>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</body>'
+ markup = '<html><head><meta encoding="euc-jp"></head><body>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</body>'
soup = self.soup(markup)
- self.assertEqual(u'Sacr\xe9 bleu!', soup.body.string)
+ self.assertEqual('Sacr\xe9 bleu!', soup.body.string)
def test_soupstrainer(self):
"""Parsers should be able to work with SoupStrainers."""
@@ -740,7 +740,7 @@ Hello, world!
# Both XML and HTML entities are converted to Unicode characters
# during parsing.
text = "<p>&lt;&lt;sacr&eacute;&#32;bleu!&gt;&gt;</p>"
- expected = u"<p>&lt;&lt;sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</p>"
+ expected = "<p>&lt;&lt;sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</p>"
self.assertSoupEquals(text, expected)
def test_smart_quotes_converted_on_the_way_in(self):
@@ -750,15 +750,15 @@ Hello, world!
soup = self.soup(quote)
self.assertEqual(
soup.p.string,
- u"\N{LEFT SINGLE QUOTATION MARK}Foo\N{RIGHT SINGLE QUOTATION MARK}")
+ "\N{LEFT SINGLE QUOTATION MARK}Foo\N{RIGHT SINGLE QUOTATION MARK}")
def test_non_breaking_spaces_converted_on_the_way_in(self):
soup = self.soup("<a>&nbsp;&nbsp;</a>")
- self.assertEqual(soup.a.string, u"\N{NO-BREAK SPACE}" * 2)
+ self.assertEqual(soup.a.string, "\N{NO-BREAK SPACE}" * 2)
def test_entities_converted_on_the_way_out(self):
text = "<p>&lt;&lt;sacr&eacute;&#32;bleu!&gt;&gt;</p>"
- expected = u"<p>&lt;&lt;sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</p>".encode("utf-8")
+ expected = "<p>&lt;&lt;sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</p>".encode("utf-8")
soup = self.soup(text)
self.assertEqual(soup.p.encode("utf-8"), expected)
@@ -767,7 +767,7 @@ Hello, world!
# easy-to-understand document.
# Here it is in Unicode. Note that it claims to be in ISO-Latin-1.
- unicode_html = u'<html><head><meta content="text/html; charset=ISO-Latin-1" http-equiv="Content-type"/></head><body><p>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</p></body></html>'
+ unicode_html = '<html><head><meta content="text/html; charset=ISO-Latin-1" http-equiv="Content-type"/></head><body><p>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</p></body></html>'
# That's because we're going to encode it into ISO-Latin-1, and use
# that to test.
@@ -883,8 +883,8 @@ Hello, world!
soup = self.soup(markup)
for encoding in PYTHON_SPECIFIC_ENCODINGS:
if encoding in (
- u'idna', u'mbcs', u'oem', u'undefined',
- u'string_escape', u'string-escape'
+ 'idna', 'mbcs', 'oem', 'undefined',
+ 'string_escape', 'string-escape'
):
# For one reason or another, these will raise an
# exception if we actually try to use them, so don't
@@ -945,8 +945,8 @@ class XMLTreeBuilderSmokeTest(TreeBuilderSmokeTest):
soup = self.soup(markup)
for encoding in PYTHON_SPECIFIC_ENCODINGS:
if encoding in (
- u'idna', u'mbcs', u'oem', u'undefined',
- u'string_escape', u'string-escape'
+ 'idna', 'mbcs', 'oem', 'undefined',
+ 'string_escape', 'string-escape'
):
# For one reason or another, these will raise an
# exception if we actually try to use them, so don't
@@ -997,15 +997,15 @@ class XMLTreeBuilderSmokeTest(TreeBuilderSmokeTest):
self.assertTrue(b"&lt; &lt; hey &gt; &gt;" in encoded)
def test_can_parse_unicode_document(self):
- markup = u'<?xml version="1.0" encoding="euc-jp"><root>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</root>'
+ markup = '<?xml version="1.0" encoding="euc-jp"><root>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</root>'
soup = self.soup(markup)
- self.assertEqual(u'Sacr\xe9 bleu!', soup.root.string)
+ self.assertEqual('Sacr\xe9 bleu!', soup.root.string)
def test_popping_namespaced_tag(self):
markup = '<rss xmlns:dc="foo"><dc:creator>b</dc:creator><dc:date>2012-07-02T20:33:42Z</dc:date><dc:rights>c</dc:rights><image>d</image></rss>'
soup = self.soup(markup)
self.assertEqual(
- unicode(soup.rss), markup)
+ str(soup.rss), markup)
def test_docstring_includes_correct_encoding(self):
soup = self.soup("<root/>")
@@ -1036,17 +1036,17 @@ class XMLTreeBuilderSmokeTest(TreeBuilderSmokeTest):
def test_closing_namespaced_tag(self):
markup = '<p xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>20010504</dc:date></p>'
soup = self.soup(markup)
- self.assertEqual(unicode(soup.p), markup)
+ self.assertEqual(str(soup.p), markup)
def test_namespaced_attributes(self):
markup = '<foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><bar xsi:schemaLocation="http://www.example.com"/></foo>'
soup = self.soup(markup)
- self.assertEqual(unicode(soup.foo), markup)
+ self.assertEqual(str(soup.foo), markup)
def test_namespaced_attributes_xml_namespace(self):
markup = '<foo xml:lang="fr">bar</foo>'
soup = self.soup(markup)
- self.assertEqual(unicode(soup.foo), markup)
+ self.assertEqual(str(soup.foo), markup)
def test_find_by_prefixed_name(self):
doc = """<?xml version="1.0" encoding="utf-8"?>
diff --git a/bs4/tests/test_dammit.py b/bs4/tests/test_dammit.py
index b477df8..5177503 100644
--- a/bs4/tests/test_dammit.py
+++ b/bs4/tests/test_dammit.py
@@ -12,7 +12,7 @@ class TestUnicodeDammit(unittest.TestCase):
"""Standalone tests of UnicodeDammit."""
def test_unicode_input(self):
- markup = u"I'm already Unicode! \N{SNOWMAN}"
+ markup = "I'm already Unicode! \N{SNOWMAN}"
dammit = UnicodeDammit(markup)
self.assertEqual(dammit.unicode_markup, markup)
@@ -20,7 +20,7 @@ class TestUnicodeDammit(unittest.TestCase):
markup = b"<foo>\x91\x92\x93\x94</foo>"
dammit = UnicodeDammit(markup)
self.assertEqual(
- dammit.unicode_markup, u"<foo>\u2018\u2019\u201c\u201d</foo>")
+ dammit.unicode_markup, "<foo>\u2018\u2019\u201c\u201d</foo>")
def test_smart_quotes_to_xml_entities(self):
markup = b"<foo>\x91\x92\x93\x94</foo>"
@@ -44,14 +44,14 @@ class TestUnicodeDammit(unittest.TestCase):
utf8 = b"Sacr\xc3\xa9 bleu! \xe2\x98\x83"
dammit = UnicodeDammit(utf8)
self.assertEqual(dammit.original_encoding.lower(), 'utf-8')
- self.assertEqual(dammit.unicode_markup, u'Sacr\xe9 bleu! \N{SNOWMAN}')
+ self.assertEqual(dammit.unicode_markup, 'Sacr\xe9 bleu! \N{SNOWMAN}')
def test_convert_hebrew(self):
hebrew = b"\xed\xe5\xec\xf9"
dammit = UnicodeDammit(hebrew, ["iso-8859-8"])
self.assertEqual(dammit.original_encoding.lower(), 'iso-8859-8')
- self.assertEqual(dammit.unicode_markup, u'\u05dd\u05d5\u05dc\u05e9')
+ self.assertEqual(dammit.unicode_markup, '\u05dd\u05d5\u05dc\u05e9')
def test_dont_see_smart_quotes_where_there_are_none(self):
utf_8 = b"\343\202\261\343\203\274\343\202\277\343\202\244 Watch"
@@ -60,19 +60,19 @@ class TestUnicodeDammit(unittest.TestCase):
self.assertEqual(dammit.unicode_markup.encode("utf-8"), utf_8)
def test_ignore_inappropriate_codecs(self):
- utf8_data = u"Räksmörgås".encode("utf-8")
+ utf8_data = "Räksmörgås".encode("utf-8")
dammit = UnicodeDammit(utf8_data, ["iso-8859-8"])
self.assertEqual(dammit.original_encoding.lower(), 'utf-8')
def test_ignore_invalid_codecs(self):
- utf8_data = u"Räksmörgås".encode("utf-8")
+ utf8_data = "Räksmörgås".encode("utf-8")
for bad_encoding in ['.utf8', '...', 'utF---16.!']:
dammit = UnicodeDammit(utf8_data, [bad_encoding])
self.assertEqual(dammit.original_encoding.lower(), 'utf-8')
def test_exclude_encodings(self):
# This is UTF-8.
- utf8_data = u"Räksmörgås".encode("utf-8")
+ utf8_data = "Räksmörgås".encode("utf-8")
# But if we exclude UTF-8 from consideration, the guess is
# Windows-1252.
@@ -90,7 +90,7 @@ class TestEncodingDetector(unittest.TestCase):
detected = EncodingDetector(
b'<?xml version="1.0" encoding="UTF-\xdb" ?>')
encodings = list(detected.encodings)
- assert u'utf-\N{REPLACEMENT CHARACTER}' in encodings
+ assert 'utf-\N{REPLACEMENT CHARACTER}' in encodings
def test_detect_html5_style_meta_tag(self):
@@ -130,7 +130,7 @@ class TestEncodingDetector(unittest.TestCase):
bs4.dammit.chardet_dammit = noop
dammit = UnicodeDammit(doc)
self.assertEqual(True, dammit.contains_replacement_characters)
- self.assertTrue(u"\ufffd" in dammit.unicode_markup)
+ self.assertTrue("\ufffd" in dammit.unicode_markup)
soup = BeautifulSoup(doc, "html.parser")
self.assertTrue(soup.contains_replacement_characters)
@@ -142,7 +142,7 @@ class TestEncodingDetector(unittest.TestCase):
# A document written in UTF-16LE will have its byte order marker stripped.
data = b'\xff\xfe<\x00a\x00>\x00\xe1\x00\xe9\x00<\x00/\x00a\x00>\x00'
dammit = UnicodeDammit(data)
- self.assertEqual(u"<a>áé</a>", dammit.unicode_markup)
+ self.assertEqual("<a>áé</a>", dammit.unicode_markup)
self.assertEqual("utf-16le", dammit.original_encoding)
def test_known_definite_versus_user_encodings(self):
@@ -201,12 +201,12 @@ class TestEncodingDetector(unittest.TestCase):
def test_detwingle(self):
# Here's a UTF8 document.
- utf8 = (u"\N{SNOWMAN}" * 3).encode("utf8")
+ utf8 = ("\N{SNOWMAN}" * 3).encode("utf8")
# Here's a Windows-1252 document.
windows_1252 = (
- u"\N{LEFT DOUBLE QUOTATION MARK}Hi, I like Windows!"
- u"\N{RIGHT DOUBLE QUOTATION MARK}").encode("windows_1252")
+ "\N{LEFT DOUBLE QUOTATION MARK}Hi, I like Windows!"
+ "\N{RIGHT DOUBLE QUOTATION MARK}").encode("windows_1252")
# Through some unholy alchemy, they've been stuck together.
doc = utf8 + windows_1252 + utf8
@@ -221,7 +221,7 @@ class TestEncodingDetector(unittest.TestCase):
fixed = UnicodeDammit.detwingle(doc)
self.assertEqual(
- u"☃☃☃“Hi, I like Windows!”☃☃☃", fixed.decode("utf8"))
+ "☃☃☃“Hi, I like Windows!”☃☃☃", fixed.decode("utf8"))
def test_detwingle_ignores_multibyte_characters(self):
# Each of these characters has a UTF-8 representation ending
@@ -229,9 +229,9 @@ class TestEncodingDetector(unittest.TestCase):
# Windows-1252. But our code knows to skip over multibyte
# UTF-8 characters, so they'll survive the process unscathed.
for tricky_unicode_char in (
- u"\N{LATIN SMALL LIGATURE OE}", # 2-byte char '\xc5\x93'
- u"\N{LATIN SUBSCRIPT SMALL LETTER X}", # 3-byte char '\xe2\x82\x93'
- u"\xf0\x90\x90\x93", # This is a CJK character, not sure which one.
+ "\N{LATIN SMALL LIGATURE OE}", # 2-byte char '\xc5\x93'
+ "\N{LATIN SUBSCRIPT SMALL LETTER X}", # 3-byte char '\xe2\x82\x93'
+ "\xf0\x90\x90\x93", # This is a CJK character, not sure which one.
):
input = tricky_unicode_char.encode("utf8")
self.assertTrue(input.endswith(b'\x93'))
@@ -246,29 +246,29 @@ class TestEncodingDetector(unittest.TestCase):
# interesting to know what encoding was claimed
# originally.
- html_unicode = u'<html><head><meta charset="utf-8"></head></html>'
+ html_unicode = '<html><head><meta charset="utf-8"></head></html>'
html_bytes = html_unicode.encode("ascii")
- xml_unicode= u'<?xml version="1.0" encoding="ISO-8859-1" ?>'
+ xml_unicode= '<?xml version="1.0" encoding="ISO-8859-1" ?>'
xml_bytes = xml_unicode.encode("ascii")
m = EncodingDetector.find_declared_encoding
- self.assertEquals(None, m(html_unicode, is_html=False))
- self.assertEquals("utf-8", m(html_unicode, is_html=True))
- self.assertEquals("utf-8", m(html_bytes, is_html=True))
+ self.assertEqual(None, m(html_unicode, is_html=False))
+ self.assertEqual("utf-8", m(html_unicode, is_html=True))
+ self.assertEqual("utf-8", m(html_bytes, is_html=True))
- self.assertEquals("iso-8859-1", m(xml_unicode))
- self.assertEquals("iso-8859-1", m(xml_bytes))
+ self.assertEqual("iso-8859-1", m(xml_unicode))
+ self.assertEqual("iso-8859-1", m(xml_bytes))
# Normally, only the first few kilobytes of a document are checked for
# an encoding.
spacer = b' ' * 5000
- self.assertEquals(None, m(spacer + html_bytes))
- self.assertEquals(None, m(spacer + xml_bytes))
+ self.assertEqual(None, m(spacer + html_bytes))
+ self.assertEqual(None, m(spacer + xml_bytes))
# But you can tell find_declared_encoding to search an entire
# HTML document.
- self.assertEquals(
+ self.assertEqual(
"utf-8",
m(spacer + html_bytes, is_html=True, search_entire_document=True)
)
@@ -276,11 +276,11 @@ class TestEncodingDetector(unittest.TestCase):
# The XML encoding declaration has to be the very first thing
# in the document. We'll allow whitespace before the document
# starts, but nothing else.
- self.assertEquals(
+ self.assertEqual(
"iso-8859-1",
m(xml_bytes, search_entire_document=True)
)
- self.assertEquals(
+ self.assertEqual(
None, m(b'a' + xml_bytes, search_entire_document=True)
)
diff --git a/bs4/tests/test_formatter.py b/bs4/tests/test_formatter.py
index 718989b..c188e18 100644
--- a/bs4/tests/test_formatter.py
+++ b/bs4/tests/test_formatter.py
@@ -18,12 +18,12 @@ class TestFormatter(SoupTest):
# Attributes come out sorted by name. In Python 3, attributes
# normally come out of a dictionary in the order they were
# added.
- self.assertEquals([('a', 2), ('b', 1)], formatter.attributes(tag))
+ self.assertEqual([('a', 2), ('b', 1)], formatter.attributes(tag))
# This works even if Tag.attrs is None, though this shouldn't
# normally happen.
tag.attrs = None
- self.assertEquals([], formatter.attributes(tag))
+ self.assertEqual([], formatter.attributes(tag))
def test_sort_attributes(self):
# Test the ability to override Formatter.attributes() to,
@@ -42,8 +42,8 @@ class TestFormatter(SoupTest):
# attributes() was called on the <p> tag. It filtered out one
# attribute and sorted the other two.
- self.assertEquals(formatter.called_with, soup.p)
- self.assertEquals(u'<p aval="2" cval="1"></p>', decoded)
+ self.assertEqual(formatter.called_with, soup.p)
+ self.assertEqual('<p aval="2" cval="1"></p>', decoded)
def test_empty_attributes_are_booleans(self):
# Test the behavior of empty_attributes_are_booleans as well
@@ -51,17 +51,17 @@ class TestFormatter(SoupTest):
for name in ('html', 'minimal', None):
formatter = HTMLFormatter.REGISTRY[name]
- self.assertEquals(False, formatter.empty_attributes_are_booleans)
+ self.assertEqual(False, formatter.empty_attributes_are_booleans)
formatter = XMLFormatter.REGISTRY[None]
- self.assertEquals(False, formatter.empty_attributes_are_booleans)
+ self.assertEqual(False, formatter.empty_attributes_are_booleans)
formatter = HTMLFormatter.REGISTRY['html5']
- self.assertEquals(True, formatter.empty_attributes_are_booleans)
+ self.assertEqual(True, formatter.empty_attributes_are_booleans)
# Verify that the constructor sets the value.
formatter = Formatter(empty_attributes_are_booleans=True)
- self.assertEquals(True, formatter.empty_attributes_are_booleans)
+ self.assertEqual(True, formatter.empty_attributes_are_booleans)
# Now demonstrate what it does to markup.
for markup in (
@@ -70,11 +70,11 @@ class TestFormatter(SoupTest):
):
soup = self.soup(markup)
for formatter in ('html', 'minimal', 'xml', None):
- self.assertEquals(
+ self.assertEqual(
b'<option selected=""></option>',
soup.option.encode(formatter='html')
)
- self.assertEquals(
+ self.assertEqual(
b'<option selected></option>',
soup.option.encode(formatter='html5')
)
diff --git a/bs4/tests/test_html5lib.py b/bs4/tests/test_html5lib.py
index 2adebc8..f8902ad 100644
--- a/bs4/tests/test_html5lib.py
+++ b/bs4/tests/test_html5lib.py
@@ -5,7 +5,7 @@ import warnings
try:
from bs4.builder import HTML5TreeBuilder
HTML5LIB_PRESENT = True
-except ImportError, e:
+except ImportError as e:
HTML5LIB_PRESENT = False
from bs4.element import SoupStrainer
from bs4.testing import (
@@ -74,14 +74,14 @@ class HTML5LibBuilderSmokeTest(SoupTest, HTML5TreeBuilderSmokeTest):
def test_reparented_markup(self):
markup = '<p><em>foo</p>\n<p>bar<a></a></em></p>'
soup = self.soup(markup)
- self.assertEqual(u"<body><p><em>foo</em></p><em>\n</em><p><em>bar<a></a></em></p></body>", soup.body.decode())
+ self.assertEqual("<body><p><em>foo</em></p><em>\n</em><p><em>bar<a></a></em></p></body>", soup.body.decode())
self.assertEqual(2, len(soup.find_all('p')))
def test_reparented_markup_ends_with_whitespace(self):
markup = '<p><em>foo</p>\n<p>bar<a></a></em></p>\n'
soup = self.soup(markup)
- self.assertEqual(u"<body><p><em>foo</em></p><em>\n</em><p><em>bar<a></a></em></p>\n</body>", soup.body.decode())
+ self.assertEqual("<body><p><em>foo</em></p><em>\n</em><p><em>bar<a></a></em></p>\n</body>", soup.body.decode())
self.assertEqual(2, len(soup.find_all('p')))
def test_reparented_markup_containing_identical_whitespace_nodes(self):
@@ -127,7 +127,7 @@ class HTML5LibBuilderSmokeTest(SoupTest, HTML5TreeBuilderSmokeTest):
def test_foster_parenting(self):
markup = b"""<table><td></tbody>A"""
soup = self.soup(markup)
- self.assertEqual(u"<body>A<table><tbody><tr><td></td></tr></tbody></table></body>", soup.body.decode())
+ self.assertEqual("<body>A<table><tbody><tr><td></td></tr></tbody></table></body>", soup.body.decode())
def test_extraction(self):
"""
@@ -199,28 +199,28 @@ class HTML5LibBuilderSmokeTest(SoupTest, HTML5TreeBuilderSmokeTest):
# HTMLParserTreeBuilderSmokeTest. It's not in the superclass
# because the lxml HTML TreeBuilder _doesn't_ work this way.
for input_element, output_unicode, output_element in (
- ("&RightArrowLeftArrow;", u'\u21c4', b'&rlarr;'),
- ('&models;', u'\u22a7', b'&models;'),
- ('&Nfr;', u'\U0001d511', b'&Nfr;'),
- ('&ngeqq;', u'\u2267\u0338', b'&ngeqq;'),
- ('&not;', u'\xac', b'&not;'),
- ('&Not;', u'\u2aec', b'&Not;'),
- ('&quot;', u'"', b'"'),
- ('&there4;', u'\u2234', b'&there4;'),
- ('&Therefore;', u'\u2234', b'&there4;'),
- ('&therefore;', u'\u2234', b'&there4;'),
- ("&fjlig;", u'fj', b'fj'),
- ("&sqcup;", u'\u2294', b'&sqcup;'),
- ("&sqcups;", u'\u2294\ufe00', b'&sqcups;'),
- ("&apos;", u"'", b"'"),
- ("&verbar;", u"|", b"|"),
+ ("&RightArrowLeftArrow;", '\u21c4', b'&rlarr;'),
+ ('&models;', '\u22a7', b'&models;'),
+ ('&Nfr;', '\U0001d511', b'&Nfr;'),
+ ('&ngeqq;', '\u2267\u0338', b'&ngeqq;'),
+ ('&not;', '\xac', b'&not;'),
+ ('&Not;', '\u2aec', b'&Not;'),
+ ('&quot;', '"', b'"'),
+ ('&there4;', '\u2234', b'&there4;'),
+ ('&Therefore;', '\u2234', b'&there4;'),
+ ('&therefore;', '\u2234', b'&there4;'),
+ ("&fjlig;", 'fj', b'fj'),
+ ("&sqcup;", '\u2294', b'&sqcup;'),
+ ("&sqcups;", '\u2294\ufe00', b'&sqcups;'),
+ ("&apos;", "'", b"'"),
+ ("&verbar;", "|", b"|"),
):
- markup = u'<div>%s</div>' % input_element
+ markup = '<div>%s</div>' % input_element
div = self.soup(markup).div
without_element = div.encode()
expect = b"<div>%s</div>" % output_unicode.encode("utf8")
- self.assertEquals(without_element, expect)
+ self.assertEqual(without_element, expect)
with_element = div.encode(formatter="html")
expect = b"<div>%s</div>" % output_element
- self.assertEquals(with_element, expect)
+ self.assertEqual(with_element, expect)
diff --git a/bs4/tests/test_htmlparser.py b/bs4/tests/test_htmlparser.py
index e84eced..0d8161e 100644
--- a/bs4/tests/test_htmlparser.py
+++ b/bs4/tests/test_htmlparser.py
@@ -61,20 +61,20 @@ class HTMLParserTreeBuilderSmokeTest(SoupTest, HTMLTreeBuilderSmokeTest):
# If you don't provide any particular value for
# on_duplicate_attribute, later values replace earlier values.
soup = self.soup(markup)
- self.assertEquals("url3", soup.a['href'])
- self.assertEquals(["cls"], soup.a['class'])
- self.assertEquals("id", soup.a['id'])
+ self.assertEqual("url3", soup.a['href'])
+ self.assertEqual(["cls"], soup.a['class'])
+ self.assertEqual("id", soup.a['id'])
# You can also get this behavior explicitly.
def assert_attribute(on_duplicate_attribute, expected):
soup = self.soup(
markup, on_duplicate_attribute=on_duplicate_attribute
)
- self.assertEquals(expected, soup.a['href'])
+ self.assertEqual(expected, soup.a['href'])
# Verify that non-duplicate attributes are treated normally.
- self.assertEquals(["cls"], soup.a['class'])
- self.assertEquals("id", soup.a['id'])
+ self.assertEqual(["cls"], soup.a['class'])
+ self.assertEqual("id", soup.a['id'])
assert_attribute(None, "url3")
assert_attribute(BeautifulSoupHTMLParser.REPLACE, "url3")
@@ -94,31 +94,31 @@ class HTMLParserTreeBuilderSmokeTest(SoupTest, HTMLTreeBuilderSmokeTest):
# convert those Unicode characters to a (potentially
# different) named entity on the way out.
for input_element, output_unicode, output_element in (
- ("&RightArrowLeftArrow;", u'\u21c4', b'&rlarr;'),
- ('&models;', u'\u22a7', b'&models;'),
- ('&Nfr;', u'\U0001d511', b'&Nfr;'),
- ('&ngeqq;', u'\u2267\u0338', b'&ngeqq;'),
- ('&not;', u'\xac', b'&not;'),
- ('&Not;', u'\u2aec', b'&Not;'),
- ('&quot;', u'"', b'"'),
- ('&there4;', u'\u2234', b'&there4;'),
- ('&Therefore;', u'\u2234', b'&there4;'),
- ('&therefore;', u'\u2234', b'&there4;'),
- ("&fjlig;", u'fj', b'fj'),
- ("&sqcup;", u'\u2294', b'&sqcup;'),
- ("&sqcups;", u'\u2294\ufe00', b'&sqcups;'),
- ("&apos;", u"'", b"'"),
- ("&verbar;", u"|", b"|"),
+ ("&RightArrowLeftArrow;", '\u21c4', b'&rlarr;'),
+ ('&models;', '\u22a7', b'&models;'),
+ ('&Nfr;', '\U0001d511', b'&Nfr;'),
+ ('&ngeqq;', '\u2267\u0338', b'&ngeqq;'),
+ ('&not;', '\xac', b'&not;'),
+ ('&Not;', '\u2aec', b'&Not;'),
+ ('&quot;', '"', b'"'),
+ ('&there4;', '\u2234', b'&there4;'),
+ ('&Therefore;', '\u2234', b'&there4;'),
+ ('&therefore;', '\u2234', b'&there4;'),
+ ("&fjlig;", 'fj', b'fj'),
+ ("&sqcup;", '\u2294', b'&sqcup;'),
+ ("&sqcups;", '\u2294\ufe00', b'&sqcups;'),
+ ("&apos;", "'", b"'"),
+ ("&verbar;", "|", b"|"),
):
- markup = u'<div>%s</div>' % input_element
+ markup = '<div>%s</div>' % input_element
div = self.soup(markup).div
without_element = div.encode()
expect = b"<div>%s</div>" % output_unicode.encode("utf8")
- self.assertEquals(without_element, expect)
+ self.assertEqual(without_element, expect)
with_element = div.encode(formatter="html")
expect = b"<div>%s</div>" % output_element
- self.assertEquals(with_element, expect)
+ self.assertEqual(with_element, expect)
class TestHTMLParserSubclass(SoupTest):
diff --git a/bs4/tests/test_lxml.py b/bs4/tests/test_lxml.py
index d8dada4..71931ff 100644
--- a/bs4/tests/test_lxml.py
+++ b/bs4/tests/test_lxml.py
@@ -7,7 +7,7 @@ try:
import lxml.etree
LXML_PRESENT = True
LXML_VERSION = lxml.etree.LXML_VERSION
-except ImportError, e:
+except ImportError as e:
LXML_PRESENT = False
LXML_VERSION = (0,)
@@ -68,7 +68,7 @@ class LXMLTreeBuilderSmokeTest(SoupTest, HTMLTreeBuilderSmokeTest):
# if one is installed.
with warnings.catch_warnings(record=True) as w:
soup = BeautifulStoneSoup("<b />")
- self.assertEqual(u"<b/>", unicode(soup.b))
+ self.assertEqual("<b/>", str(soup.b))
self.assertTrue("BeautifulStoneSoup class is deprecated" in str(w[0].message))
def test_tracking_line_numbers(self):
diff --git a/bs4/tests/test_navigablestring.py b/bs4/tests/test_navigablestring.py
index 8b903ea..89e92b7 100644
--- a/bs4/tests/test_navigablestring.py
+++ b/bs4/tests/test_navigablestring.py
@@ -15,7 +15,7 @@ class TestNavigableString(SoupTest):
def test_text_acquisition_methods(self):
# These methods are intended for use against Tag, but they
# work on NavigableString as well,
- eq_ = self.assertEquals
+ eq_ = self.assertEqual
s = NavigableString("fee ")
cdata = CData("fie ")
diff --git a/bs4/tests/test_soup.py b/bs4/tests/test_soup.py
index 9074bdb..4d00845 100644
--- a/bs4/tests/test_soup.py
+++ b/bs4/tests/test_soup.py
@@ -51,17 +51,17 @@ PYTHON_3_PRE_3_2 = (sys.version_info[0] == 3 and sys.version_info < (3,2))
class TestConstructor(SoupTest):
def test_short_unicode_input(self):
- data = u"<h1>éé</h1>"
+ data = "<h1>éé</h1>"
soup = self.soup(data)
- self.assertEqual(u"éé", soup.h1.string)
+ self.assertEqual("éé", soup.h1.string)
def test_embedded_null(self):
- data = u"<h1>foo\0bar</h1>"
+ data = "<h1>foo\0bar</h1>"
soup = self.soup(data)
- self.assertEqual(u"foo\0bar", soup.h1.string)
+ self.assertEqual("foo\0bar", soup.h1.string)
def test_exclude_encodings(self):
- utf8_data = u"Räksmörgås".encode("utf-8")
+ utf8_data = "Räksmörgås".encode("utf-8")
soup = self.soup(utf8_data, exclude_encodings=["utf-8"])
self.assertEqual("windows-1252", soup.original_encoding)
@@ -127,7 +127,7 @@ class TestConstructor(SoupTest):
yield markup, None, None, False
import re
- self.assertRaisesRegexp(
+ self.assertRaisesRegex(
ParserRejectedMarkup,
"The markup you provided was rejected by the parser. Trying a different parser or a different encoding may help.",
BeautifulSoup, '', builder=Mock,
@@ -318,7 +318,7 @@ class TestWarnings(SoupTest):
with warnings.catch_warnings(record=True) as warning_list:
# note - this url must differ from the bytes one otherwise
# python's warnings system swallows the second warning
- soup = self.soup(u"http://www.crummyunicode.com/")
+ soup = self.soup("http://www.crummyunicode.com/")
warning = self._assert_warning(
warning_list, MarkupResemblesLocatorWarning
)
@@ -334,7 +334,7 @@ class TestWarnings(SoupTest):
def test_url_warning_with_unicode_and_space(self):
with warnings.catch_warnings(record=True) as warning_list:
- soup = self.soup(u"http://www.crummyuncode.com/ is great")
+ soup = self.soup("http://www.crummyuncode.com/ is great")
self.assertFalse(any("looks like a URL" in str(w.message)
for w in warning_list))
@@ -356,9 +356,9 @@ class TestEntitySubstitution(unittest.TestCase):
def test_simple_html_substitution(self):
# Unicode characters corresponding to named HTML entites
# are substituted, and no others.
- s = u"foo\u2200\N{SNOWMAN}\u00f5bar"
+ s = "foo\u2200\N{SNOWMAN}\u00f5bar"
self.assertEqual(self.sub.substitute_html(s),
- u"foo&forall;\N{SNOWMAN}&otilde;bar")
+ "foo&forall;\N{SNOWMAN}&otilde;bar")
def test_smart_quote_substitution(self):
# MS smart quotes are a common source of frustration, so we
@@ -376,11 +376,11 @@ class TestEntitySubstitution(unittest.TestCase):
# A few spot checks of our ability to recognize
# special character sequences and convert them
# to named entities.
- ('&models;', u'\u22a7'),
- ('&Nfr;', u'\U0001d511'),
- ('&ngeqq;', u'\u2267\u0338'),
- ('&not;', u'\xac'),
- ('&Not;', u'\u2aec'),
+ ('&models;', '\u22a7'),
+ ('&Nfr;', '\U0001d511'),
+ ('&ngeqq;', '\u2267\u0338'),
+ ('&not;', '\xac'),
+ ('&Not;', '\u2aec'),
# We _could_ convert | to &verbarr;, but we don't, because
# | is an ASCII character.
@@ -396,7 +396,7 @@ class TestEntitySubstitution(unittest.TestCase):
('&lt;', '<'),
('&amp;', '&'),
):
- template = u'3 %s 4'
+ template = '3 %s 4'
raw = template % u
with_entities = template % entity
self.assertEqual(self.sub.substitute_html(raw), with_entities)
@@ -405,12 +405,12 @@ class TestEntitySubstitution(unittest.TestCase):
# Some HTML5 entities correspond either to a single-character
# Unicode sequence _or_ to the same character plus U+FE00,
# VARIATION SELECTOR 1. We can handle this.
- data = u"fjords \u2294 penguins"
- markup = u"fjords &sqcup; penguins"
+ data = "fjords \u2294 penguins"
+ markup = "fjords &sqcup; penguins"
self.assertEqual(self.sub.substitute_html(data), markup)
- data = u"fjords \u2294\ufe00 penguins"
- markup = u"fjords &sqcups; penguins"
+ data = "fjords \u2294\ufe00 penguins"
+ markup = "fjords &sqcups; penguins"
self.assertEqual(self.sub.substitute_html(data), markup)
def test_xml_converstion_includes_no_quotes_if_make_quoted_attribute_is_false(self):
@@ -468,7 +468,7 @@ class TestEncodingConversion(SoupTest):
def setUp(self):
super(TestEncodingConversion, self).setUp()
- self.unicode_data = u'<html><head><meta charset="utf-8"/></head><body><foo>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</foo></body></html>'
+ self.unicode_data = '<html><head><meta charset="utf-8"/></head><body><foo>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</foo></body></html>'
self.utf8_data = self.unicode_data.encode("utf-8")
# Just so you know what it looks like.
self.assertEqual(
@@ -488,7 +488,7 @@ class TestEncodingConversion(SoupTest):
ascii = b"<foo>a</foo>"
soup_from_ascii = self.soup(ascii)
unicode_output = soup_from_ascii.decode()
- self.assertTrue(isinstance(unicode_output, unicode))
+ self.assertTrue(isinstance(unicode_output, str))
self.assertEqual(unicode_output, self.document_for(ascii.decode()))
self.assertEqual(soup_from_ascii.original_encoding.lower(), "utf-8")
finally:
@@ -500,7 +500,7 @@ class TestEncodingConversion(SoupTest):
# is not set.
soup_from_unicode = self.soup(self.unicode_data)
self.assertEqual(soup_from_unicode.decode(), self.unicode_data)
- self.assertEqual(soup_from_unicode.foo.string, u'Sacr\xe9 bleu!')
+ self.assertEqual(soup_from_unicode.foo.string, 'Sacr\xe9 bleu!')
self.assertEqual(soup_from_unicode.original_encoding, None)
def test_utf8_in_unicode_out(self):
@@ -508,7 +508,7 @@ class TestEncodingConversion(SoupTest):
# attribute is set.
soup_from_utf8 = self.soup(self.utf8_data)
self.assertEqual(soup_from_utf8.decode(), self.unicode_data)
- self.assertEqual(soup_from_utf8.foo.string, u'Sacr\xe9 bleu!')
+ self.assertEqual(soup_from_utf8.foo.string, 'Sacr\xe9 bleu!')
def test_utf8_out(self):
# The internal data structures can be encoded as UTF-8.
@@ -519,7 +519,7 @@ class TestEncodingConversion(SoupTest):
PYTHON_3_PRE_3_2,
"Bad HTMLParser detected; skipping test of non-ASCII characters in attribute name.")
def test_attribute_name_containing_unicode_characters(self):
- markup = u'<div><a \N{SNOWMAN}="snowman"></a></div>'
+ markup = '<div><a \N{SNOWMAN}="snowman"></a></div>'
self.assertEqual(self.soup(markup).div.encode("utf8"), markup.encode("utf8"))
diff --git a/bs4/tests/test_tree.py b/bs4/tests/test_tree.py
index 26004ce..59b51d0 100644
--- a/bs4/tests/test_tree.py
+++ b/bs4/tests/test_tree.py
@@ -75,13 +75,13 @@ class TestFind(TreeTest):
self.assertEqual(soup.find("b").string, "2")
def test_unicode_text_find(self):
- soup = self.soup(u'<h1>Räksmörgås</h1>')
- self.assertEqual(soup.find(string=u'Räksmörgås'), u'Räksmörgås')
+ soup = self.soup('<h1>Räksmörgås</h1>')
+ self.assertEqual(soup.find(string='Räksmörgås'), 'Räksmörgås')
def test_unicode_attribute_find(self):
- soup = self.soup(u'<h1 id="Räksmörgås">here it is</h1>')
+ soup = self.soup('<h1 id="Räksmörgås">here it is</h1>')
str(soup)
- self.assertEqual("here it is", soup.find(id=u'Räksmörgås').text)
+ self.assertEqual("here it is", soup.find(id='Räksmörgås').text)
def test_find_everything(self):
@@ -101,17 +101,17 @@ class TestFindAll(TreeTest):
"""You can search the tree for text nodes."""
soup = self.soup("<html>Foo<b>bar</b>\xbb</html>")
# Exact match.
- self.assertEqual(soup.find_all(string="bar"), [u"bar"])
- self.assertEqual(soup.find_all(text="bar"), [u"bar"])
+ self.assertEqual(soup.find_all(string="bar"), ["bar"])
+ self.assertEqual(soup.find_all(text="bar"), ["bar"])
# Match any of a number of strings.
self.assertEqual(
- soup.find_all(text=["Foo", "bar"]), [u"Foo", u"bar"])
+ soup.find_all(text=["Foo", "bar"]), ["Foo", "bar"])
# Match a regular expression.
self.assertEqual(soup.find_all(text=re.compile('.*')),
- [u"Foo", u"bar", u'\xbb'])
+ ["Foo", "bar", '\xbb'])
# Match anything.
self.assertEqual(soup.find_all(text=True),
- [u"Foo", u"bar", u'\xbb'])
+ ["Foo", "bar", '\xbb'])
def test_find_all_limit(self):
"""You can limit the number of items returned by find_all."""
@@ -254,8 +254,8 @@ class TestFindAllByAttribute(TreeTest):
["Matching a.", "Matching b."])
def test_find_all_by_utf8_attribute_value(self):
- peace = u"םולש".encode("utf8")
- data = u'<a title="םולש"></a>'.encode("utf8")
+ peace = "םולש".encode("utf8")
+ data = '<a title="םולש"></a>'.encode("utf8")
soup = self.soup(data)
self.assertEqual([soup.a], soup.find_all(title=peace))
self.assertEqual([soup.a], soup.find_all(title=peace.decode("utf8")))
@@ -444,7 +444,7 @@ class TestSmooth(TreeTest):
# output.
# Since the <span> tag has two children, its .string is None.
- self.assertEquals(None, div.span.string)
+ self.assertEqual(None, div.span.string)
self.assertEqual(7, len(div.contents))
div.smooth()
@@ -755,18 +755,18 @@ class TestTag(SoupTest):
# No list of whitespace-preserving tags -> pretty-print
tag._preserve_whitespace_tags = None
- self.assertEquals(True, tag._should_pretty_print(0))
+ self.assertEqual(True, tag._should_pretty_print(0))
# List exists but tag is not on the list -> pretty-print
tag.preserve_whitespace_tags = ["some_other_tag"]
- self.assertEquals(True, tag._should_pretty_print(1))
+ self.assertEqual(True, tag._should_pretty_print(1))
# Indent level is None -> don't pretty-print
- self.assertEquals(False, tag._should_pretty_print(None))
+ self.assertEqual(False, tag._should_pretty_print(None))
# Tag is on the whitespace-preserving list -> don't pretty-print
tag.preserve_whitespace_tags = ["some_other_tag", "a_tag"]
- self.assertEquals(False, tag._should_pretty_print(1))
+ self.assertEqual(False, tag._should_pretty_print(1))
class TestTagCreation(SoupTest):
@@ -905,10 +905,10 @@ class TestTreeModification(SoupTest):
assert not isinstance(i, BeautifulSoup)
p1, p2, p3, p4 = list(soup.children)
- self.assertEquals("And now, a word:", p1.string)
- self.assertEquals("p2", p2.string)
- self.assertEquals("p3", p3.string)
- self.assertEquals("And we're back.", p4.string)
+ self.assertEqual("And now, a word:", p1.string)
+ self.assertEqual("p2", p2.string)
+ self.assertEqual("p3", p3.string)
+ self.assertEqual("And we're back.", p4.string)
def test_replace_with_maintains_next_element_throughout(self):
@@ -1015,8 +1015,8 @@ class TestTreeModification(SoupTest):
d1 = soup.find('div', id='d1')
d2 = soup.find('div', id='d2')
d2.extend(d1)
- self.assertEqual(u'<div id="d1"></div>', d1.decode())
- self.assertEqual(u'<div id="d2"><a>1</a><a>2</a><a>3</a><a>4</a></div>', d2.decode())
+ self.assertEqual('<div id="d1"></div>', d1.decode())
+ self.assertEqual('<div id="d2"><a>1</a><a>2</a><a>3</a><a>4</a></div>', d2.decode())
def test_move_tag_to_beginning_of_parent(self):
data = "<a><b></b><c></c><d></d></a>"
@@ -1293,7 +1293,7 @@ class TestTreeModification(SoupTest):
<script>baz</script>
</html>""")
[soup.script.extract() for i in soup.find_all("script")]
- self.assertEqual("<body>\n\n<a></a>\n</body>", unicode(soup.body))
+ self.assertEqual("<body>\n\n<a></a>\n</body>", str(soup.body))
def test_extract_works_when_element_is_surrounded_by_identical_strings(self):
@@ -1589,7 +1589,7 @@ class TestPersistence(SoupTest):
soup = BeautifulSoup(b'<p>&nbsp;</p>', 'html.parser')
encoding = soup.original_encoding
copy = soup.__copy__()
- self.assertEqual(u"<p> </p>", unicode(copy))
+ self.assertEqual("<p> </p>", str(copy))
self.assertEqual(encoding, copy.original_encoding)
def test_copy_preserves_builder_information(self):
@@ -1619,14 +1619,14 @@ class TestPersistence(SoupTest):
def test_unicode_pickle(self):
# A tree containing Unicode characters can be pickled.
- html = u"<b>\N{SNOWMAN}</b>"
+ html = "<b>\N{SNOWMAN}</b>"
soup = self.soup(html)
dumped = pickle.dumps(soup, pickle.HIGHEST_PROTOCOL)
loaded = pickle.loads(dumped)
self.assertEqual(loaded.decode(), soup.decode())
def test_copy_navigablestring_is_not_attached_to_tree(self):
- html = u"<b>Foo<a></a></b><b>Bar</b>"
+ html = "<b>Foo<a></a></b><b>Bar</b>"
soup = self.soup(html)
s1 = soup.find(string="Foo")
s2 = copy.copy(s1)
@@ -1638,7 +1638,7 @@ class TestPersistence(SoupTest):
self.assertEqual(None, s2.previous_element)
def test_copy_navigablestring_subclass_has_same_type(self):
- html = u"<b><!--Foo--></b>"
+ html = "<b><!--Foo--></b>"
soup = self.soup(html)
s1 = soup.string
s2 = copy.copy(s1)
@@ -1646,19 +1646,19 @@ class TestPersistence(SoupTest):
self.assertTrue(isinstance(s2, Comment))
def test_copy_entire_soup(self):
- html = u"<div><b>Foo<a></a></b><b>Bar</b></div>end"
+ html = "<div><b>Foo<a></a></b><b>Bar</b></div>end"
soup = self.soup(html)
soup_copy = copy.copy(soup)
self.assertEqual(soup, soup_copy)
def test_copy_tag_copies_contents(self):
- html = u"<div><b>Foo<a></a></b><b>Bar</b></div>end"
+ html = "<div><b>Foo<a></a></b><b>Bar</b></div>end"
soup = self.soup(html)
div = soup.div
div_copy = copy.copy(div)
# The two tags look the same, and evaluate to equal.
- self.assertEqual(unicode(div), unicode(div_copy))
+ self.assertEqual(str(div), str(div_copy))
self.assertEqual(div, div_copy)
# But they're not the same object.
@@ -1674,17 +1674,17 @@ class TestPersistence(SoupTest):
class TestSubstitutions(SoupTest):
def test_default_formatter_is_minimal(self):
- markup = u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
+ markup = "<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
soup = self.soup(markup)
decoded = soup.decode(formatter="minimal")
# The < is converted back into &lt; but the e-with-acute is left alone.
self.assertEqual(
decoded,
self.document_for(
- u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"))
+ "<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"))
def test_formatter_html(self):
- markup = u"<br><b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
+ markup = "<br><b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
soup = self.soup(markup)
decoded = soup.decode(formatter="html")
self.assertEqual(
@@ -1692,7 +1692,7 @@ class TestSubstitutions(SoupTest):
self.document_for("<br/><b>&lt;&lt;Sacr&eacute; bleu!&gt;&gt;</b>"))
def test_formatter_html5(self):
- markup = u"<br><b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
+ markup = "<br><b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
soup = self.soup(markup)
decoded = soup.decode(formatter="html5")
self.assertEqual(
@@ -1700,49 +1700,49 @@ class TestSubstitutions(SoupTest):
self.document_for("<br><b>&lt;&lt;Sacr&eacute; bleu!&gt;&gt;</b>"))
def test_formatter_minimal(self):
- markup = u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
+ markup = "<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
soup = self.soup(markup)
decoded = soup.decode(formatter="minimal")
# The < is converted back into &lt; but the e-with-acute is left alone.
self.assertEqual(
decoded,
self.document_for(
- u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"))
+ "<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"))
def test_formatter_null(self):
- markup = u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
+ markup = "<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
soup = self.soup(markup)
decoded = soup.decode(formatter=None)
# Neither the angle brackets nor the e-with-acute are converted.
# This is not valid HTML, but it's what the user wanted.
self.assertEqual(decoded,
- self.document_for(u"<b><<Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!>></b>"))
+ self.document_for("<b><<Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!>></b>"))
def test_formatter_custom(self):
- markup = u"<b>&lt;foo&gt;</b><b>bar</b><br/>"
+ markup = "<b>&lt;foo&gt;</b><b>bar</b><br/>"
soup = self.soup(markup)
decoded = soup.decode(formatter = lambda x: x.upper())
# Instead of normal entity conversion code, the custom
# callable is called on every string.
self.assertEqual(
decoded,
- self.document_for(u"<b><FOO></b><b>BAR</b><br/>"))
+ self.document_for("<b><FOO></b><b>BAR</b><br/>"))
def test_formatter_is_run_on_attribute_values(self):
- markup = u'<a href="http://a.com?a=b&c=é">e</a>'
+ markup = '<a href="http://a.com?a=b&c=é">e</a>'
soup = self.soup(markup)
a = soup.a
- expect_minimal = u'<a href="http://a.com?a=b&amp;c=é">e</a>'
+ expect_minimal = '<a href="http://a.com?a=b&amp;c=é">e</a>'
self.assertEqual(expect_minimal, a.decode())
self.assertEqual(expect_minimal, a.decode(formatter="minimal"))
- expect_html = u'<a href="http://a.com?a=b&amp;c=&eacute;">e</a>'
+ expect_html = '<a href="http://a.com?a=b&amp;c=&eacute;">e</a>'
self.assertEqual(expect_html, a.decode(formatter="html"))
self.assertEqual(markup, a.decode(formatter=None))
- expect_upper = u'<a href="HTTP://A.COM?A=B&C=É">E</a>'
+ expect_upper = '<a href="HTTP://A.COM?A=B&C=É">E</a>'
self.assertEqual(expect_upper, a.decode(formatter=lambda x: x.upper()))
def test_formatter_skips_script_tag_for_html_documents(self):
@@ -1768,7 +1768,7 @@ class TestSubstitutions(SoupTest):
# Everything outside the <pre> tag is reformatted, but everything
# inside is left alone.
self.assertEqual(
- u'<div>\n foo\n <pre> \tbar\n \n </pre>\n baz\n <textarea> eee\nfff\t</textarea>\n</div>',
+ '<div>\n foo\n <pre> \tbar\n \n </pre>\n baz\n <textarea> eee\nfff\t</textarea>\n</div>',
soup.div.prettify())
def test_prettify_accepts_formatter_function(self):
@@ -1778,14 +1778,14 @@ class TestSubstitutions(SoupTest):
def test_prettify_outputs_unicode_by_default(self):
soup = self.soup("<a></a>")
- self.assertEqual(unicode, type(soup.prettify()))
+ self.assertEqual(str, type(soup.prettify()))
def test_prettify_can_encode_data(self):
soup = self.soup("<a></a>")
self.assertEqual(bytes, type(soup.prettify("utf-8")))
def test_html_entity_substitution_off_by_default(self):
- markup = u"<b>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</b>"
+ markup = "<b>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</b>"
soup = self.soup(markup)
encoded = soup.b.encode("utf-8")
self.assertEqual(encoded, markup.encode('utf-8'))
@@ -1829,48 +1829,48 @@ class TestEncoding(SoupTest):
"""Test the ability to encode objects into strings."""
def test_unicode_string_can_be_encoded(self):
- html = u"<b>\N{SNOWMAN}</b>"
+ html = "<b>\N{SNOWMAN}</b>"
soup = self.soup(html)
self.assertEqual(soup.b.string.encode("utf-8"),
- u"\N{SNOWMAN}".encode("utf-8"))
+ "\N{SNOWMAN}".encode("utf-8"))
def test_tag_containing_unicode_string_can_be_encoded(self):
- html = u"<b>\N{SNOWMAN}</b>"
+ html = "<b>\N{SNOWMAN}</b>"
soup = self.soup(html)
self.assertEqual(
soup.b.encode("utf-8"), html.encode("utf-8"))
def test_encoding_substitutes_unrecognized_characters_by_default(self):
- html = u"<b>\N{SNOWMAN}</b>"
+ html = "<b>\N{SNOWMAN}</b>"
soup = self.soup(html)
self.assertEqual(soup.b.encode("ascii"), b"<b>&#9731;</b>")
def test_encoding_can_be_made_strict(self):
- html = u"<b>\N{SNOWMAN}</b>"
+ html = "<b>\N{SNOWMAN}</b>"
soup = self.soup(html)
self.assertRaises(
UnicodeEncodeError, soup.encode, "ascii", errors="strict")
def test_decode_contents(self):
- html = u"<b>\N{SNOWMAN}</b>"
+ html = "<b>\N{SNOWMAN}</b>"
soup = self.soup(html)
- self.assertEqual(u"\N{SNOWMAN}", soup.b.decode_contents())
+ self.assertEqual("\N{SNOWMAN}", soup.b.decode_contents())
def test_encode_contents(self):
- html = u"<b>\N{SNOWMAN}</b>"
+ html = "<b>\N{SNOWMAN}</b>"
soup = self.soup(html)
self.assertEqual(
- u"\N{SNOWMAN}".encode("utf8"), soup.b.encode_contents(
+ "\N{SNOWMAN}".encode("utf8"), soup.b.encode_contents(
encoding="utf8"))
def test_deprecated_renderContents(self):
- html = u"<b>\N{SNOWMAN}</b>"
+ html = "<b>\N{SNOWMAN}</b>"
soup = self.soup(html)
self.assertEqual(
- u"\N{SNOWMAN}".encode("utf8"), soup.b.renderContents())
+ "\N{SNOWMAN}".encode("utf8"), soup.b.renderContents())
def test_repr(self):
- html = u"<b>\N{SNOWMAN}</b>"
+ html = "<b>\N{SNOWMAN}</b>"
soup = self.soup(html)
if PY3K:
self.assertEqual(html, repr(soup))
@@ -1952,7 +1952,7 @@ class TestSoupSelector(TreeTest):
els = self.soup.select('title')
self.assertEqual(len(els), 1)
self.assertEqual(els[0].name, 'title')
- self.assertEqual(els[0].contents, [u'The title'])
+ self.assertEqual(els[0].contents, ['The title'])
def test_one_tag_many(self):
els = self.soup.select('div')
@@ -1998,7 +1998,7 @@ class TestSoupSelector(TreeTest):
self.assertEqual(dashed[0]['id'], 'dash2')
def test_dashed_tag_text(self):
- self.assertEqual(self.soup.select('body > custom-dashed-tag')[0].text, u'Hello there.')
+ self.assertEqual(self.soup.select('body > custom-dashed-tag')[0].text, 'Hello there.')
def test_select_dashed_matches_find_all(self):
self.assertEqual(self.soup.select('custom-dashed-tag'), self.soup.find_all('custom-dashed-tag'))
@@ -2184,12 +2184,12 @@ class TestSoupSelector(TreeTest):
# Try to select first paragraph
els = self.soup.select('div#inner p:nth-of-type(1)')
self.assertEqual(len(els), 1)
- self.assertEqual(els[0].string, u'Some text')
+ self.assertEqual(els[0].string, 'Some text')
# Try to select third paragraph
els = self.soup.select('div#inner p:nth-of-type(3)')
self.assertEqual(len(els), 1)
- self.assertEqual(els[0].string, u'Another')
+ self.assertEqual(els[0].string, 'Another')
# Try to select (non-existent!) fourth paragraph
els = self.soup.select('div#inner p:nth-of-type(4)')
@@ -2202,7 +2202,7 @@ class TestSoupSelector(TreeTest):
def test_nth_of_type_direct_descendant(self):
els = self.soup.select('div#inner > p:nth-of-type(1)')
self.assertEqual(len(els), 1)
- self.assertEqual(els[0].string, u'Some text')
+ self.assertEqual(els[0].string, 'Some text')
def test_id_child_selector_nth_of_type(self):
self.assertSelects('#inner > p:nth-of-type(2)', ['p1'])
@@ -2283,7 +2283,7 @@ class TestSoupSelector(TreeTest):
markup = '<div class="c1"/><div class="c2"/><div class="c1"/>'
soup = BeautifulSoup(markup, 'html.parser')
selected = soup.select(".c1, .c2")
- self.assertEquals(3, len(selected))
+ self.assertEqual(3, len(selected))
# Verify that find_all finds the same elements, though because
# of an implementation detail it finds them in a different
diff --git a/convert-py3k b/convert-py3k
deleted file mode 100755
index 05fab53..0000000
--- a/convert-py3k
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-#
-# The Python 2 source is the definitive source. This script uses 2to3-3.2 to
-# create a new python3/bs4 source tree that works under Python 3.
-#
-# See README.txt to see how to run the test suite after conversion.
-echo "About to destroy and rebuild the py3k/bs4 directory."
-echo "If you've got stuff in there, Ctrl-C out of this script or answer 'n'."
-mkdir -p py3k
-rm -rfI py3k/bs4
-cp -r bs4/ py3k/
-2to3 -w py3k
-echo ""
-echo "OK, conversion is done."
-echo "Now running the unit tests."
-(cd py3k && python3 -m unittest discover -s bs4) \ No newline at end of file
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 01cb6df..c989d8c 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -18,14 +18,13 @@ with examples. I show you what the library is good for, how it works,
how to use it, how to make it do what you want, and what to do when it
violates your expectations.
-This document covers Beautiful Soup version 4.9.3. The examples in
-this documentation should work the same way in Python 2.7 and Python
-3.8.
+This document covers Beautiful Soup version 4.10.0. The examples in
+this documentation were written for Python 3.8.
You might be looking for the documentation for `Beautiful Soup 3
<http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_.
If so, you should know that Beautiful Soup 3 is no longer being
-developed and that support for it will be dropped on or after December
+developed and that all support for it was dropped on December
31, 2020. If you want to learn about the differences between Beautiful
Soup 3 and Beautiful Soup 4, see `Porting code to BS4`_.
@@ -170,16 +169,13 @@ Installing Beautiful Soup
If you're using a recent version of Debian or Ubuntu Linux, you can
install Beautiful Soup with the system package manager:
-:kbd:`$ apt-get install python-bs4` (for Python 2)
-
-:kbd:`$ apt-get install python3-bs4` (for Python 3)
+:kbd:`$ apt-get install python3-bs4`
Beautiful Soup 4 is published through PyPi, so if you can't install it
with the system packager, you can install it with ``easy_install`` or
-``pip``. The package name is ``beautifulsoup4``, and the same package
-works on Python 2 and Python 3. Make sure you use the right version of
-``pip`` or ``easy_install`` for your Python version (these may be named
-``pip3`` and ``easy_install3`` respectively if you're using Python 3).
+``pip``. The package name is ``beautifulsoup4``. Make sure you use the
+right version of ``pip`` or ``easy_install`` for your Python version
+(these may be named ``pip3`` and ``easy_install3`` respectively).
:kbd:`$ easy_install beautifulsoup4`
@@ -202,40 +198,8 @@ package the entire library with your application. You can download the
tarball, copy its ``bs4`` directory into your application's codebase,
and use Beautiful Soup without installing it at all.
-I use Python 2.7 and Python 3.8 to develop Beautiful Soup, but it
-should work with other recent versions.
-
-Problems after installation
----------------------------
-
-Beautiful Soup is packaged as Python 2 code. When you install it for
-use with Python 3, it's automatically converted to Python 3 code. If
-you don't install the package, the code won't be converted. There have
-also been reports on Windows machines of the wrong version being
-installed.
-
-If you get the ``ImportError`` "No module named HTMLParser", your
-problem is that you're running the Python 2 version of the code under
-Python 3.
-
-If you get the ``ImportError`` "No module named html.parser", your
-problem is that you're running the Python 3 version of the code under
-Python 2.
-
-In both cases, your best bet is to completely remove the Beautiful
-Soup installation from your system (including any directory created
-when you unzipped the tarball) and try the installation again.
-
-If you get the ``SyntaxError`` "Invalid syntax" on the line
-``ROOT_TAG_NAME = u'[document]'``, you need to convert the Python 2
-code to Python 3. You can do this either by installing the package:
-
-:kbd:`$ python3 setup.py install`
-
-or by manually running Python's ``2to3`` conversion script on the
-``bs4`` directory:
-
-:kbd:`$ 2to3-3.2 -w bs4`
+I use Python 3.8 to develop Beautiful Soup, but it should work with
+other recent versions.
.. _parser-installation:
@@ -272,8 +236,7 @@ This table summarizes the advantages and disadvantages of each parser library:
+----------------------+--------------------------------------------+--------------------------------+--------------------------+
| Python's html.parser | ``BeautifulSoup(markup, "html.parser")`` | * Batteries included | * Not as fast as lxml, |
| | | * Decent speed | less lenient than |
-| | | * Lenient (As of Python 2.7.3 | html5lib. |
-| | | and 3.2.) | |
+| | | * Lenient (As of Python 3.2) | html5lib. |
+----------------------+--------------------------------------------+--------------------------------+--------------------------+
| lxml's HTML parser | ``BeautifulSoup(markup, "lxml")`` | * Very fast | * External C dependency |
| | | * Lenient | |
@@ -289,9 +252,9 @@ This table summarizes the advantages and disadvantages of each parser library:
+----------------------+--------------------------------------------+--------------------------------+--------------------------+
If you can, I recommend you install and use lxml for speed. If you're
-using a very old version of Python -- earlier than 2.7.3 or 3.2.2 --
-it's `essential` that you install lxml or html5lib. Python's built-in
-HTML parser is just not very good in those old versions.
+using a very old version of Python -- earlier than 3.2.2 -- it's
+`essential` that you install lxml or html5lib. Python's built-in HTML
+parser is just not very good in those old versions.
Note that if a document is invalid, different parsers will generate
different Beautiful Soup trees for it. See `Differences
@@ -481,8 +444,7 @@ uses the ``NavigableString`` class to contain these bits of text::
A ``NavigableString`` is just like a Python Unicode string, except
that it also supports some of the features described in `Navigating
the tree`_ and `Searching the tree`_. You can convert a
-``NavigableString`` to a Unicode string with ``unicode()`` (in
-Python 2) or ``str`` (in Python 3)::
+``NavigableString`` to a Unicode string with ``str``::
unicode_string = str(tag.string)
unicode_string
@@ -2243,8 +2205,7 @@ Non-pretty printing
-------------------
If you just want a string, with no fancy formatting, you can call
-``str()`` on a ``BeautifulSoup`` object (``unicode()`` in Python 2),
-or on a ``Tag`` within it::
+``str()`` on a ``BeautifulSoup`` object, or on a ``Tag`` within it::
str(soup)
# '<html><head></head><body><a href="http://example.com/">I linked to <i>example.com</i></a></body></html>'
@@ -3169,10 +3130,10 @@ Version mismatch problems
-------------------------
* ``SyntaxError: Invalid syntax`` (on the line ``ROOT_TAG_NAME =
- '[document]'``): Caused by running the Python 2 version of
+ '[document]'``): Caused by running an old Python 2 version of
Beautiful Soup under Python 3, without converting the code.
-* ``ImportError: No module named HTMLParser`` - Caused by running the
+* ``ImportError: No module named HTMLParser`` - Caused by running an old
Python 2 version of Beautiful Soup under Python 3.
* ``ImportError: No module named html.parser`` - Caused by running the
diff --git a/setup.py b/setup.py
index d5c8f55..0bb17eb 100644
--- a/setup.py
+++ b/setup.py
@@ -4,23 +4,22 @@ from setuptools import (
)
import sys
+from bs4 import __version__
+
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="beautifulsoup4",
- # NOTE: We can't import __version__ from bs4 because bs4/__init__.py is Python 2 code,
- # and converting it to Python 3 means going through this code to run 2to3.
- # So we have to specify it twice for the time being.
- version = '4.9.3',
+ version = __version__,
author="Leonard Richardson",
author_email='leonardr@segfault.org',
url="http://www.crummy.com/software/BeautifulSoup/bs4/",
download_url = "http://www.crummy.com/software/BeautifulSoup/bs4/download/",
description="Screen-scraping library",
+ python_requires='>3.0.0',
install_requires=[
- "soupsieve >1.2; python_version>='3.0'",
- "soupsieve >1.2, <2.0; python_version<'3.0'",
+ "soupsieve >1.2",
],
long_description=long_description,
long_description_content_type="text/markdown",
@@ -30,12 +29,10 @@ setup(
'lxml' : [ 'lxml'],
'html5lib' : ['html5lib'],
},
- use_2to3 = True,
classifiers=["Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
- "Programming Language :: Python :: 2.7",
'Programming Language :: Python :: 3',
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Text Processing :: Markup :: XML",
diff --git a/test-all-versions b/test-all-versions
index 01e436b..fe7758a 100755
--- a/test-all-versions
+++ b/test-all-versions
@@ -1 +1 @@
-python2.7 -m unittest discover -s bs4 && ./convert-py3k
+python3 -m unittest discover -s bs4