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.

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