You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2981 lines
89 KiB

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