annotate src/dil/HtmlEntities.d @ 839:4063da6f3edd default tip

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