compat.py 92 KB

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