compat.py 95 KB

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