annotate trunk/src/dil/HtmlEntities.d @ 609:0c10255d8009

Wrote custom look-up tables for HTML entities.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sun, 06 Jan 2008 21:06:20 +0100
parents f203c5248d0b
children 3b34f6a95a27
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
272
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
1 /++
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
2 Author: Aziz Köksal
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
3 License: GPL3
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
4 +/
326
4a7359b88c11 - Added package 'dil' to module declarations.
aziz
parents: 325
diff changeset
5 module dil.HtmlEntities;
272
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
6
609
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
7 import common;
272
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
8
609
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
9 struct Entity
272
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
10 {
609
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
11 char[] name;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
12 uint value;
272
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
13 }
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
14
609
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
15 static const Entity[] namedEntities = [
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
16 {"Aacute", '\u00C1'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
17 {"aacute", '\u00E1'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
18 {"Acirc", '\u00C2'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
19 {"acirc", '\u00E2'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
20 {"acute", '\u00B4'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
21 {"AElig", '\u00C6'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
22 {"aelig", '\u00E6'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
23 {"Agrave", '\u00C0'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
24 {"agrave", '\u00E0'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
25 {"alefsym", '\u2135'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
26 {"Alpha", '\u0391'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
27 {"alpha", '\u03B1'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
28 {"amp", '\u0026'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
29 {"and", '\u2227'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
30 {"ang", '\u2220'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
31 {"Aring", '\u00C5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
32 {"aring", '\u00E5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
33 {"asymp", '\u2248'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
34 {"Atilde", '\u00C3'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
35 {"atilde", '\u00E3'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
36 {"Auml", '\u00C4'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
37 {"auml", '\u00E4'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
38 {"bdquo", '\u201E'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
39 {"Beta", '\u0392'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
40 {"beta", '\u03B2'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
41 {"brvbar", '\u00A6'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
42 {"bull", '\u2022'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
43 {"cap", '\u2229'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
44 {"Ccedil", '\u00C7'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
45 {"ccedil", '\u00E7'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
46 {"cedil", '\u00B8'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
47 {"cent", '\u00A2'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
48 {"Chi", '\u03A7'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
49 {"chi", '\u03C7'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
50 {"circ", '\u02C6'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
51 {"clubs", '\u2663'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
52 {"cong", '\u2245'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
53 {"copy", '\u00A9'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
54 {"crarr", '\u21B5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
55 {"cup", '\u222A'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
56 {"curren", '\u00A4'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
57 {"Dagger", '\u2021'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
58 {"dagger", '\u2020'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
59 {"dArr", '\u21D3'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
60 {"darr", '\u2193'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
61 {"deg", '\u00B0'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
62 {"Delta", '\u0394'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
63 {"delta", '\u03B4'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
64 {"diams", '\u2666'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
65 {"divide", '\u00F7'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
66 {"Eacute", '\u00C9'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
67 {"eacute", '\u00E9'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
68 {"Ecirc", '\u00CA'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
69 {"ecirc", '\u00EA'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
70 {"Egrave", '\u00C8'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
71 {"egrave", '\u00E8'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
72 {"empty", '\u2205'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
73 {"emsp", '\u2003'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
74 {"ensp", '\u2002'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
75 {"Epsilon", '\u0395'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
76 {"epsilon", '\u03B5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
77 {"equiv", '\u2261'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
78 {"Eta", '\u0397'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
79 {"eta", '\u03B7'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
80 {"ETH", '\u00D0'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
81 {"eth", '\u00F0'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
82 {"Euml", '\u00CB'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
83 {"euml", '\u00EB'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
84 {"euro", '\u20AC'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
85 {"exist", '\u2203'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
86 {"fnof", '\u0192'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
87 {"forall", '\u2200'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
88 {"frac12", '\u00BD'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
89 {"frac14", '\u00BC'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
90 {"frac34", '\u00BE'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
91 {"frasl", '\u2044'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
92 {"Gamma", '\u0393'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
93 {"gamma", '\u03B3'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
94 {"ge", '\u2265'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
95 {"gt", '\u003E'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
96 {"hArr", '\u21D4'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
97 {"harr", '\u2194'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
98 {"hearts", '\u2665'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
99 {"hellip", '\u2026'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
100 {"Iacute", '\u00CD'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
101 {"iacute", '\u00ED'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
102 {"Icirc", '\u00CE'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
103 {"icirc", '\u00EE'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
104 {"iexcl", '\u00A1'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
105 {"Igrave", '\u00CC'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
106 {"igrave", '\u00EC'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
107 {"image", '\u2111'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
108 {"infin", '\u221E'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
109 {"int", '\u222B'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
110 {"Iota", '\u0399'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
111 {"iota", '\u03B9'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
112 {"iquest", '\u00BF'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
113 {"isin", '\u2208'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
114 {"Iuml", '\u00CF'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
115 {"iuml", '\u00EF'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
116 {"Kappa", '\u039A'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
117 {"kappa", '\u03BA'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
118 {"Lambda", '\u039B'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
119 {"lambda", '\u03BB'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
120 {"lang", '\u2329'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
121 {"laquo", '\u00AB'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
122 {"lArr", '\u21D0'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
123 {"larr", '\u2190'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
124 {"lceil", '\u2308'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
125 {"ldquo", '\u201C'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
126 {"le", '\u2264'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
127 {"lfloor", '\u230A'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
128 {"lowast", '\u2217'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
129 {"loz", '\u25CA'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
130 {"lrm", '\u200E'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
131 {"lsaquo", '\u2039'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
132 {"lsquo", '\u2018'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
133 {"lt", '\u003C'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
134 {"macr", '\u00AF'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
135 {"mdash", '\u2014'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
136 {"micro", '\u00B5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
137 {"middot", '\u00B7'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
138 {"minus", '\u2212'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
139 {"Mu", '\u039C'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
140 {"mu", '\u03BC'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
141 {"nabla", '\u2207'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
142 {"nbsp", '\u00A0'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
143 {"ndash", '\u2013'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
144 {"ne", '\u2260'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
145 {"ni", '\u220B'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
146 {"not", '\u00AC'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
147 {"notin", '\u2209'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
148 {"nsub", '\u2284'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
149 {"Ntilde", '\u00D1'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
150 {"ntilde", '\u00F1'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
151 {"Nu", '\u039D'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
152 {"nu", '\u03BD'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
153 {"Oacute", '\u00D3'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
154 {"oacute", '\u00F3'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
155 {"Ocirc", '\u00D4'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
156 {"ocirc", '\u00F4'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
157 {"OElig", '\u0152'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
158 {"oelig", '\u0153'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
159 {"Ograve", '\u00D2'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
160 {"ograve", '\u00F2'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
161 {"oline", '\u203E'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
162 {"Omega", '\u03A9'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
163 {"omega", '\u03C9'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
164 {"Omicron", '\u039F'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
165 {"omicron", '\u03BF'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
166 {"oplus", '\u2295'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
167 {"or", '\u2228'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
168 {"ordf", '\u00AA'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
169 {"ordm", '\u00BA'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
170 {"Oslash", '\u00D8'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
171 {"oslash", '\u00F8'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
172 {"Otilde", '\u00D5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
173 {"otilde", '\u00F5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
174 {"otimes", '\u2297'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
175 {"Ouml", '\u00D6'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
176 {"ouml", '\u00F6'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
177 {"para", '\u00B6'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
178 {"part", '\u2202'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
179 {"permil", '\u2030'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
180 {"perp", '\u22A5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
181 {"Phi", '\u03A6'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
182 {"phi", '\u03C6'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
183 {"Pi", '\u03A0'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
184 {"pi", '\u03C0'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
185 {"piv", '\u03D6'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
186 {"plusmn", '\u00B1'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
187 {"pound", '\u00A3'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
188 {"Prime", '\u2033'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
189 {"prime", '\u2032'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
190 {"prod", '\u220F'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
191 {"prop", '\u221D'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
192 {"Psi", '\u03A8'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
193 {"psi", '\u03C8'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
194 {"quot", '\u0022'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
195 {"radic", '\u221A'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
196 {"rang", '\u232A'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
197 {"raquo", '\u00BB'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
198 {"rArr", '\u21D2'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
199 {"rarr", '\u2192'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
200 {"rceil", '\u2309'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
201 {"rdquo", '\u201D'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
202 {"real", '\u211C'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
203 {"reg", '\u00AE'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
204 {"rfloor", '\u230B'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
205 {"Rho", '\u03A1'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
206 {"rho", '\u03C1'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
207 {"rlm", '\u200F'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
208 {"rsaquo", '\u203A'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
209 {"rsquo", '\u2019'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
210 {"sbquo", '\u201A'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
211 {"Scaron", '\u0160'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
212 {"scaron", '\u0161'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
213 {"sdot", '\u22C5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
214 {"sect", '\u00A7'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
215 {"shy", '\u00AD'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
216 {"Sigma", '\u03A3'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
217 {"sigma", '\u03C3'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
218 {"sigmaf", '\u03C2'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
219 {"sim", '\u223C'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
220 {"spades", '\u2660'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
221 {"sub", '\u2282'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
222 {"sube", '\u2286'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
223 {"sum", '\u2211'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
224 {"sup", '\u2283'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
225 {"sup1", '\u00B9'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
226 {"sup2", '\u00B2'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
227 {"sup3", '\u00B3'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
228 {"supe", '\u2287'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
229 {"szlig", '\u00DF'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
230 {"Tau", '\u03A4'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
231 {"tau", '\u03C4'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
232 {"there4", '\u2234'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
233 {"Theta", '\u0398'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
234 {"theta", '\u03B8'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
235 {"thetasym", '\u03D1'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
236 {"thinsp", '\u2009'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
237 {"THORN", '\u00DE'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
238 {"thorn", '\u00FE'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
239 {"tilde", '\u02DC'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
240 {"times", '\u00D7'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
241 {"trade", '\u2122'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
242 {"Uacute", '\u00DA'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
243 {"uacute", '\u00FA'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
244 {"uArr", '\u21D1'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
245 {"uarr", '\u2191'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
246 {"Ucirc", '\u00DB'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
247 {"ucirc", '\u00FB'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
248 {"Ugrave", '\u00D9'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
249 {"ugrave", '\u00F9'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
250 {"uml", '\u00A8'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
251 {"upsih", '\u03D2'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
252 {"Upsilon", '\u03A5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
253 {"upsilon", '\u03C5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
254 {"Uuml", '\u00DC'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
255 {"uuml", '\u00FC'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
256 {"weierp", '\u2118'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
257 {"Xi", '\u039E'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
258 {"xi", '\u03BE'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
259 {"Yacute", '\u00DD'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
260 {"yacute", '\u00FD'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
261 {"yen", '\u00A5'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
262 {"Yuml", '\u0178'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
263 {"yuml", '\u00FF'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
264 {"Zeta", '\u0396'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
265 {"zeta", '\u03B6'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
266 {"zwj", '\u200D'},
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
267 {"zwnj", '\u200C'}
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
268 ];
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
269
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
270 uint stringToHash(char[] str)
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
271 {
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
272 uint hash;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
273 foreach(c; str) {
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
274 hash *= 11;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
275 hash += c;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
276 }
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
277 return hash;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
278 }
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
279
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
280 char[] toString(uint x)
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
281 {
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
282 char[] str;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
283 do
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
284 str = cast(char)('0' + (x % 10)) ~ str;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
285 while (x /= 10)
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
286 return str;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
287 }
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
288
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
289 char[] generateHashAndValueArrays()
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
290 {
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
291 uint[] hashes; // String hashes.
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
292 uint[] values; // Unicode codepoints.
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
293 // Build arrays:
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
294 foreach (entity; namedEntities)
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
295 {
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
296 auto hash = stringToHash(entity.name);
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
297 auto value = entity.value;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
298 assert(hash != 0);
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
299 // Find insertion place.
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
300 uint i;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
301 for (; i < hashes.length; ++i)
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
302 {
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
303 assert(hash != hashes[i], "bad hash function: conflicting hashes");
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
304 if (hash < hashes[i])
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
305 break;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
306 }
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
307 // Insert hash and value into tables.
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
308 if (i == hashes.length)
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
309 {
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
310 hashes ~= hash;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
311 values ~= value;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
312 }
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
313 else
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
314 {
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
315 hashes = hashes[0..i] ~ hash ~ hashes[i..$]; // Insert before index.
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
316 values = values[0..i] ~ value ~ values[i..$]; // Insert before index.
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
317 }
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
318 assert(hashes[i] == hash && values[i] == value);
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
319 }
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
320 // Build source text:
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
321 char[] hashesText = "private static const uint[] hashes = [",
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
322 valuesText = "private static const dchar[] values = [";
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
323 foreach (i, hash; hashes)
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
324 {
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
325 hashesText ~= toString(hash) ~ ",";
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
326 valuesText ~= toString(values[i]) ~ ",";
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
327 }
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
328 hashesText ~= "];";
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
329 valuesText ~= "];";
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
330 return hashesText ~"\n"~ valuesText;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
331 }
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
332
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
333 // Mixin:
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
334 // private static const uint[] hashes;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
335 // private static const dchar[] values;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
336 mixin(generateHashAndValueArrays);
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
337 // pragma(msg, generateHashAndValueArrays());
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
338
272
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
339 /++
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
340 Converts a named HTML entity into its equivalent Unicode codepoint.
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
341 Returns 0xFFFF if entity doesn't exist.
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
342 +/
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
343 dchar entity2Unicode(char[] entity)
0bde32503976 - Added module HtmlEntities. It contains a table for converting HTML entities to Unicode characters.
aziz
parents:
diff changeset
344 {
609
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
345 auto hash = stringToHash(entity);
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
346 // Binary search:
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
347 size_t lower = void, index = void, upper = void;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
348 lower = 0;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
349 upper = hashes.length -1;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
350 while (lower <= upper)
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
351 {
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
352 index = (lower + upper) / 2;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
353 if (hash < hashes[index])
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
354 upper = index - 1;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
355 else if (hash > hashes[index])
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
356 lower = index + 1;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
357 else
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
358 return values[index]; // Return the Unicode codepoint.
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
359 }
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
360 return 0xFFFF; // Return error value.
520
f203c5248d0b Added 'compile' command.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 326
diff changeset
361 }
609
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
362
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
363 unittest
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
364 {
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
365 Stdout("Testing entity2Unicode().").newline;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
366 alias entity2Unicode f;
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
367 foreach (entity; namedEntities)
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
368 assert(f(entity.name) == entity.value,
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
369 Format("'&{};' == \\u{:X4}, not \\u{:X4}", entity.name, entity.value, cast(uint)f(entity.name))
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
370 );
0c10255d8009 Wrote custom look-up tables for HTML entities.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 520
diff changeset
371 }