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.

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