1
# Some useful additions to the String class
2
# Copyright (C) 2010, Jacques Distler. All rights reserved.
3
# Licensed under a triple GPL/MPL/LGPL License.
7
# Return the number of unicode characters in a string
10
# string.num_chars -> integer
12
# Because Rails 2.3.5's String#mb_chars.length is broken,
13
# we provide this method.
15
if "".respond_to?(:force_encoding)
26
# A method to allow byte-oriented operations in both Ruby 1.8 and Ruby 1.9
29
# string.to_utf_8 -> string (with the encoding set to "ASCII-8BIT")
31
# Under 1.8, this is a NOOP. Under 1.9, it sets the encoding to "ASCII-8BIT"
33
if "".respond_to?(:force_encoding)
35
force_encoding("ASCII-8BIT")
44
# A method to allow string-oriented operations in both Ruby 1.8 and Ruby 1.9
47
# string.to_utf_8 -> string (with the encoding set to "UTF-8")
49
# Under 1.8, this is a NOOP. Under 1.9, it sets the encoding to "UTF-8"
51
if "".respond_to?(:force_encoding)
53
force_encoding("UTF-8")
62
# Take a string, and remove any invalid substrings, returning a valid utf-8 string.
65
# string.purify -> new_string
67
# returns a valid utf-8 string, purged of any subsequences of illegal bytes.
69
if "".respond_to?(:force_encoding)
71
text = self.dup.check_ncrs.as_utf8
72
text.chars.collect{|c| c.as_bytes}.grep(UTF8_REGEX).join.as_utf8
77
text.split(//u).grep(UTF8_REGEX).join
82
text = gsub(/&#[xX]([a-fA-F0-9]+);/) { |m| [$1.hex].pack('U*').as_bytes =~ UTF8_REGEX ? m : '' }
83
text.gsub(/&#(\d+);/) { |m| [$1.to_i].pack('U*').as_bytes =~ UTF8_REGEX ? m : '' }
87
[\x09\x0A\x0D\x20-\x7E] # ASCII
88
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
89
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
90
| [\xE1-\xEC\xEE][\x80-\xBF]{2} # straight 3-byte
91
| \xEF[\x80-\xBE]{2} #
92
| \xEF\xBF[\x80-\xBD] # excluding U+fffe and U+ffff
93
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
94
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
95
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
96
| \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
100
# Check whether a string is valid utf-8
103
# string.is_utf8? -> boolean
105
# returns true if the sequence of bytes in string is valid utf-8
108
#expand NCRs to utf-8
109
text = self.check_ncrs.as_bytes
111
# You might think this is faster, but it isn't
112
#pieces = self.split(/&#[xX]([a-fA-F0-9]+);/)
113
#1.step(pieces.length-1, 2) {|i| pieces[i] = [pieces[i].hex].pack('U*')}
114
#pieces = pieces.join.split(/&#(\d+);/)
115
#1.step(pieces.length-1, 2) {|i| pieces[i] = [pieces[i].to_i].pack('U*')}
118
#ensure the resulting string of bytes is valid utf-8
125
self.dup.as_bytes !~ /\S/
129
'Alpha' => 'Α',
130
'Beta' => 'Β',
131
'Epsilon' => 'Ε',
132
'Zeta' => 'Ζ',
134
'Iota' => 'Ι',
135
'Kappa' => 'Κ',
138
'Omicron' => 'Ο',
142
'epsilon' => 'ε',
143
'zeta' => 'ζ',
144
'omicron' => 'ο',
145
'sigmaf' => 'ς',
146
'thetasym' => 'ϑ',
147
'upsih' => 'ϒ',
148
'oline' => '‾',
149
'frasl' => '⁄',
150
'alefsym' => 'ℵ',
151
'crarr' => '↵',
152
'empty' => '∅',
155
'zwnj' => '‌',
159
'sbquo' => '‚',
160
'bdquo' => '„',
161
'lsaquo' => '‹',
162
'rsaquo' => '›',
163
'euro' => '€',
164
'angzarr' => '⍼',
165
'cirmid' => '⫯',
166
'cudarrl' => '⤸',
167
'cudarrr' => '⤵',
168
'cularr' => '↶',
169
'cularrp' => '⤽',
170
'curarr' => '↷',
171
'curarrm' => '⤼',
172
'Darr' => '↡',
173
'dArr' => '⇓',
174
'ddarr' => '⇊',
175
'DDotrahd' => '⤑',
176
'dfisht' => '⥿',
177
'dHar' => '⥥',
178
'dharl' => '⇃',
179
'dharr' => '⇂',
180
'duarr' => '⇵',
181
'duhar' => '⥯',
182
'dzigrarr' => '⟿',
183
'erarr' => '⥱',
184
'hArr' => '⇔',
185
'harr' => '↔',
186
'harrcir' => '⥈',
187
'harrw' => '↭',
188
'hoarr' => '⇿',
189
'imof' => '⊷',
190
'lAarr' => '⇚',
191
'Larr' => '↞',
192
'larrbfs' => '⤟',
193
'larrfs' => '⤝',
194
'larrhk' => '↩',
195
'larrlp' => '↫',
196
'larrpl' => '⤹',
197
'larrsim' => '⥳',
198
'larrtl' => '↢',
199
'lAtail' => '⤛',
200
'latail' => '⤙',
201
'lBarr' => '⤎',
202
'lbarr' => '⤌',
203
'ldca' => '⤶',
204
'ldrdhar' => '⥧',
205
'ldrushar' => '⥋',
206
'ldsh' => '↲',
207
'lfisht' => '⥼',
208
'lHar' => '⥢',
209
'lhard' => '↽',
210
'lharu' => '↼',
211
'lharul' => '⥪',
212
'llarr' => '⇇',
213
'llhard' => '⥫',
214
'loarr' => '⇽',
215
'lrarr' => '⇆',
216
'lrhar' => '⇋',
217
'lrhard' => '⥭',
218
'lsh' => '↰',
219
'lurdshar' => '⥊',
220
'luruhar' => '⥦',
221
'Map' => '⤅',
222
'map' => '↦',
223
'midcir' => '⫰',
224
'mumap' => '⊸',
225
'nearhk' => '⤤',
226
'neArr' => '⇗',
227
'nearr' => '↗',
228
'nesear' => '⤨',
229
'nhArr' => '⇎',
230
'nharr' => '↮',
231
'nlArr' => '⇍',
232
'nlarr' => '↚',
233
'nrArr' => '⇏',
234
'nrarr' => '↛',
235
'nrarrc' => '⤳̸',
236
'nrarrw' => '↝̸',
237
'nvHarr' => '⤄',
238
'nvlArr' => '⤂',
239
'nvrArr' => '⤃',
240
'nwarhk' => '⤣',
241
'nwArr' => '⇖',
242
'nwarr' => '↖',
243
'nwnear' => '⤧',
244
'olarr' => '↺',
245
'orarr' => '↻',
246
'origof' => '⊶',
247
'rAarr' => '⇛',
248
'Rarr' => '↠',
249
'rarrap' => '⥵',
250
'rarrbfs' => '⤠',
251
'rarrc' => '⤳',
252
'rarrfs' => '⤞',
253
'rarrhk' => '↪',
254
'rarrlp' => '↬',
255
'rarrpl' => '⥅',
256
'rarrsim' => '⥴',
257
'Rarrtl' => '⤖',
258
'rarrtl' => '↣',
259
'rarrw' => '↝',
260
'rAtail' => '⤜',
261
'ratail' => '⤚',
262
'RBarr' => '⤐',
263
'rBarr' => '⤏',
264
'rbarr' => '⤍',
265
'rdca' => '⤷',
266
'rdldhar' => '⥩',
267
'rdsh' => '↳',
268
'rfisht' => '⥽',
269
'rHar' => '⥤',
270
'rhard' => '⇁',
271
'rharu' => '⇀',
272
'rharul' => '⥬',
273
'rlarr' => '⇄',
274
'rlhar' => '⇌',
275
'roarr' => '⇾',
276
'rrarr' => '⇉',
277
'rsh' => '↱',
278
'ruluhar' => '⥨',
279
'searhk' => '⤥',
280
'seArr' => '⇘',
281
'searr' => '↘',
282
'seswar' => '⤩',
283
'simrarr' => '⥲',
284
'slarr' => '←',
285
'srarr' => '→',
286
'swarhk' => '⤦',
287
'swArr' => '⇙',
288
'swarr' => '↙',
289
'swnwar' => '⤪',
290
'Uarr' => '↟',
291
'uArr' => '⇑',
292
'Uarrocir' => '⥉',
293
'udarr' => '⇅',
294
'udhar' => '⥮',
295
'ufisht' => '⥾',
296
'uHar' => '⥣',
297
'uharl' => '↿',
298
'uharr' => '↾',
299
'uuarr' => '⇈',
300
'vArr' => '⇕',
301
'varr' => '↕',
302
'xhArr' => '⟺',
303
'xharr' => '⟷',
304
'xlArr' => '⟸',
305
'xlarr' => '⟵',
306
'xmap' => '⟼',
307
'xrArr' => '⟹',
308
'xrarr' => '⟶',
309
'zigrarr' => '⇝',
311
'acE' => '∾̳',
312
'amalg' => '⨿',
313
'barvee' => '⊽',
314
'Barwed' => '⌆',
315
'barwed' => '⌅',
316
'bsolb' => '⧅',
317
'Cap' => '⋒',
318
'capand' => '⩄',
319
'capbrcup' => '⩉',
320
'capcap' => '⩋',
321
'capcup' => '⩇',
322
'capdot' => '⩀',
323
'caps' => '∩︀',
324
'ccaps' => '⩍',
325
'ccups' => '⩌',
326
'ccupssm' => '⩐',
327
'coprod' => '∐',
328
'Cup' => '⋓',
329
'cupbrcap' => '⩈',
330
'cupcap' => '⩆',
331
'cupcup' => '⩊',
332
'cupdot' => '⊍',
333
'cupor' => '⩅',
334
'cups' => '∪︀',
335
'cuvee' => '⋎',
336
'cuwed' => '⋏',
337
'Dagger' => '‡',
338
'dagger' => '†',
339
'diam' => '⋄',
340
'divonx' => '⋇',
341
'eplus' => '⩱',
342
'hercon' => '⊹',
343
'intcal' => '⊺',
344
'iprod' => '⨼',
345
'loplus' => '⨭',
346
'lotimes' => '⨴',
347
'lthree' => '⋋',
348
'ltimes' => '⋉',
349
'midast' => '*',
350
'minusb' => '⊟',
351
'minusd' => '∸',
352
'minusdu' => '⨪',
353
'ncap' => '⩃',
354
'ncup' => '⩂',
355
'oast' => '⊛',
356
'ocir' => '⊚',
357
'odash' => '⊝',
358
'odiv' => '⨸',
359
'odot' => '⊙',
360
'odsold' => '⦼',
361
'ofcir' => '⦿',
362
'ogt' => '⧁',
363
'ohbar' => '⦵',
364
'olcir' => '⦾',
365
'olt' => '⧀',
366
'omid' => '⦶',
367
'ominus' => '⊖',
368
'opar' => '⦷',
369
'operp' => '⦹',
370
'oplus' => '⊕',
371
'osol' => '⊘',
372
'Otimes' => '⨷',
373
'otimes' => '⊗',
374
'otimesas' => '⨶',
375
'ovbar' => '⌽',
376
'plusacir' => '⨣',
377
'plusb' => '⊞',
378
'pluscir' => '⨢',
379
'plusdo' => '∔',
380
'plusdu' => '⨥',
381
'pluse' => '⩲',
382
'plussim' => '⨦',
383
'plustwo' => '⨧',
384
'prod' => '∏',
385
'race' => '∽̱',
386
'roplus' => '⨮',
387
'rotimes' => '⨵',
388
'rthree' => '⋌',
389
'rtimes' => '⋊',
390
'sdot' => '⋅',
391
'sdotb' => '⊡',
392
'setmn' => '∖',
393
'simplus' => '⨤',
394
'smashp' => '⨳',
395
'solb' => '⧄',
396
'sqcap' => '⊓',
397
'sqcaps' => '⊓︀',
398
'sqcup' => '⊔',
399
'sqcups' => '⊔︀',
400
'ssetmn' => '∖',
401
'sstarf' => '⋆',
402
'subdot' => '⪽',
403
'sum' => '∑',
404
'supdot' => '⪾',
405
'timesb' => '⊠',
406
'timesbar' => '⨱',
407
'timesd' => '⨰',
408
'tridot' => '◬',
409
'triminus' => '⨺',
410
'triplus' => '⨹',
411
'trisb' => '⧍',
412
'tritime' => '⨻',
413
'uplus' => '⊎',
414
'veebar' => '⊻',
415
'wedbar' => '⩟',
416
'wreath' => '≀',
417
'xcap' => '⋂',
418
'xcirc' => '◯',
419
'xcup' => '⋃',
420
'xdtri' => '▽',
421
'xodot' => '⨀',
422
'xoplus' => '⨁',
423
'xotime' => '⨂',
424
'xsqcup' => '⨆',
425
'xuplus' => '⨄',
426
'xutri' => '△',
427
'xvee' => '⋁',
428
'xwedge' => '⋀',
429
'dlcorn' => '⌞',
430
'drcorn' => '⌟',
431
'gtlPar' => '⦕',
432
'langd' => '⦑',
433
'lbrke' => '⦋',
434
'lbrksld' => '⦏',
435
'lbrkslu' => '⦍',
436
'lceil' => '⌈',
437
'lfloor' => '⌊',
438
'lmoust' => '⎰',
439
'lparlt' => '⦓',
440
'ltrPar' => '⦖',
441
'rangd' => '⦒',
442
'rbrke' => '⦌',
443
'rbrksld' => '⦎',
444
'rbrkslu' => '⦐',
445
'rceil' => '⌉',
446
'rfloor' => '⌋',
447
'rmoust' => '⎱',
448
'rpargt' => '⦔',
449
'ulcorn' => '⌜',
450
'urcorn' => '⌝',
451
'gnap' => '⪊',
452
'gnE' => '≩',
453
'gne' => '⪈',
454
'gnsim' => '⋧',
455
'gvnE' => '≩︀',
456
'lnap' => '⪉',
457
'lnE' => '≨',
458
'lne' => '⪇',
459
'lnsim' => '⋦',
460
'lvnE' => '≨︀',
461
'nap' => '≉',
462
'napE' => '⩰̸',
463
'napid' => '≋̸',
464
'ncong' => '≇',
465
'ncongdot' => '⩭̸',
466
'nequiv' => '≢',
467
'ngE' => '≧̸',
468
'nge' => '≱',
469
'nges' => '⩾̸',
470
'nGg' => '⋙̸',
471
'ngsim' => '≵',
472
'nGt' => '≫⃒',
473
'ngt' => '≯',
474
'nGtv' => '≫̸',
475
'nlE' => '≦̸',
476
'nle' => '≰',
477
'nles' => '⩽̸',
478
'nLl' => '⋘̸',
479
'nlsim' => '≴',
480
'nLt' => '≪⃒',
481
'nlt' => '≮',
482
'nltri' => '⋪',
483
'nltrie' => '⋬',
484
'nLtv' => '≪̸',
485
'nmid' => '∤',
486
'npar' => '∦',
487
'npr' => '⊀',
488
'nprcue' => '⋠',
489
'npre' => '⪯̸',
490
'nrtri' => '⋫',
491
'nrtrie' => '⋭',
492
'nsc' => '⊁',
493
'nsccue' => '⋡',
494
'nsce' => '⪰̸',
495
'nsim' => '≁',
496
'nsime' => '≄',
497
'nsmid' => '∤',
498
'nspar' => '∦',
499
'nsqsube' => '⋢',
500
'nsqsupe' => '⋣',
501
'nsub' => '⊄',
502
'nsubE' => '⫅̸',
503
'nsube' => '⊈',
504
'nsup' => '⊅',
505
'nsupE' => '⫆̸',
506
'nsupe' => '⊉',
507
'ntgl' => '≹',
508
'ntlg' => '≸',
509
'nvap' => '≍⃒',
510
'nVDash' => '⊯',
511
'nVdash' => '⊮',
512
'nvDash' => '⊭',
513
'nvdash' => '⊬',
514
'nvge' => '≥⃒',
515
'nvgt' => '>⃒',
516
'nvle' => '≤⃒',
517
'nvltrie' => '⊴⃒',
518
'nvrtrie' => '⊵⃒',
519
'nvsim' => '∼⃒',
520
'parsim' => '⫳',
521
'prnap' => '⪹',
522
'prnE' => '⪵',
523
'prnsim' => '⋨',
524
'rnmid' => '⫮',
525
'scnap' => '⪺',
526
'scnE' => '⪶',
527
'scnsim' => '⋩',
528
'simne' => '≆',
529
'solbar' => '⌿',
530
'subnE' => '⫋',
531
'subne' => '⊊',
532
'supnE' => '⫌',
533
'supne' => '⊋',
534
'vnsub' => '⊂⃒',
535
'vnsup' => '⊃⃒',
536
'vsubnE' => '⫋︀',
537
'vsubne' => '⊊︀',
538
'vsupnE' => '⫌︀',
539
'vsupne' => '⊋︀',
540
'ang' => '∠',
541
'ange' => '⦤',
542
'angmsd' => '∡',
543
'angmsdaa' => '⦨',
544
'angmsdab' => '⦩',
545
'angmsdac' => '⦪',
546
'angmsdad' => '⦫',
547
'angmsdae' => '⦬',
548
'angmsdaf' => '⦭',
549
'angmsdag' => '⦮',
550
'angmsdah' => '⦯',
551
'angrtvb' => '⊾',
552
'angrtvbd' => '⦝',
553
'bbrk' => '⎵',
554
'bbrktbrk' => '⎶',
555
'bemptyv' => '⦰',
556
'beth' => 'ℶ',
557
'boxbox' => '⧉',
558
'bprime' => '‵',
559
'bsemi' => '⁏',
560
'cemptyv' => '⦲',
561
'cirE' => '⧃',
562
'cirscir' => '⧂',
563
'comp' => '∁',
564
'daleth' => 'ℸ',
565
'demptyv' => '⦱',
566
'ell' => 'ℓ',
567
'empty' => '∅',
568
'emptyv' => '∅',
569
'gimel' => 'ℷ',
570
'iiota' => '℩',
571
'image' => 'ℑ',
572
'imath' => 'ı',
573
'jmath' => 'ȷ',
574
'laemptyv' => '⦴',
575
'lltri' => '◺',
576
'lrtri' => '⊿',
577
'mho' => '℧',
578
'nang' => '∠⃒',
579
'nexist' => '∄',
581
'planck' => 'ℏ',
582
'plankv' => 'ℏ',
583
'raemptyv' => '⦳',
584
'range' => '⦥',
585
'real' => 'ℜ',
586
'tbrk' => '⎴',
587
'trpezium' => '⏢',
588
'ultri' => '◸',
589
'urtri' => '◹',
590
'vzigzag' => '⦚',
591
'weierp' => '℘',
592
'apE' => '⩰',
593
'ape' => '≊',
594
'apid' => '≋',
595
'asymp' => '≈',
596
'Barv' => '⫧',
597
'bcong' => '≌',
598
'bepsi' => '϶',
599
'bowtie' => '⋈',
600
'bsim' => '∽',
601
'bsime' => '⋍',
602
'bsolhsub' => '⟈',
603
'bump' => '≎',
604
'bumpE' => '⪮',
605
'bumpe' => '≏',
606
'cire' => '≗',
607
'Colon' => '∷',
608
'Colone' => '⩴',
609
'colone' => '≔',
610
'congdot' => '⩭',
611
'csub' => '⫏',
612
'csube' => '⫑',
613
'csup' => '⫐',
614
'csupe' => '⫒',
615
'cuepr' => '⋞',
616
'cuesc' => '⋟',
617
'Dashv' => '⫤',
618
'dashv' => '⊣',
619
'easter' => '⩮',
620
'ecir' => '≖',
621
'ecolon' => '≕',
622
'eDDot' => '⩷',
623
'eDot' => '≑',
624
'efDot' => '≒',
626
'egs' => '⪖',
627
'egsdot' => '⪘',
629
'els' => '⪕',
630
'elsdot' => '⪗',
631
'equest' => '≟',
632
'equivDD' => '⩸',
633
'erDot' => '≓',
634
'esdot' => '≐',
635
'Esim' => '⩳',
636
'esim' => '≂',
637
'fork' => '⋔',
638
'forkv' => '⫙',
639
'frown' => '⌢',
640
'gap' => '⪆',
642
'gEl' => '⪌',
643
'gel' => '⋛',
644
'ges' => '⩾',
645
'gescc' => '⪩',
646
'gesdot' => '⪀',
647
'gesdoto' => '⪂',
648
'gesdotol' => '⪄',
649
'gesl' => '⋛︀',
650
'gesles' => '⪔',
653
'gla' => '⪥',
654
'glE' => '⪒',
655
'glj' => '⪤',
656
'gsim' => '≳',
657
'gsime' => '⪎',
658
'gsiml' => '⪐',
660
'gtcc' => '⪧',
661
'gtcir' => '⩺',
662
'gtdot' => '⋗',
663
'gtquest' => '⩼',
664
'gtrarr' => '⥸',
665
'homtht' => '∻',
666
'lap' => '⪅',
667
'lat' => '⪫',
668
'late' => '⪭',
669
'lates' => '⪭︀',
671
'lEg' => '⪋',
672
'leg' => '⋚',
673
'les' => '⩽',
674
'lescc' => '⪨',
675
'lesdot' => '⩿',
676
'lesdoto' => '⪁',
677
'lesdotor' => '⪃',
678
'lesg' => '⋚︀',
679
'lesges' => '⪓',
681
'lgE' => '⪑',
683
'lsim' => '≲',
684
'lsime' => '⪍',
685
'lsimg' => '⪏',
687
'ltcc' => '⪦',
688
'ltcir' => '⩹',
689
'ltdot' => '⋖',
690
'ltlarr' => '⥶',
691
'ltquest' => '⩻',
692
'ltrie' => '⊴',
693
'mcomma' => '⨩',
694
'mDDot' => '∺',
695
'mid' => '∣',
696
'mlcp' => '⫛',
697
'models' => '⊧',
698
'mstpos' => '∾',
701
'prap' => '⪷',
702
'prcue' => '≼',
703
'prE' => '⪳',
704
'pre' => '⪯',
705
'prsim' => '≾',
706
'prurel' => '⊰',
707
'ratio' => '∶',
708
'rtrie' => '⊵',
709
'rtriltri' => '⧎',
712
'scap' => '⪸',
713
'sccue' => '≽',
714
'scE' => '⪴',
715
'sce' => '⪰',
716
'scsim' => '≿',
717
'sdote' => '⩦',
718
'sfrown' => '⌢',
719
'simg' => '⪞',
720
'simgE' => '⪠',
721
'siml' => '⪝',
722
'simlE' => '⪟',
723
'smid' => '∣',
724
'smile' => '⌣',
725
'smt' => '⪪',
726
'smte' => '⪬',
727
'smtes' => '⪬︀',
728
'spar' => '∥',
729
'sqsub' => '⊏',
730
'sqsube' => '⊑',
731
'sqsup' => '⊐',
732
'sqsupe' => '⊒',
733
'ssmile' => '⌣',
734
'Sub' => '⋐',
735
'subE' => '⫅',
736
'subedot' => '⫃',
737
'submult' => '⫁',
738
'subplus' => '⪿',
739
'subrarr' => '⥹',
740
'subsim' => '⫇',
741
'subsub' => '⫕',
742
'subsup' => '⫓',
743
'Sup' => '⋑',
744
'supdsub' => '⫘',
745
'supE' => '⫆',
746
'supedot' => '⫄',
747
'suphsol' => '⟉',
748
'suphsub' => '⫗',
749
'suplarr' => '⥻',
750
'supmult' => '⫂',
751
'supplus' => '⫀',
752
'supsim' => '⫈',
753
'supsub' => '⫔',
754
'supsup' => '⫖',
755
'thkap' => '≈',
756
'thksim' => '∼',
757
'topfork' => '⫚',
758
'trie' => '≜',
759
'twixt' => '≬',
760
'Vbar' => '⫫',
761
'vBar' => '⫨',
762
'vBarv' => '⫩',
763
'VDash' => '⊫',
764
'Vdash' => '⊩',
765
'vDash' => '⊨',
766
'vdash' => '⊢',
767
'Vdashl' => '⫦',
768
'vltri' => '⊲',
769
'vprop' => '∝',
770
'vrtri' => '⊳',
771
'Vvdash' => '⊪',
772
'alpha' => 'α',
773
'beta' => 'β',
774
'chi' => 'χ',
775
'Delta' => 'Δ',
776
'delta' => 'δ',
777
'epsi' => 'ϵ',
778
'epsiv' => 'ϵ',
779
'eta' => 'η',
780
'Gamma' => 'Γ',
781
'gamma' => 'γ',
782
'Gammad' => 'Ϝ',
783
'gammad' => 'ϝ',
784
'iota' => 'ι',
785
'kappa' => 'κ',
786
'kappav' => 'ϰ',
787
'Lambda' => 'Λ',
788
'lambda' => 'λ',
791
'Omega' => 'Ω',
792
'omega' => 'ω',
793
'phgr' => 'φ',
794
'Phi' => 'Φ',
795
'phi' => 'φ',
796
'phis' => 'ϕ',
797
'phiv' => 'ϕ',
800
'piv' => 'ϖ',
801
'Psi' => 'Ψ',
802
'psi' => 'ψ',
803
'rho' => 'ρ',
804
'rhov' => 'ϱ',
805
'Sigma' => 'Σ',
806
'sigma' => 'σ',
807
'sigmav' => 'ς',
808
'tau' => 'τ',
809
'Theta' => 'Θ',
810
'theta' => 'θ',
811
'thetav' => 'ϑ',
812
'Upsi' => 'ϒ',
813
'upsi' => 'υ',
816
'zeta' => 'ζ',
817
'Afr' => '𝔄',
818
'afr' => '𝔞',
819
'Bfr' => '𝔅',
820
'bfr' => '𝔟',
821
'Cfr' => 'ℭ',
822
'cfr' => '𝔠',
823
'Dfr' => '𝔇',
824
'dfr' => '𝔡',
825
'Efr' => '𝔈',
826
'efr' => '𝔢',
827
'Ffr' => '𝔉',
828
'ffr' => '𝔣',
829
'Gfr' => '𝔊',
830
'gfr' => '𝔤',
831
'Hfr' => 'ℌ',
832
'hfr' => '𝔥',
833
'Ifr' => 'ℑ',
834
'ifr' => '𝔦',
835
'Jfr' => '𝔍',
836
'jfr' => '𝔧',
837
'Kfr' => '𝔎',
838
'kfr' => '𝔨',
839
'Lfr' => '𝔏',
840
'lfr' => '𝔩',
841
'Mfr' => '𝔐',
842
'mfr' => '𝔪',
843
'Nfr' => '𝔑',
844
'nfr' => '𝔫',
845
'Ofr' => '𝔒',
846
'ofr' => '𝔬',
847
'Pfr' => '𝔓',
848
'pfr' => '𝔭',
849
'Qfr' => '𝔔',
850
'qfr' => '𝔮',
851
'Rfr' => 'ℜ',
852
'rfr' => '𝔯',
853
'Sfr' => '𝔖',
854
'sfr' => '𝔰',
855
'Tfr' => '𝔗',
856
'tfr' => '𝔱',
857
'Ufr' => '𝔘',
858
'ufr' => '𝔲',
859
'Vfr' => '𝔙',
860
'vfr' => '𝔳',
861
'Wfr' => '𝔚',
862
'wfr' => '𝔴',
863
'Xfr' => '𝔛',
864
'xfr' => '𝔵',
865
'Yfr' => '𝔜',
866
'yfr' => '𝔶',
867
'Zfr' => 'ℨ',
868
'zfr' => '𝔷',
869
'Aopf' => '𝔸',
870
'Bopf' => '𝔹',
871
'Copf' => 'ℂ',
872
'Dopf' => '𝔻',
873
'Eopf' => '𝔼',
874
'Fopf' => '𝔽',
875
'Gopf' => '𝔾',
876
'Hopf' => 'ℍ',
877
'Iopf' => '𝕀',
878
'Jopf' => '𝕁',
879
'Kopf' => '𝕂',
880
'Lopf' => '𝕃',
881
'Mopf' => '𝕄',
882
'Nopf' => 'ℕ',
883
'Oopf' => '𝕆',
884
'Popf' => 'ℙ',
885
'Qopf' => 'ℚ',
886
'Ropf' => 'ℝ',
887
'Sopf' => '𝕊',
888
'Topf' => '𝕋',
889
'Uopf' => '𝕌',
890
'Vopf' => '𝕍',
891
'Wopf' => '𝕎',
892
'Xopf' => '𝕏',
893
'Yopf' => '𝕐',
894
'Zopf' => 'ℤ',
895
'Ascr' => '𝒜',
896
'ascr' => '𝒶',
897
'Bscr' => 'ℬ',
898
'bscr' => '𝒷',
899
'Cscr' => '𝒞',
900
'cscr' => '𝒸',
901
'Dscr' => '𝒟',
902
'dscr' => '𝒹',
903
'Escr' => 'ℰ',
904
'escr' => 'ℯ',
905
'Fscr' => 'ℱ',
906
'fscr' => '𝒻',
907
'Gscr' => '𝒢',
908
'gscr' => 'ℊ',
909
'Hscr' => 'ℋ',
910
'hscr' => '𝒽',
911
'Iscr' => 'ℐ',
912
'iscr' => '𝒾',
913
'Jscr' => '𝒥',
914
'jscr' => '𝒿',
915
'Kscr' => '𝒦',
916
'kscr' => '𝓀',
917
'Lscr' => 'ℒ',
918
'lscr' => '𝓁',
919
'Mscr' => 'ℳ',
920
'mscr' => '𝓂',
921
'Nscr' => '𝒩',
922
'nscr' => '𝓃',
923
'Oscr' => '𝒪',
924
'oscr' => 'ℴ',
925
'Pscr' => '𝒫',
926
'pscr' => '𝓅',
927
'Qscr' => '𝒬',
928
'qscr' => '𝓆',
929
'Rscr' => 'ℛ',
930
'rscr' => '𝓇',
931
'Sscr' => '𝒮',
932
'sscr' => '𝓈',
933
'Tscr' => '𝒯',
934
'tscr' => '𝓉',
935
'Uscr' => '𝒰',
936
'uscr' => '𝓊',
937
'Vscr' => '𝒱',
938
'vscr' => '𝓋',
939
'Wscr' => '𝒲',
940
'wscr' => '𝓌',
941
'Xscr' => '𝒳',
942
'xscr' => '𝓍',
943
'Yscr' => '𝒴',
944
'yscr' => '𝓎',
945
'Zscr' => '𝒵',
946
'zscr' => '𝓏',
947
'acd' => '∿',
948
'aleph' => 'ℵ',
949
'And' => '⩓',
950
'and' => '∧',
951
'andand' => '⩕',
952
'andd' => '⩜',
953
'andslope' => '⩘',
954
'andv' => '⩚',
955
'angrt' => '∟',
956
'angsph' => '∢',
957
'angst' => 'Å',
959
'apacir' => '⩯',
960
'awconint' => '∳',
961
'awint' => '⨑',
962
'becaus' => '∵',
963
'bernou' => 'ℬ',
964
'bne' => '=⃥',
965
'bnequiv' => '≡⃥',
966
'bNot' => '⫭',
967
'bnot' => '⌐',
968
'bottom' => '⊥',
969
'cap' => '∩',
970
'Cconint' => '∰',
971
'cirfnint' => '⨐',
972
'compfn' => '∘',
973
'cong' => '≅',
974
'Conint' => '∯',
975
'conint' => '∮',
976
'ctdot' => '⋯',
977
'cup' => '∪',
978
'cwconint' => '∲',
979
'cwint' => '∱',
980
'cylcty' => '⌭',
981
'disin' => '⋲',
982
'Dot' => '¨',
983
'DotDot' => '⃜',
984
'dsol' => '⧶',
985
'dtdot' => '⋱',
986
'dwangle' => '⦦',
987
'elinters' => '⏧',
988
'epar' => '⋕',
989
'eparsl' => '⧣',
990
'equiv' => '≡',
991
'eqvparsl' => '⧥',
992
'exist' => '∃',
993
'fltns' => '▱',
994
'fnof' => 'ƒ',
995
'forall' => '∀',
996
'fpartint' => '⨍',
998
'hamilt' => 'ℋ',
999
'iff' => '⇔',
1000
'iinfin' => '⧜',
1001
'imped' => 'Ƶ',
1002
'infin' => '∞',
1003
'infintie' => '⧝',
1004
'Int' => '∬',
1005
'int' => '∫',
1006
'intlarhk' => '⨗',
1007
'isin' => '∈',
1008
'isindot' => '⋵',
1009
'isinE' => '⋹',
1010
'isins' => '⋴',
1011
'isinsv' => '⋳',
1012
'isinv' => '∈',
1013
'lagran' => 'ℒ',
1014
'Lang' => '⟪',
1015
'lang' => '⟨',
1016
'lArr' => '⇐',
1017
'lbbrk' => '❲',
1018
'le' => '≤',
1019
'loang' => '⟬',
1020
'lobrk' => '⟦',
1021
'lopar' => '⦅',
1022
'lowast' => '∗',
1023
'minus' => '−',
1024
'mnplus' => '∓',
1025
'nabla' => '∇',
1026
'ne' => '≠',
1027
'nedot' => '≐̸',
1028
'nhpar' => '⫲',
1029
'ni' => '∋',
1030
'nis' => '⋼',
1031
'nisd' => '⋺',
1032
'niv' => '∋',
1033
'Not' => '⫬',
1034
'notin' => '∉',
1035
'notindot' => '⋵̸',
1036
'notinE' => '⋹̸',
1037
'notinva' => '∉',
1038
'notinvb' => '⋷',
1039
'notinvc' => '⋶',
1040
'notni' => '∌',
1041
'notniva' => '∌',
1042
'notnivb' => '⋾',
1043
'notnivc' => '⋽',
1044
'nparsl' => '⫽⃥',
1045
'npart' => '∂̸',
1046
'npolint' => '⨔',
1047
'nvinfin' => '⧞',
1048
'olcross' => '⦻',
1049
'Or' => '⩔',
1050
'or' => '∨',
1051
'ord' => '⩝',
1052
'order' => 'ℴ',
1053
'oror' => '⩖',
1054
'orslope' => '⩗',
1055
'orv' => '⩛',
1056
'par' => '∥',
1057
'parsl' => '⫽',
1058
'part' => '∂',
1059
'permil' => '‰',
1060
'perp' => '⊥',
1061
'pertenk' => '‱',
1062
'phmmat' => 'ℳ',
1063
'pointint' => '⨕',
1064
'Prime' => '″',
1065
'prime' => '′',
1066
'profalar' => '⌮',
1067
'profline' => '⌒',
1068
'profsurf' => '⌓',
1069
'prop' => '∝',
1070
'qint' => '⨌',
1071
'qprime' => '⁗',
1072
'quatint' => '⨖',
1073
'radic' => '√',
1074
'Rang' => '⟫',
1075
'rang' => '⟩',
1076
'rArr' => '⇒',
1077
'rbbrk' => '❳',
1078
'roang' => '⟭',
1079
'robrk' => '⟧',
1080
'ropar' => '⦆',
1081
'rppolint' => '⨒',
1082
'scpolint' => '⨓',
1083
'sim' => '∼',
1084
'simdot' => '⩪',
1085
'sime' => '≃',
1086
'smeparsl' => '⧤',
1087
'square' => '□',
1088
'squarf' => '▪',
1089
'strns' => '¯',
1090
'sub' => '⊂',
1091
'sube' => '⊆',
1092
'sup' => '⊃',
1093
'supe' => '⊇',
1094
'tdot' => '⃛',
1095
'there4' => '∴',
1096
'tint' => '∭',
1097
'top' => '⊤',
1098
'topbot' => '⌶',
1099
'topcir' => '⫱',
1100
'tprime' => '‴',
1101
'utdot' => '⋰',
1102
'uwangle' => '⦧',
1103
'vangrt' => '⦜',
1104
'veeeq' => '≚',
1105
'Verbar' => '‖',
1106
'wedgeq' => '≙',
1107
'xnis' => '⋻',
1108
'boxDL' => '╗',
1109
'boxDl' => '╖',
1110
'boxdL' => '╕',
1111
'boxdl' => '┐',
1112
'boxDR' => '╔',
1113
'boxDr' => '╓',
1114
'boxdR' => '╒',
1115
'boxdr' => '┌',
1116
'boxH' => '═',
1117
'boxh' => '─',
1118
'boxHD' => '╦',
1119
'boxHd' => '╤',
1120
'boxhD' => '╥',
1121
'boxhd' => '┬',
1122
'boxHU' => '╩',
1123
'boxHu' => '╧',
1124
'boxhU' => '╨',
1125
'boxhu' => '┴',
1126
'boxUL' => '╝',
1127
'boxUl' => '╜',
1128
'boxuL' => '╛',
1129
'boxul' => '┘',
1130
'boxUR' => '╚',
1131
'boxUr' => '╙',
1132
'boxuR' => '╘',
1133
'boxur' => '└',
1134
'boxV' => '║',
1135
'boxv' => '│',
1136
'boxVH' => '╬',
1137
'boxVh' => '╫',
1138
'boxvH' => '╪',
1139
'boxvh' => '┼',
1140
'boxVL' => '╣',
1141
'boxVl' => '╢',
1142
'boxvL' => '╡',
1143
'boxvl' => '┤',
1144
'boxVR' => '╠',
1145
'boxVr' => '╟',
1146
'boxvR' => '╞',
1147
'boxvr' => '├',
1148
'Acy' => 'А',
1149
'acy' => 'а',
1150
'Bcy' => 'Б',
1151
'bcy' => 'б',
1152
'CHcy' => 'Ч',
1153
'chcy' => 'ч',
1154
'Dcy' => 'Д',
1155
'dcy' => 'д',
1156
'Ecy' => 'Э',
1157
'ecy' => 'э',
1158
'Fcy' => 'Ф',
1159
'fcy' => 'ф',
1160
'Gcy' => 'Г',
1161
'gcy' => 'г',
1162
'HARDcy' => 'Ъ',
1163
'hardcy' => 'ъ',
1164
'Icy' => 'И',
1165
'icy' => 'и',
1166
'IEcy' => 'Е',
1167
'iecy' => 'е',
1168
'IOcy' => 'Ё',
1169
'iocy' => 'ё',
1170
'Jcy' => 'Й',
1171
'jcy' => 'й',
1172
'Kcy' => 'К',
1173
'kcy' => 'к',
1174
'KHcy' => 'Х',
1175
'khcy' => 'х',
1176
'Lcy' => 'Л',
1177
'lcy' => 'л',
1178
'Mcy' => 'М',
1179
'mcy' => 'м',
1180
'Ncy' => 'Н',
1181
'ncy' => 'н',
1182
'numero' => '№',
1183
'Ocy' => 'О',
1184
'ocy' => 'о',
1185
'Pcy' => 'П',
1186
'pcy' => 'п',
1187
'Rcy' => 'Р',
1188
'rcy' => 'р',
1189
'Scy' => 'С',
1190
'scy' => 'с',
1191
'SHCHcy' => 'Щ',
1192
'shchcy' => 'щ',
1193
'SHcy' => 'Ш',
1194
'shcy' => 'ш',
1195
'SOFTcy' => 'Ь',
1196
'softcy' => 'ь',
1197
'Tcy' => 'Т',
1198
'tcy' => 'т',
1199
'TScy' => 'Ц',
1200
'tscy' => 'ц',
1201
'Ucy' => 'У',
1202
'ucy' => 'у',
1203
'Vcy' => 'В',
1204
'vcy' => 'в',
1205
'YAcy' => 'Я',
1206
'yacy' => 'я',
1207
'Ycy' => 'Ы',
1208
'ycy' => 'ы',
1209
'YUcy' => 'Ю',
1210
'yucy' => 'ю',
1211
'Zcy' => 'З',
1212
'zcy' => 'з',
1213
'ZHcy' => 'Ж',
1214
'zhcy' => 'ж',
1215
'DJcy' => 'Ђ',
1216
'djcy' => 'ђ',
1217
'DScy' => 'Ѕ',
1218
'dscy' => 'ѕ',
1219
'DZcy' => 'Џ',
1220
'dzcy' => 'џ',
1221
'GJcy' => 'Ѓ',
1222
'gjcy' => 'ѓ',
1223
'Iukcy' => 'І',
1224
'iukcy' => 'і',
1225
'Jsercy' => 'Ј',
1226
'jsercy' => 'ј',
1227
'Jukcy' => 'Є',
1228
'jukcy' => 'є',
1229
'KJcy' => 'Ќ',
1230
'kjcy' => 'ќ',
1231
'LJcy' => 'Љ',
1232
'ljcy' => 'љ',
1233
'NJcy' => 'Њ',
1234
'njcy' => 'њ',
1235
'TSHcy' => 'Ћ',
1236
'tshcy' => 'ћ',
1237
'Ubrcy' => 'Ў',
1238
'ubrcy' => 'ў',
1239
'YIcy' => 'Ї',
1240
'yicy' => 'ї',
1241
'acute' => '´',
1242
'breve' => '˘',
1243
'caron' => 'ˇ',
1244
'cedil' => '¸',
1245
'circ' => 'ˆ',
1246
'dblac' => '˝',
1247
'die' => '¨',
1248
'dot' => '˙',
1249
'grave' => '`',
1250
'macr' => '¯',
1251
'ogon' => '˛',
1252
'ring' => '˚',
1253
'tilde' => '˜',
1254
'uml' => '¨',
1255
'Aacute' => 'Á',
1256
'aacute' => 'á',
1257
'Acirc' => 'Â',
1258
'acirc' => 'â',
1259
'AElig' => 'Æ',
1260
'aelig' => 'æ',
1261
'Agrave' => 'À',
1262
'agrave' => 'à',
1263
'Aring' => 'Å',
1264
'aring' => 'å',
1265
'Atilde' => 'Ã',
1266
'atilde' => 'ã',
1267
'Auml' => 'Ä',
1268
'auml' => 'ä',
1269
'Ccedil' => 'Ç',
1270
'ccedil' => 'ç',
1271
'Eacute' => 'É',
1272
'eacute' => 'é',
1273
'Ecirc' => 'Ê',
1274
'ecirc' => 'ê',
1275
'Egrave' => 'È',
1276
'egrave' => 'è',
1277
'ETH' => 'Ð',
1278
'eth' => 'ð',
1279
'Euml' => 'Ë',
1280
'euml' => 'ë',
1281
'Iacute' => 'Í',
1282
'iacute' => 'í',
1283
'Icirc' => 'Î',
1284
'icirc' => 'î',
1285
'Igrave' => 'Ì',
1286
'igrave' => 'ì',
1287
'Iuml' => 'Ï',
1288
'iuml' => 'ï',
1289
'Ntilde' => 'Ñ',
1290
'ntilde' => 'ñ',
1291
'Oacute' => 'Ó',
1292
'oacute' => 'ó',
1293
'Ocirc' => 'Ô',
1294
'ocirc' => 'ô',
1295
'Ograve' => 'Ò',
1296
'ograve' => 'ò',
1297
'Oslash' => 'Ø',
1298
'oslash' => 'ø',
1299
'Otilde' => 'Õ',
1300
'otilde' => 'õ',
1301
'Ouml' => 'Ö',
1302
'ouml' => 'ö',
1303
'szlig' => 'ß',
1304
'THORN' => 'Þ',
1305
'thorn' => 'þ',
1306
'Uacute' => 'Ú',
1307
'uacute' => 'ú',
1308
'Ucirc' => 'Û',
1309
'ucirc' => 'û',
1310
'Ugrave' => 'Ù',
1311
'ugrave' => 'ù',
1312
'Uuml' => 'Ü',
1313
'uuml' => 'ü',
1314
'Yacute' => 'Ý',
1315
'yacute' => 'ý',
1316
'yuml' => 'ÿ',
1317
'Abreve' => 'Ă',
1318
'abreve' => 'ă',
1319
'Amacr' => 'Ā',
1320
'amacr' => 'ā',
1321
'Aogon' => 'Ą',
1322
'aogon' => 'ą',
1323
'Cacute' => 'Ć',
1324
'cacute' => 'ć',
1325
'Ccaron' => 'Č',
1326
'ccaron' => 'č',
1327
'Ccirc' => 'Ĉ',
1328
'ccirc' => 'ĉ',
1329
'Cdot' => 'Ċ',
1330
'cdot' => 'ċ',
1331
'Dcaron' => 'Ď',
1332
'dcaron' => 'ď',
1333
'Dstrok' => 'Đ',
1334
'dstrok' => 'đ',
1335
'Ecaron' => 'Ě',
1336
'ecaron' => 'ě',
1337
'Edot' => 'Ė',
1338
'edot' => 'ė',
1339
'Emacr' => 'Ē',
1340
'emacr' => 'ē',
1341
'ENG' => 'Ŋ',
1342
'eng' => 'ŋ',
1343
'Eogon' => 'Ę',
1344
'eogon' => 'ę',
1345
'gacute' => 'ǵ',
1346
'Gbreve' => 'Ğ',
1347
'gbreve' => 'ğ',
1348
'Gcedil' => 'Ģ',
1349
'Gcirc' => 'Ĝ',
1350
'gcirc' => 'ĝ',
1351
'Gdot' => 'Ġ',
1352
'gdot' => 'ġ',
1353
'Hcirc' => 'Ĥ',
1354
'hcirc' => 'ĥ',
1355
'Hstrok' => 'Ħ',
1356
'hstrok' => 'ħ',
1357
'Idot' => 'İ',
1358
'IJlig' => 'IJ',
1359
'ijlig' => 'ij',
1360
'Imacr' => 'Ī',
1361
'imacr' => 'ī',
1362
'inodot' => 'ı',
1363
'Iogon' => 'Į',
1364
'iogon' => 'į',
1365
'Itilde' => 'Ĩ',
1366
'itilde' => 'ĩ',
1367
'Jcirc' => 'Ĵ',
1368
'jcirc' => 'ĵ',
1369
'Kcedil' => 'Ķ',
1370
'kcedil' => 'ķ',
1371
'kgreen' => 'ĸ',
1372
'Lacute' => 'Ĺ',
1373
'lacute' => 'ĺ',
1374
'Lcaron' => 'Ľ',
1375
'lcaron' => 'ľ',
1376
'Lcedil' => 'Ļ',
1377
'lcedil' => 'ļ',
1378
'Lmidot' => 'Ŀ',
1379
'lmidot' => 'ŀ',
1380
'Lstrok' => 'Ł',
1381
'lstrok' => 'ł',
1382
'Nacute' => 'Ń',
1383
'nacute' => 'ń',
1384
'napos' => 'ʼn',
1385
'Ncaron' => 'Ň',
1386
'ncaron' => 'ň',
1387
'Ncedil' => 'Ņ',
1388
'ncedil' => 'ņ',
1389
'Odblac' => 'Ő',
1390
'odblac' => 'ő',
1391
'OElig' => 'Œ',
1392
'oelig' => 'œ',
1393
'Omacr' => 'Ō',
1394
'omacr' => 'ō',
1395
'Racute' => 'Ŕ',
1396
'racute' => 'ŕ',
1397
'Rcaron' => 'Ř',
1398
'rcaron' => 'ř',
1399
'Rcedil' => 'Ŗ',
1400
'rcedil' => 'ŗ',
1401
'Sacute' => 'Ś',
1402
'sacute' => 'ś',
1403
'Scaron' => 'Š',
1404
'scaron' => 'š',
1405
'Scedil' => 'Ş',
1406
'scedil' => 'ş',
1407
'Scirc' => 'Ŝ',
1408
'scirc' => 'ŝ',
1409
'Tcaron' => 'Ť',
1410
'tcaron' => 'ť',
1411
'Tcedil' => 'Ţ',
1412
'tcedil' => 'ţ',
1413
'Tstrok' => 'Ŧ',
1414
'tstrok' => 'ŧ',
1415
'Ubreve' => 'Ŭ',
1416
'ubreve' => 'ŭ',
1417
'Udblac' => 'Ű',
1418
'udblac' => 'ű',
1419
'Umacr' => 'Ū',
1420
'umacr' => 'ū',
1421
'Uogon' => 'Ų',
1422
'uogon' => 'ų',
1423
'Uring' => 'Ů',
1424
'uring' => 'ů',
1425
'Utilde' => 'Ũ',
1426
'utilde' => 'ũ',
1427
'Wcirc' => 'Ŵ',
1428
'wcirc' => 'ŵ',
1429
'Ycirc' => 'Ŷ',
1430
'ycirc' => 'ŷ',
1431
'Yuml' => 'Ÿ',
1432
'Zacute' => 'Ź',
1433
'zacute' => 'ź',
1434
'Zcaron' => 'Ž',
1435
'zcaron' => 'ž',
1436
'Zdot' => 'Ż',
1437
'zdot' => 'ż',
1438
'apos' => ''',
1439
'ast' => '*',
1440
'brvbar' => '¦',
1441
'bsol' => '\',
1442
'cent' => '¢',
1443
'colon' => ':',
1444
'comma' => ',',
1445
'commat' => '@',
1446
'copy' => '©',
1447
'curren' => '¤',
1448
'darr' => '↓',
1449
'deg' => '°',
1450
'divide' => '÷',
1451
'dollar' => '$',
1452
'equals' => '=',
1453
'excl' => '!',
1454
'frac12' => '½',
1455
'frac14' => '¼',
1456
'frac18' => '⅛',
1457
'frac34' => '¾',
1458
'frac38' => '⅜',
1459
'frac58' => '⅝',
1460
'frac78' => '⅞',
1461
'gt' => '>',
1462
'half' => '½',
1463
'horbar' => '―',
1464
'hyphen' => '‐',
1465
'iexcl' => '¡',
1466
'iquest' => '¿',
1467
'laquo' => '«',
1468
'larr' => '←',
1469
'lcub' => '{',
1470
'ldquo' => '“',
1471
'lowbar' => '_',
1472
'lpar' => '(',
1473
'lsqb' => '[',
1474
'lsquo' => '‘',
1475
'micro' => 'µ',
1476
'middot' => '·',
1477
'nbsp' => ' ',
1478
'not' => '¬',
1479
'num' => '#',
1480
'ohm' => 'Ω',
1481
'ordf' => 'ª',
1482
'ordm' => 'º',
1483
'para' => '¶',
1484
'percnt' => '%',
1485
'period' => '.',
1486
'plus' => '+',
1487
'plusmn' => '±',
1488
'pound' => '£',
1489
'quest' => '?',
1490
'quot' => '"',
1491
'raquo' => '»',
1492
'rarr' => '→',
1493
'rcub' => '}',
1494
'rdquo' => '”',
1495
'reg' => '®',
1496
'rpar' => ')',
1497
'rsqb' => ']',
1498
'rsquo' => '’',
1499
'sect' => '§',
1500
'semi' => ';',
1501
'shy' => '­',
1502
'sol' => '/',
1503
'sung' => '♪',
1504
'sup1' => '¹',
1505
'sup2' => '²',
1506
'sup3' => '³',
1507
'times' => '×',
1508
'trade' => '™',
1509
'uarr' => '↑',
1510
'verbar' => '|',
1511
'yen' => '¥',
1512
'blank' => '␣',
1513
'blk12' => '▒',
1514
'blk14' => '░',
1515
'blk34' => '▓',
1516
'block' => '█',
1517
'bull' => '•',
1518
'caret' => '⁁',
1519
'check' => '✓',
1520
'cir' => '○',
1521
'clubs' => '♣',
1522
'copysr' => '℗',
1523
'cross' => '✗',
1524
'Dagger' => '‡',
1525
'dagger' => '†',
1526
'dash' => '‐',
1527
'diams' => '♦',
1528
'dlcrop' => '⌍',
1529
'drcrop' => '⌌',
1530
'dtri' => '▿',
1531
'dtrif' => '▾',
1532
'emsp' => ' ',
1533
'emsp13' => ' ',
1534
'emsp14' => ' ',
1535
'ensp' => ' ',
1536
'female' => '♀',
1537
'ffilig' => 'ffi',
1538
'fflig' => 'ff',
1539
'ffllig' => 'ffl',
1540
'filig' => 'fi',
1541
'fjlig' => 'fj',
1542
'flat' => '♭',
1543
'fllig' => 'fl',
1544
'frac13' => '⅓',
1545
'frac15' => '⅕',
1546
'frac16' => '⅙',
1547
'frac23' => '⅔',
1548
'frac25' => '⅖',
1549
'frac35' => '⅗',
1550
'frac45' => '⅘',
1551
'frac56' => '⅚',
1552
'hairsp' => ' ',
1553
'hearts' => '♥',
1554
'hellip' => '…',
1555
'hybull' => '⁃',
1556
'incare' => '℅',
1557
'ldquor' => '„',
1558
'lhblk' => '▄',
1559
'loz' => '◊',
1560
'lozf' => '⧫',
1561
'lsquor' => '‚',
1562
'ltri' => '◃',
1563
'ltrif' => '◂',
1564
'male' => '♂',
1565
'malt' => '✠',
1566
'marker' => '▮',
1567
'mdash' => '—',
1568
'mldr' => '…',
1569
'natur' => '♮',
1570
'ndash' => '–',
1571
'nldr' => '‥',
1572
'numsp' => ' ',
1573
'phone' => '☎',
1574
'puncsp' => ' ',
1575
'rdquor' => '”',
1576
'rect' => '▭',
1577
'rsquor' => '’',
1578
'rtri' => '▹',
1579
'rtrif' => '▸',
1580
'rx' => '℞',
1581
'sext' => '✶',
1582
'sharp' => '♯',
1583
'spades' => '♠',
1584
'squ' => '□',
1585
'squf' => '▪',
1586
'star' => '☆',
1587
'starf' => '★',
1588
'target' => '⌖',
1589
'telrec' => '⌕',
1590
'thinsp' => ' ',
1591
'uhblk' => '▀',
1592
'ulcrop' => '⌏',
1593
'urcrop' => '⌎',
1594
'utri' => '▵',
1595
'utrif' => '▴',
1596
'vellip' => '⋮',
1597
'af' => '⁡',
1598
'aopf' => '𝕒',
1599
'asympeq' => '≍',
1600
'bopf' => '𝕓',
1601
'copf' => '𝕔',
1602
'Cross' => '⨯',
1603
'DD' => 'ⅅ',
1604
'dd' => 'ⅆ',
1605
'dopf' => '𝕕',
1606
'DownArrowBar' => '⤓',
1607
'DownBreve' => '̑',
1608
'DownLeftRightVector' => '⥐',
1609
'DownLeftTeeVector' => '⥞',
1610
'DownLeftVectorBar' => '⥖',
1611
'DownRightTeeVector' => '⥟',
1612
'DownRightVectorBar' => '⥗',
1613
'ee' => 'ⅇ',
1614
'EmptySmallSquare' => '◻',
1615
'EmptyVerySmallSquare' => '▫',
1616
'eopf' => '𝕖',
1617
'Equal' => '⩵',
1618
'FilledSmallSquare' => '◼',
1619
'FilledVerySmallSquare' => '▪',
1620
'fopf' => '𝕗',
1621
'gopf' => '𝕘',
1622
'GreaterGreater' => '⪢',
1623
'Hat' => '^',
1624
'hopf' => '𝕙',
1625
'HorizontalLine' => '─',
1626
'ic' => '⁣',
1627
'ii' => 'ⅈ',
1628
'iopf' => '𝕚',
1629
'it' => '⁢',
1630
'jopf' => '𝕛',
1631
'kopf' => '𝕜',
1632
'larrb' => '⇤',
1633
'LeftDownTeeVector' => '⥡',
1634
'LeftDownVectorBar' => '⥙',
1635
'LeftRightVector' => '⥎',
1636
'LeftTeeVector' => '⥚',
1637
'LeftTriangleBar' => '⧏',
1638
'LeftUpDownVector' => '⥑',
1639
'LeftUpTeeVector' => '⥠',
1640
'LeftUpVectorBar' => '⥘',
1641
'LeftVectorBar' => '⥒',
1642
'LessLess' => '⪡',
1643
'lopf' => '𝕝',
1644
'mapstodown' => '↧',
1645
'mapstoleft' => '↤',
1646
'mapstoup' => '↥',
1647
'MediumSpace' => ' ',
1648
'mopf' => '𝕞',
1649
'nbump' => '≎̸',
1650
'nbumpe' => '≏̸',
1651
'nesim' => '≂̸',
1652
'NewLine' => '
',
1653
'NoBreak' => '⁠',
1654
'nopf' => '𝕟',
1655
'NotCupCap' => '≭',
1656
'NotHumpEqual' => '≏̸',
1657
'NotLeftTriangleBar' => '⧏̸',
1658
'NotNestedGreaterGreater' => '⪢̸',
1659
'NotNestedLessLess' => '⪡̸',
1660
'NotRightTriangleBar' => '⧐̸',
1661
'NotSquareSubset' => '⊏̸',
1662
'NotSquareSuperset' => '⊐̸',
1663
'NotSucceedsTilde' => '≿̸',
1664
'oopf' => '𝕠',
1665
'OverBar' => '‾',
1666
'OverBrace' => '⏞',
1667
'OverBracket' => '⎴',
1668
'OverParenthesis' => '⏜',
1669
'planckh' => 'ℎ',
1670
'popf' => '𝕡',
1671
'Product' => '∏',
1672
'qopf' => '𝕢',
1673
'rarrb' => '⇥',
1674
'RightDownTeeVector' => '⥝',
1675
'RightDownVectorBar' => '⥕',
1676
'RightTeeVector' => '⥛',
1677
'RightTriangleBar' => '⧐',
1678
'RightUpDownVector' => '⥏',
1679
'RightUpTeeVector' => '⥜',
1680
'RightUpVectorBar' => '⥔',
1681
'RightVectorBar' => '⥓',
1682
'ropf' => '𝕣',
1683
'RoundImplies' => '⥰',
1684
'RuleDelayed' => '⧴',
1685
'sopf' => '𝕤',
1686
'Tab' => '	',
1687
'ThickSpace' => '  ',
1688
'topf' => '𝕥',
1689
'UnderBar' => '_',
1690
'UnderBrace' => '⏟',
1691
'UnderBracket' => '⎵',
1692
'UnderParenthesis' => '⏝',
1693
'uopf' => '𝕦',
1694
'UpArrowBar' => '⤒',
1695
'Upsilon' => 'Υ',
1696
'VerticalLine' => '|',
1697
'VerticalSeparator' => '❘',
1698
'vopf' => '𝕧',
1699
'wopf' => '𝕨',
1700
'xopf' => '𝕩',
1701
'yopf' => '𝕪',
1702
'ZeroWidthSpace' => '​',
1703
'zopf' => '𝕫',
1704
'angle' => '∠',
1705
'ApplyFunction' => '⁡',
1706
'approx' => '≈',
1707
'approxeq' => '≊',
1708
'Assign' => '≔',
1709
'backcong' => '≌',
1710
'backepsilon' => '϶',
1711
'backprime' => '‵',
1712
'backsim' => '∽',
1713
'backsimeq' => '⋍',
1714
'Backslash' => '∖',
1715
'barwedge' => '⌅',
1716
'Because' => '∵',
1717
'because' => '∵',
1718
'Bernoullis' => 'ℬ',
1719
'between' => '≬',
1720
'bigcap' => '⋂',
1721
'bigcirc' => '◯',
1722
'bigcup' => '⋃',
1723
'bigodot' => '⨀',
1724
'bigoplus' => '⨁',
1725
'bigotimes' => '⨂',
1726
'bigsqcup' => '⨆',
1727
'bigstar' => '★',
1728
'bigtriangledown' => '▽',
1729
'bigtriangleup' => '△',
1730
'biguplus' => '⨄',
1731
'bigvee' => '⋁',
1732
'bigwedge' => '⋀',
1733
'bkarow' => '⤍',
1734
'blacklozenge' => '⧫',
1735
'blacksquare' => '▪',
1736
'blacktriangle' => '▴',
1737
'blacktriangledown' => '▾',
1738
'blacktriangleleft' => '◂',
1739
'blacktriangleright' => '▸',
1740
'bot' => '⊥',
1741
'boxminus' => '⊟',
1742
'boxplus' => '⊞',
1743
'boxtimes' => '⊠',
1744
'Breve' => '˘',
1745
'bullet' => '•',
1746
'Bumpeq' => '≎',
1747
'bumpeq' => '≏',
1748
'CapitalDifferentialD' => 'ⅅ',
1749
'Cayleys' => 'ℭ',
1750
'Cedilla' => '¸',
1751
'CenterDot' => '·',
1752
'centerdot' => '·',
1753
'checkmark' => '✓',
1754
'circeq' => '≗',
1755
'circlearrowleft' => '↺',
1756
'circlearrowright' => '↻',
1757
'circledast' => '⊛',
1758
'circledcirc' => '⊚',
1759
'circleddash' => '⊝',
1760
'CircleDot' => '⊙',
1761
'circledR' => '®',
1762
'circledS' => 'Ⓢ',
1763
'CircleMinus' => '⊖',
1764
'CirclePlus' => '⊕',
1765
'CircleTimes' => '⊗',
1766
'ClockwiseContourIntegral' => '∲',
1767
'CloseCurlyDoubleQuote' => '”',
1768
'CloseCurlyQuote' => '’',
1769
'clubsuit' => '♣',
1770
'coloneq' => '≔',
1771
'complement' => '∁',
1772
'complexes' => 'ℂ',
1773
'Congruent' => '≡',
1774
'ContourIntegral' => '∮',
1775
'Coproduct' => '∐',
1776
'CounterClockwiseContourIntegral' => '∳',
1777
'CupCap' => '≍',
1778
'curlyeqprec' => '⋞',
1779
'curlyeqsucc' => '⋟',
1780
'curlyvee' => '⋎',
1781
'curlywedge' => '⋏',
1782
'curvearrowleft' => '↶',
1783
'curvearrowright' => '↷',
1784
'dbkarow' => '⤏',
1785
'ddagger' => '‡',
1786
'ddotseq' => '⩷',
1787
'Del' => '∇',
1788
'DiacriticalAcute' => '´',
1789
'DiacriticalDot' => '˙',
1790
'DiacriticalDoubleAcute' => '˝',
1791
'DiacriticalGrave' => '`',
1792
'DiacriticalTilde' => '˜',
1793
'Diamond' => '⋄',
1794
'diamond' => '⋄',
1795
'diamondsuit' => '♦',
1796
'DifferentialD' => 'ⅆ',
1797
'digamma' => 'ϝ',
1798
'div' => '÷',
1799
'divideontimes' => '⋇',
1800
'doteq' => '≐',
1801
'doteqdot' => '≑',
1802
'DotEqual' => '≐',
1803
'dotminus' => '∸',
1804
'dotplus' => '∔',
1805
'dotsquare' => '⊡',
1806
'doublebarwedge' => '⌆',
1807
'DoubleContourIntegral' => '∯',
1808
'DoubleDot' => '¨',
1809
'DoubleDownArrow' => '⇓',
1810
'DoubleLeftArrow' => '⇐',
1811
'DoubleLeftRightArrow' => '⇔',
1812
'DoubleLeftTee' => '⫤',
1813
'DoubleLongLeftArrow' => '⟸',
1814
'DoubleLongLeftRightArrow' => '⟺',
1815
'DoubleLongRightArrow' => '⟹',
1816
'DoubleRightArrow' => '⇒',
1817
'DoubleRightTee' => '⊨',
1818
'DoubleUpArrow' => '⇑',
1819
'DoubleUpDownArrow' => '⇕',
1820
'DoubleVerticalBar' => '∥',
1821
'DownArrow' => '↓',
1822
'Downarrow' => '⇓',
1823
'downarrow' => '↓',
1824
'DownArrowUpArrow' => '⇵',
1825
'downdownarrows' => '⇊',
1826
'downharpoonleft' => '⇃',
1827
'downharpoonright' => '⇂',
1828
'DownLeftVector' => '↽',
1829
'DownRightVector' => '⇁',
1830
'DownTee' => '⊤',
1831
'DownTeeArrow' => '↧',
1832
'drbkarow' => '⤐',
1833
'Element' => '∈',
1834
'emptyset' => '∅',
1835
'eqcirc' => '≖',
1836
'eqcolon' => '≕',
1837
'eqsim' => '≂',
1838
'eqslantgtr' => '⪖',
1839
'eqslantless' => '⪕',
1840
'EqualTilde' => '≂',
1841
'Equilibrium' => '⇌',
1842
'Exists' => '∃',
1843
'expectation' => 'ℰ',
1844
'ExponentialE' => 'ⅇ',
1845
'exponentiale' => 'ⅇ',
1846
'fallingdotseq' => '≒',
1847
'ForAll' => '∀',
1848
'Fouriertrf' => 'ℱ',
1849
'geq' => '≥',
1850
'geqq' => '≧',
1851
'geqslant' => '⩾',
1852
'gg' => '≫',
1853
'ggg' => '⋙',
1854
'gnapprox' => '⪊',
1855
'gneq' => '⪈',
1856
'gneqq' => '≩',
1857
'GreaterEqual' => '≥',
1858
'GreaterEqualLess' => '⋛',
1859
'GreaterFullEqual' => '≧',
1860
'GreaterLess' => '≷',
1861
'GreaterSlantEqual' => '⩾',
1862
'GreaterTilde' => '≳',
1863
'gtrapprox' => '⪆',
1864
'gtrdot' => '⋗',
1865
'gtreqless' => '⋛',
1866
'gtreqqless' => '⪌',
1867
'gtrless' => '≷',
1868
'gtrsim' => '≳',
1869
'gvertneqq' => '≩︀',
1870
'Hacek' => 'ˇ',
1871
'hbar' => 'ℏ',
1872
'heartsuit' => '♥',
1873
'HilbertSpace' => 'ℋ',
1874
'hksearow' => '⤥',
1875
'hkswarow' => '⤦',
1876
'hookleftarrow' => '↩',
1877
'hookrightarrow' => '↪',
1878
'hslash' => 'ℏ',
1879
'HumpDownHump' => '≎',
1880
'HumpEqual' => '≏',
1881
'iiiint' => '⨌',
1882
'iiint' => '∭',
1883
'Im' => 'ℑ',
1884
'ImaginaryI' => 'ⅈ',
1885
'imagline' => 'ℐ',
1886
'imagpart' => 'ℑ',
1887
'Implies' => '⇒',
1888
'in' => '∈',
1889
'integers' => 'ℤ',
1890
'Integral' => '∫',
1891
'intercal' => '⊺',
1892
'Intersection' => '⋂',
1893
'intprod' => '⨼',
1894
'InvisibleComma' => '⁣',
1895
'InvisibleTimes' => '⁢',
1896
'langle' => '⟨',
1897
'Laplacetrf' => 'ℒ',
1898
'lbrace' => '{',
1899
'lbrack' => '[',
1900
'LeftAngleBracket' => '⟨',
1901
'LeftArrow' => '←',
1902
'Leftarrow' => '⇐',
1903
'leftarrow' => '←',
1904
'LeftArrowBar' => '⇤',
1905
'LeftArrowRightArrow' => '⇆',
1906
'leftarrowtail' => '↢',
1907
'LeftCeiling' => '⌈',
1908
'LeftDoubleBracket' => '⟦',
1909
'LeftDownVector' => '⇃',
1910
'LeftFloor' => '⌊',
1911
'leftharpoondown' => '↽',
1912
'leftharpoonup' => '↼',
1913
'leftleftarrows' => '⇇',
1914
'LeftRightArrow' => '↔',
1915
'Leftrightarrow' => '⇔',
1916
'leftrightarrow' => '↔',
1917
'leftrightarrows' => '⇆',
1918
'leftrightharpoons' => '⇋',
1919
'leftrightsquigarrow' => '↭',
1920
'LeftTee' => '⊣',
1921
'LeftTeeArrow' => '↤',
1922
'leftthreetimes' => '⋋',
1923
'LeftTriangle' => '⊲',
1924
'LeftTriangleEqual' => '⊴',
1925
'LeftUpVector' => '↿',
1926
'LeftVector' => '↼',
1927
'leq' => '≤',
1928
'leqq' => '≦',
1929
'leqslant' => '⩽',
1930
'lessapprox' => '⪅',
1931
'lessdot' => '⋖',
1932
'lesseqgtr' => '⋚',
1933
'lesseqqgtr' => '⪋',
1934
'LessEqualGreater' => '⋚',
1935
'LessFullEqual' => '≦',
1936
'LessGreater' => '≶',
1937
'lessgtr' => '≶',
1938
'lesssim' => '≲',
1939
'LessSlantEqual' => '⩽',
1940
'LessTilde' => '≲',
1941
'll' => '≪',
1942
'llcorner' => '⌞',
1943
'Lleftarrow' => '⇚',
1944
'lmoustache' => '⎰',
1945
'lnapprox' => '⪉',
1946
'lneq' => '⪇',
1947
'lneqq' => '≨',
1948
'LongLeftArrow' => '⟵',
1949
'Longleftarrow' => '⟸',
1950
'longleftarrow' => '⟵',
1951
'LongLeftRightArrow' => '⟷',
1952
'Longleftrightarrow' => '⟺',
1953
'longleftrightarrow' => '⟷',
1954
'longmapsto' => '⟼',
1955
'LongRightArrow' => '⟶',
1956
'Longrightarrow' => '⟹',
1957
'longrightarrow' => '⟶',
1958
'looparrowleft' => '↫',
1959
'looparrowright' => '↬',
1960
'LowerLeftArrow' => '↙',
1961
'LowerRightArrow' => '↘',
1962
'lozenge' => '◊',
1963
'lrcorner' => '⌟',
1964
'Lsh' => '↰',
1965
'lvertneqq' => '≨︀',
1966
'maltese' => '✠',
1967
'mapsto' => '↦',
1968
'measuredangle' => '∡',
1969
'Mellintrf' => 'ℳ',
1970
'MinusPlus' => '∓',
1971
'mp' => '∓',
1972
'multimap' => '⊸',
1973
'napprox' => '≉',
1974
'natural' => '♮',
1975
'naturals' => 'ℕ',
1976
'nearrow' => '↗',
1977
'NegativeMediumSpace' => '​',
1978
'NegativeThickSpace' => '​',
1979
'NegativeThinSpace' => '​',
1980
'NegativeVeryThinSpace' => '​',
1981
'NestedGreaterGreater' => '≫',
1982
'NestedLessLess' => '≪',
1983
'nexists' => '∄',
1984
'ngeq' => '≱',
1985
'ngeqq' => '≧̸',
1986
'ngeqslant' => '⩾̸',
1987
'ngtr' => '≯',
1988
'nLeftarrow' => '⇍',
1989
'nleftarrow' => '↚',
1990
'nLeftrightarrow' => '⇎',
1991
'nleftrightarrow' => '↮',
1992
'nleq' => '≰',
1993
'nleqq' => '≦̸',
1994
'nleqslant' => '⩽̸',
1995
'nless' => '≮',
1996
'NonBreakingSpace' => ' ',
1997
'NotCongruent' => '≢',
1998
'NotDoubleVerticalBar' => '∦',
1999
'NotElement' => '∉',
2000
'NotEqual' => '≠',
2001
'NotEqualTilde' => '≂̸',
2002
'NotExists' => '∄',
2003
'NotGreater' => '≯',
2004
'NotGreaterEqual' => '≱',
2005
'NotGreaterFullEqual' => '≦̸',
2006
'NotGreaterGreater' => '≫̸',
2007
'NotGreaterLess' => '≹',
2008
'NotGreaterSlantEqual' => '⩾̸',
2009
'NotGreaterTilde' => '≵',
2010
'NotHumpDownHump' => '≎̸',
2011
'NotLeftTriangle' => '⋪',
2012
'NotLeftTriangleEqual' => '⋬',
2013
'NotLess' => '≮',
2014
'NotLessEqual' => '≰',
2015
'NotLessGreater' => '≸',
2016
'NotLessLess' => '≪̸',
2017
'NotLessSlantEqual' => '⩽̸',
2018
'NotLessTilde' => '≴',
2019
'NotPrecedes' => '⊀',
2020
'NotPrecedesEqual' => '⪯̸',
2021
'NotPrecedesSlantEqual' => '⋠',
2022
'NotReverseElement' => '∌',
2023
'NotRightTriangle' => '⋫',
2024
'NotRightTriangleEqual' => '⋭',
2025
'NotSquareSubsetEqual' => '⋢',
2026
'NotSquareSupersetEqual' => '⋣',
2027
'NotSubset' => '⊂⃒',
2028
'NotSubsetEqual' => '⊈',
2029
'NotSucceeds' => '⊁',
2030
'NotSucceedsEqual' => '⪰̸',
2031
'NotSucceedsSlantEqual' => '⋡',
2032
'NotSuperset' => '⊃⃒',
2033
'NotSupersetEqual' => '⊉',
2034
'NotTilde' => '≁',
2035
'NotTildeEqual' => '≄',
2036
'NotTildeFullEqual' => '≇',
2037
'NotTildeTilde' => '≉',
2038
'NotVerticalBar' => '∤',
2039
'nparallel' => '∦',
2040
'nprec' => '⊀',
2041
'npreceq' => '⪯̸',
2042
'nRightarrow' => '⇏',
2043
'nrightarrow' => '↛',
2044
'nshortmid' => '∤',
2045
'nshortparallel' => '∦',
2046
'nsimeq' => '≄',
2047
'nsubset' => '⊂⃒',
2048
'nsubseteq' => '⊈',
2049
'nsubseteqq' => '⫅̸',
2050
'nsucc' => '⊁',
2051
'nsucceq' => '⪰̸',
2052
'nsupset' => '⊃⃒',
2053
'nsupseteq' => '⊉',
2054
'nsupseteqq' => '⫆̸',
2055
'ntriangleleft' => '⋪',
2056
'ntrianglelefteq' => '⋬',
2057
'ntriangleright' => '⋫',
2058
'ntrianglerighteq' => '⋭',
2059
'nwarrow' => '↖',
2060
'oint' => '∮',
2061
'OpenCurlyDoubleQuote' => '“',
2062
'OpenCurlyQuote' => '‘',
2063
'orderof' => 'ℴ',
2064
'parallel' => '∥',
2065
'PartialD' => '∂',
2066
'pitchfork' => '⋔',
2067
'PlusMinus' => '±',
2068
'pm' => '±',
2069
'Poincareplane' => 'ℌ',
2070
'prec' => '≺',
2071
'precapprox' => '⪷',
2072
'preccurlyeq' => '≼',
2073
'Precedes' => '≺',
2074
'PrecedesEqual' => '⪯',
2075
'PrecedesSlantEqual' => '≼',
2076
'PrecedesTilde' => '≾',
2077
'preceq' => '⪯',
2078
'precnapprox' => '⪹',
2079
'precneqq' => '⪵',
2080
'precnsim' => '⋨',
2081
'precsim' => '≾',
2082
'primes' => 'ℙ',
2083
'Proportion' => '∷',
2084
'Proportional' => '∝',
2085
'propto' => '∝',
2086
'quaternions' => 'ℍ',
2087
'questeq' => '≟',
2088
'rangle' => '⟩',
2089
'rationals' => 'ℚ',
2090
'rbrace' => '}',
2091
'rbrack' => ']',
2092
'Re' => 'ℜ',
2093
'realine' => 'ℛ',
2094
'realpart' => 'ℜ',
2095
'reals' => 'ℝ',
2096
'ReverseElement' => '∋',
2097
'ReverseEquilibrium' => '⇋',
2098
'ReverseUpEquilibrium' => '⥯',
2099
'RightAngleBracket' => '⟩',
2100
'RightArrow' => '→',
2101
'Rightarrow' => '⇒',
2102
'rightarrow' => '→',
2103
'RightArrowBar' => '⇥',
2104
'RightArrowLeftArrow' => '⇄',
2105
'rightarrowtail' => '↣',
2106
'RightCeiling' => '⌉',
2107
'RightDoubleBracket' => '⟧',
2108
'RightDownVector' => '⇂',
2109
'RightFloor' => '⌋',
2110
'rightharpoondown' => '⇁',
2111
'rightharpoonup' => '⇀',
2112
'rightleftarrows' => '⇄',
2113
'rightleftharpoons' => '⇌',
2114
'rightrightarrows' => '⇉',
2115
'rightsquigarrow' => '↝',
2116
'RightTee' => '⊢',
2117
'RightTeeArrow' => '↦',
2118
'rightthreetimes' => '⋌',
2119
'RightTriangle' => '⊳',
2120
'RightTriangleEqual' => '⊵',
2121
'RightUpVector' => '↾',
2122
'RightVector' => '⇀',
2123
'risingdotseq' => '≓',
2124
'rmoustache' => '⎱',
2125
'Rrightarrow' => '⇛',
2126
'Rsh' => '↱',
2127
'searrow' => '↘',
2128
'setminus' => '∖',
2129
'ShortDownArrow' => '↓',
2130
'ShortLeftArrow' => '←',
2131
'shortmid' => '∣',
2132
'shortparallel' => '∥',
2133
'ShortRightArrow' => '→',
2134
'ShortUpArrow' => '↑',
2135
'simeq' => '≃',
2136
'SmallCircle' => '∘',
2137
'smallsetminus' => '∖',
2138
'spadesuit' => '♠',
2139
'Sqrt' => '√',
2140
'sqsubset' => '⊏',
2141
'sqsubseteq' => '⊑',
2142
'sqsupset' => '⊐',
2143
'sqsupseteq' => '⊒',
2144
'Square' => '□',
2145
'SquareIntersection' => '⊓',
2146
'SquareSubset' => '⊏',
2147
'SquareSubsetEqual' => '⊑',
2148
'SquareSuperset' => '⊐',
2149
'SquareSupersetEqual' => '⊒',
2150
'SquareUnion' => '⊔',
2151
'Star' => '⋆',
2152
'straightepsilon' => 'ϵ',
2153
'straightphi' => 'ϕ',
2154
'Subset' => '⋐',
2155
'subset' => '⊂',
2156
'subseteq' => '⊆',
2157
'subseteqq' => '⫅',
2158
'SubsetEqual' => '⊆',
2159
'subsetneq' => '⊊',
2160
'subsetneqq' => '⫋',
2161
'succ' => '≻',
2162
'succapprox' => '⪸',
2163
'succcurlyeq' => '≽',
2164
'Succeeds' => '≻',
2165
'SucceedsEqual' => '⪰',
2166
'SucceedsSlantEqual' => '≽',
2167
'SucceedsTilde' => '≿',
2168
'succeq' => '⪰',
2169
'succnapprox' => '⪺',
2170
'succneqq' => '⪶',
2171
'succnsim' => '⋩',
2172
'succsim' => '≿',
2173
'SuchThat' => '∋',
2174
'Sum' => '∑',
2175
'Superset' => '⊃',
2176
'SupersetEqual' => '⊇',
2177
'Supset' => '⋑',
2178
'supset' => '⊃',
2179
'supseteq' => '⊇',
2180
'supseteqq' => '⫆',
2181
'supsetneq' => '⊋',
2182
'supsetneqq' => '⫌',
2183
'swarrow' => '↙',
2184
'Therefore' => '∴',
2185
'therefore' => '∴',
2186
'thickapprox' => '≈',
2187
'thicksim' => '∼',
2188
'ThinSpace' => ' ',
2189
'Tilde' => '∼',
2190
'TildeEqual' => '≃',
2191
'TildeFullEqual' => '≅',
2192
'TildeTilde' => '≈',
2193
'toea' => '⤨',
2194
'tosa' => '⤩',
2195
'triangle' => '▵',
2196
'triangledown' => '▿',
2197
'triangleleft' => '◃',
2198
'trianglelefteq' => '⊴',
2199
'triangleq' => '≜',
2200
'triangleright' => '▹',
2201
'trianglerighteq' => '⊵',
2202
'TripleDot' => '⃛',
2203
'twoheadleftarrow' => '↞',
2204
'twoheadrightarrow' => '↠',
2205
'ulcorner' => '⌜',
2206
'Union' => '⋃',
2207
'UnionPlus' => '⊎',
2208
'UpArrow' => '↑',
2209
'Uparrow' => '⇑',
2210
'uparrow' => '↑',
2211
'UpArrowDownArrow' => '⇅',
2212
'UpDownArrow' => '↕',
2213
'Updownarrow' => '⇕',
2214
'updownarrow' => '↕',
2215
'UpEquilibrium' => '⥮',
2216
'upharpoonleft' => '↿',
2217
'upharpoonright' => '↾',
2218
'UpperLeftArrow' => '↖',
2219
'UpperRightArrow' => '↗',
2220
'upsilon' => 'υ',
2221
'UpTee' => '⊥',
2222
'UpTeeArrow' => '↥',
2223
'upuparrows' => '⇈',
2224
'urcorner' => '⌝',
2225
'varepsilon' => 'ϵ',
2226
'varkappa' => 'ϰ',
2227
'varnothing' => '∅',
2228
'varphi' => 'ϕ',
2229
'varpi' => 'ϖ',
2230
'varpropto' => '∝',
2231
'varrho' => 'ϱ',
2232
'varsigma' => 'ς',
2233
'varsubsetneq' => '⊊︀',
2234
'varsubsetneqq' => '⫋︀',
2235
'varsupsetneq' => '⊋︀',
2236
'varsupsetneqq' => '⫌︀',
2237
'vartheta' => 'ϑ',
2238
'vartriangleleft' => '⊲',
2239
'vartriangleright' => '⊳',
2240
'Vee' => '⋁',
2241
'vee' => '∨',
2242
'Vert' => '‖',
2243
'vert' => '|',
2244
'VerticalBar' => '∣',
2245
'VerticalTilde' => '≀',
2246
'VeryThinSpace' => ' ',
2247
'Wedge' => '⋀',
2248
'wedge' => '∧',
2249
'wp' => '℘',
2250
'wr' => '≀',
2251
'zeetrf' => 'ℨ',
2253
'COPY' => '©',
2256
'QUOT' => '"',
2258
'TRADE' => '™'
2262
# Converts XHTML+MathML named entities in string to Numeric Character References
2265
# string.to_ncr -> string
2268
self.gsub(/&([a-zA-Z0-9]+);/) {|m| $1.convert_to_ncr}
2271
# Converts XHTML+MathML named entities in string to Numeric Character References
2274
# string.to_ncr! -> str or nil
2276
# Substitution is done in-place.
2279
self.gsub!(/&([a-zA-Z0-9]+);/) {|m| $1.convert_to_ncr}
2282
# Converts XHTML+MathML named entities in string to UTF-8
2285
# string.to_utf8 -> string
2289
self.gsub(/&([a-zA-Z0-9]+);/) {|m| $1.convert_to_utf8}
2291
# You might think this is faster, but it isn't
2292
# pieces = self.split(/&([a-zA-Z0-9]+);/)
2293
# 1.step(pieces.length-1, 2) {|i| pieces[i].convert_to_utf8}
2298
# Converts XHTML+MathML named entities in string to UTF-8
2301
# string.to_ncr! -> str or nil
2303
# Substitution is done in-place.
2306
self.gsub!(/&([a-zA-Z0-9]+);/) {|m| $1.convert_to_utf8}
2312
self.gsub( /&/, "&" ).
2313
gsub( /</, "<" ).
2314
gsub( />/, ">" ).
2315
gsub(/'/, "'" ).
2316
gsub(/"/, """ )
2320
self.gsub(/&(.*?);/) do
2323
when /\Aamp\z/ni then '&'
2324
when /\Agt\z/ni then '>'
2325
when /\Alt\z/ni then '<'
2326
when /\Aquot\z/ni then '"'
2327
when /\Aapos\z/ni then "'"
2328
when /\A#0*(\d+)\z/n then
2329
if Integer($1) < 256
2332
if Integer($1) < 1114111
2333
[Integer($1)].pack("U")
2338
when /\A#x([0-9a-f]+)\z/ni then
2356
def convert_to_ncr #:nodoc:
2357
if self =~ /^(lt|gt|amp|quot|apos)$/
2358
self.replace "&" + self + ";"
2359
elsif MATHML_ENTITIES.has_key?(self)
2360
self.replace MATHML_ENTITIES[self]
2362
self.replace "&" + self + ";"
2366
def convert_to_utf8 #:nodoc:
2367
if self =~ /^(lt|gt|amp|quot|apos)$/i
2368
self.replace "&" + self.downcase + ";"
2369
elsif MATHML_ENTITIES.has_key?(self)
2370
self.replace MATHML_ENTITIES[self].split(';').collect {|s| s.gsub(/^&#x([A-F0-9]+)$/, '\1').hex }.pack('U*')
2372
self.replace "&" + self + ";"