htmlentity.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2015 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 
16 #include "htmlentity.h"
17 #include "message.h"
18 #include "ftextstream.h"
19 
20 //! Number of doxygen commands mapped as if it were HTML entities
21 static const int g_numberHtmlMappedCmds = 11;
22 
23 //! @brief Structure defining all HTML4 entities, doxygen extensions and doxygen commands representing special symbols.
24 //! @details In case an entity does not exist a NULL is given for the entity. The first column contains the symbolic code
25 //! for the entity, see also doxparser.h The second column contains the name of the enitity (without the starting \& and
26 //! ending ;)
27 static struct htmlEntityInfo
28 {
30  const char *item;
31  const char *UTF8;
32  const char *html;
33  const char *xml;
34  const char *docbook;
35  const char *latex;
36  const char *man;
37  const char *rtf;
39 } g_htmlEntities[] =
40 {
41 #undef SYM
42 // helper macro to force consistent entries for the symbol and item columns
43 #define SYM(s) DocSymbol::Sym_##s,"&"#s";"
44  // HTML4 entities
45  // symb+item UTF-8 html xml docbook latex man rtf perl
46  { SYM(nbsp), "\xc2\xa0", "&#160;", "<nonbreakablespace/>", "&#160;", "~", " ", "\\~", { " ", DocSymbol::Perl_char }},
47  { SYM(iexcl), "\xc2\xa1", "&iexcl;", "<iexcl/>", "&#161;", "!`", NULL, "\\'A1", { NULL, DocSymbol::Perl_unknown }},
48  { SYM(cent), "\xc2\xa2", "&cent;", "<cent/>", "&#162;", "\\textcent{}", NULL, "\\'A2", { NULL, DocSymbol::Perl_unknown }},
49  { SYM(pound), "\xc2\xa3", "&pound;", "<pound/>", "&#163;", "{$\\pounds$}", NULL, "\\'A3", { NULL, DocSymbol::Perl_unknown }},
50  { SYM(curren), "\xc2\xa4", "&curren;", "<curren/>", "&#164;", "\\textcurrency{}", NULL, "\\'A4", { NULL, DocSymbol::Perl_unknown }},
51  { SYM(yen), "\xc2\xa5", "&yen;", "<yen/>", "&#165;", "{$\\yen$}", NULL, "\\'A5", { NULL, DocSymbol::Perl_unknown }},
52  { SYM(brvbar), "\xc2\xa6", "&brvbar;", "<brvbar/>", "&#166;", "\\textbrokenbar{}", NULL, "\\'A6", { NULL, DocSymbol::Perl_unknown }},
53  { SYM(sect), "\xc2\xa7", "&sect;", "<sect/>", "<simplesect/>", "{$\\S$}", NULL, "\\'A7", { "sect", DocSymbol::Perl_symbol }},
54  { SYM(uml), "\xc2\xa8", "&uml;", "<umlaut/>", "&#168;", "\\textasciidieresis{}", " \\*(4", "\\'A8", { " ", DocSymbol::Perl_umlaut }},
55  { SYM(copy), "\xc2\xa9", "&copy;", "<copy/>", "&#169;", "\\copyright{}", "(C)", "\\'A9", { "copyright", DocSymbol::Perl_symbol }},
56  { SYM(ordf), "\xc2\xaa", "&ordf;", "<ordf/>", "&#170;", "\\textordfeminine{}", NULL, "\\'AA", { NULL, DocSymbol::Perl_unknown }},
57  { SYM(laquo), "\xc2\xab", "&laquo;", "<laquo/>", "&#171;", "\\guillemotleft{}", NULL, "\\'AB", { NULL, DocSymbol::Perl_unknown }},
58  { SYM(not), "\xc2\xac", "&not;", "<not/>", "&#172;", "\\textlnot", NULL, "\\'AC", { NULL, DocSymbol::Perl_unknown }},
59  { SYM(shy), "\xc2\xad", "&shy;", "<shy/>", "&#173;", "{$\\-$}", NULL, "\\-", { NULL, DocSymbol::Perl_unknown }},
60  { SYM(reg), "\xc2\xae", "&reg;", "<registered/>", "&#174;", "\\textregistered{}", "(R)", "\\'AE", { "registered", DocSymbol::Perl_symbol }},
61  { SYM(macr), "\xc2\xaf", "&macr;", "<macr/>", "&#175;", "\\={}", NULL, "\\'AF", { NULL, DocSymbol::Perl_unknown }},
62  { SYM(deg), "\xc2\xb0", "&deg;", "<deg/>", "&#176;", "\\textdegree{}", NULL, "\\'B0", { "deg", DocSymbol::Perl_symbol }},
63  { SYM(plusmn), "\xc2\xb1", "&plusmn;", "<plusmn/>", "&#177;", "{$\\pm$}", NULL, "\\'B1", { "+/-", DocSymbol::Perl_string }},
64  { SYM(sup2), "\xc2\xb2", "&sup2;", "<sup2/>", "&#178;", "\\texttwosuperior{}", NULL, "\\'B2", { NULL, DocSymbol::Perl_unknown }},
65  { SYM(sup3), "\xc2\xb3", "&sup3;", "<sup3/>", "&#179;", "\\textthreesuperior{}", NULL, "\\'B3", { NULL, DocSymbol::Perl_unknown }},
66  { SYM(acute), "\xc2\xb4", "&acute;", "<acute/>", "&#180;", "\\'{}", NULL, "\\'B4", { " ", DocSymbol::Perl_acute }},
67  { SYM(micro), "\xc2\xb5", "&micro;", "<micro/>", "&#181;", "{$\\mu$}", NULL, "\\'B5", { NULL, DocSymbol::Perl_unknown }},
68  { SYM(para), "\xc2\xb6", "&para;", "<para/>", "&#182;", "{$\\P$}", NULL, "\\'B6", { NULL, DocSymbol::Perl_unknown }},
69  { SYM(middot), "\xc2\xb7", "&middot;", "<middot/>", "&#183;", "\\textperiodcentered{}", NULL, "\\'B7", { NULL, DocSymbol::Perl_unknown }},
70  { SYM(cedil), "\xc2\xb8", "&cedil;", "<cedil/>", "&#184;", "\\c{}", " \\*,", "\\'B8", { " ", DocSymbol::Perl_cedilla }},
71  { SYM(sup1), "\xc2\xb9", "&sup1;", "<sup1/>", "&#185;", "\\textonesuperior{}", NULL, "\\'B9", { NULL, DocSymbol::Perl_unknown }},
72  { SYM(ordm), "\xc2\xba", "&ordm;", "<ordm/>", "&#186;", "\\textordmasculine{}", NULL, "\\'BA", { NULL, DocSymbol::Perl_unknown }},
73  { SYM(raquo), "\xc2\xbb", "&raquo;", "<raquo/>", "&#187;", "\\guillemotright{}", NULL, "\\'BB", { NULL, DocSymbol::Perl_unknown }},
74  { SYM(frac14), "\xc2\xbc", "&frac14;", "<frac14/>", "&#188;", "{$\\frac14$}", "1/4", "\\'BC", { NULL, DocSymbol::Perl_unknown }},
75  { SYM(frac12), "\xc2\xbd", "&frac12;", "<frac12/>", "&#189;", "{$\\frac12$}", "1/2", "\\'BD", { NULL, DocSymbol::Perl_unknown }},
76  { SYM(frac34), "\xc2\xbe", "&frac34;", "<frac34/>", "&#190;", "{$\\frac34$}", "3/4", "\\'BE", { NULL, DocSymbol::Perl_unknown }},
77  { SYM(iquest), "\xc2\xbf", "&iquest;", "<iquest/>", "&#191;", "?`", NULL, "\\'BF", { NULL, DocSymbol::Perl_unknown }},
78  { SYM(Agrave), "\xc3\x80", "&Agrave;", "<Agrave/>", "&#192;", "\\`{A}", "A\\*:", "\\'C0", { "A", DocSymbol::Perl_grave }},
79  { SYM(Aacute), "\xc3\x81", "&Aacute;", "<Aacute/>", "&#193;", "\\'{A}", "A\\*(`", "\\'C1", { "A", DocSymbol::Perl_acute }},
80  { SYM(Acirc), "\xc3\x82", "&Acirc;", "<Acirc/>", "&#194;", "\\^{A}", "A\\*^", "\\'C2", { "A", DocSymbol::Perl_circ }},
81  { SYM(Atilde), "\xc3\x83", "&Atilde;", "<Atilde/>", "&#195;", "\\~{A}", "A\\*~", "\\'C3", { "A", DocSymbol::Perl_tilde }},
82  { SYM(Auml), "\xc3\x84", "&Auml;", "<Aumlaut/>", "&#196;", "\\\"{A}", "A\\*(4", "\\'C4", { "A", DocSymbol::Perl_umlaut }},
83  { SYM(Aring), "\xc3\x85", "&Aring;", "<Aring/>", "&#197;", "\\AA", "A\\*o", "\\'C5", { "A", DocSymbol::Perl_ring }},
84  { SYM(AElig), "\xc3\x86", "&AElig;", "<AElig/>", "&#198;", "{\\AE}", NULL, "\\'C6", { "AElig", DocSymbol::Perl_symbol }},
85  { SYM(Ccedil), "\xc3\x87", "&Ccedil;", "<Ccedil/>", "&#199;", "\\c{C}", "C\\*,", "\\'C7", { "C", DocSymbol::Perl_cedilla }},
86  { SYM(Egrave), "\xc3\x88", "&Egrave;", "<Egrave/>", "&#200;", "\\`{E}", "E\\*:", "\\'C8", { "E", DocSymbol::Perl_grave }},
87  { SYM(Eacute), "\xc3\x89", "&Eacute;", "<Eacute/>", "&#201;", "\\'{E}", "E\\*(`", "\\'C9", { "E", DocSymbol::Perl_acute }},
88  { SYM(Ecirc), "\xc3\x8a", "&Ecirc;", "<Ecirc/>", "&#202;", "\\^{E}", "E\\*^", "\\'CA", { "E", DocSymbol::Perl_circ }},
89  { SYM(Euml), "\xc3\x8b", "&Euml;", "<Eumlaut/>", "&#203;", "\\\"{E}", "E\\*(4", "\\'CB", { "E", DocSymbol::Perl_umlaut }},
90  { SYM(Igrave), "\xc3\x8c", "&Igrave;", "<Igrave/>", "&#204;", "\\`{I}", "I\\*:", "\\'CC", { "I", DocSymbol::Perl_grave }},
91  { SYM(Iacute), "\xc3\x8d", "&Iacute;", "<Iacute/>", "&#205;", "\\'{I}", "I\\*(`", "\\'CD", { "I", DocSymbol::Perl_acute }},
92  { SYM(Icirc), "\xc3\x8e", "&Icirc;", "<Icirc/>", "&#206;", "\\^{I}", "I\\*^", "\\'CE", { "I", DocSymbol::Perl_circ }},
93  { SYM(Iuml), "\xc3\x8f", "&Iuml;", "<Iumlaut/>", "&#207;", "\\\"{I}", "I\\*(4", "\\'CF", { "I", DocSymbol::Perl_umlaut }},
94  { SYM(ETH), "\xc3\x90", "&ETH;", "<ETH/>", "&#208;", "\\DH", NULL, "\\'D0", { NULL, DocSymbol::Perl_unknown }},
95  { SYM(Ntilde), "\xc3\x91", "&Ntilde;", "<Ntilde/>", "&#209;", "\\~{N}", "N\\*~", "\\'D1", { "N", DocSymbol::Perl_tilde }},
96  { SYM(Ograve), "\xc3\x92", "&Ograve;", "<Ograve/>", "&#210;", "\\`{O}", "O\\*:", "\\'D2", { "O", DocSymbol::Perl_grave }},
97  { SYM(Oacute), "\xc3\x93", "&Oacute;", "<Oacute/>", "&#211;", "\\'{O}", "O\\*(`", "\\'D3", { "O", DocSymbol::Perl_acute }},
98  { SYM(Ocirc), "\xc3\x94", "&Ocirc;", "<Ocirc/>", "&#212;", "\\^{O}", "O\\*^", "\\'D4", { "O", DocSymbol::Perl_circ }},
99  { SYM(Otilde), "\xc3\x95", "&Otilde;", "<Otilde/>", "&#213;", "\\~{O}", "O\\*~", "\\'D5", { "O", DocSymbol::Perl_tilde }},
100  { SYM(Ouml), "\xc3\x96", "&Ouml;", "<Oumlaut/>", "&#214;", "\\\"{O}", "O\\*(4", "\\'D6", { "O", DocSymbol::Perl_umlaut }},
101  { SYM(times), "\xc3\x97", "&times;", "<times/>", "&#215;", "{$\\times$}", NULL, "\\'D7", { "*", DocSymbol::Perl_char }},
102  { SYM(Oslash), "\xc3\x98", "&Oslash;", "<Oslash/>", "&#216;", "{\\O}", "O\x08/", "\\'D8", { "O", DocSymbol::Perl_slash }},
103  { SYM(Ugrave), "\xc3\x99", "&Ugrave;", "<Ugrave/>", "&#217;", "\\`{U}", "U\\*:", "\\'D9", { "U", DocSymbol::Perl_grave }},
104  { SYM(Uacute), "\xc3\x9a", "&Uacute;", "<Uacute/>", "&#218;", "\\'{U}", "U\\*(`", "\\'DA", { "U", DocSymbol::Perl_acute }},
105  { SYM(Ucirc), "\xc3\x9b", "&Ucirc;", "<Ucirc/>", "&#219;", "\\^{U}", "U\\*^", "\\'DB", { "U", DocSymbol::Perl_circ }},
106  { SYM(Uuml), "\xc3\x9c", "&Uuml;", "<Uumlaut/>", "&#220;", "\\\"{U}", "U\\*(4", "\\'DC", { "U", DocSymbol::Perl_umlaut }},
107  { SYM(Yacute), "\xc3\x9d", "&Yacute;", "<Yacute/>", "&#221;", "\\'{Y}", "Y\\*(`", "\\'DD", { "Y", DocSymbol::Perl_acute }},
108  { SYM(THORN), "\xc3\x9e", "&THORN;", "<THORN/>", "&#222;", "\\TH", NULL, "\\'DE", { NULL, DocSymbol::Perl_unknown }},
109  { SYM(szlig), "\xc3\x9f", "&szlig;", "<szlig/>", "&#223;", "{\\ss}", "s\\*:", "\\'DF", { "szlig", DocSymbol::Perl_symbol }},
110  { SYM(agrave), "\xc3\xa0", "&agrave;", "<agrave/>", "&#224;", "\\`{a}", "a\\*:", "\\'E0", { "a", DocSymbol::Perl_grave }},
111  { SYM(aacute), "\xc3\xa1", "&aacute;", "<aacute/>", "&#225;", "\\'{a}", "a\\*(`", "\\'E1", { "a", DocSymbol::Perl_acute }},
112  { SYM(acirc), "\xc3\xa2", "&acirc;", "<acirc/>", "&#226;", "\\^{a}", "a\\*^", "\\'E2", { "a", DocSymbol::Perl_circ }},
113  { SYM(atilde), "\xc3\xa3", "&atilde;", "<atilde/>", "&#227;", "\\~{a}", "a\\*~", "\\'E3", { "a", DocSymbol::Perl_tilde }},
114  { SYM(auml), "\xc3\xa4", "&auml;", "<aumlaut/>", "&#228;", "\\\"{a}", "a\\*(4", "\\'E4", { "a", DocSymbol::Perl_umlaut }},
115  { SYM(aring), "\xc3\xa5", "&aring;", "<aring/>", "&#229;", "\\aa", "a\\*o", "\\'E5", { "a", DocSymbol::Perl_ring }},
116  { SYM(aelig), "\xc3\xa6", "&aelig;", "<aelig/>", "&#230;", "{\\ae}", NULL, "\\'E6", { "aelig", DocSymbol::Perl_symbol }},
117  { SYM(ccedil), "\xc3\xa7", "&ccedil;", "<ccedil/>", "&#231;", "\\c{c}", "c\\*,", "\\'E7", { "c", DocSymbol::Perl_cedilla }},
118  { SYM(egrave), "\xc3\xa8", "&egrave;", "<egrave/>", "&#232;", "\\`{e}", "e\\*:", "\\'E8", { "e", DocSymbol::Perl_grave }},
119  { SYM(eacute), "\xc3\xa9", "&eacute;", "<eacute/>", "&#233;", "\\'{e}", "e\\*(`", "\\'E9", { "e", DocSymbol::Perl_acute }},
120  { SYM(ecirc), "\xc3\xaa", "&ecirc;", "<ecirc/>", "&#234;", "\\^{e}", "e\\*^", "\\'EA", { "e", DocSymbol::Perl_circ }},
121  { SYM(euml), "\xc3\xab", "&euml;", "<eumlaut/>", "&#235;", "\\\"{e}", "e\\*(4", "\\'EB", { "e", DocSymbol::Perl_umlaut }},
122  { SYM(igrave), "\xc3\xac", "&igrave;", "<igrave/>", "&#236;", "\\`{\\i}", "i\\*:", "\\'EC", { "i", DocSymbol::Perl_grave }},
123  { SYM(iacute), "\xc3\xad", "&iacute;", "<iacute/>", "&#237;", "\\'{\\i}", "i\\*(`", "\\'ED", { "i", DocSymbol::Perl_acute }},
124  { SYM(icirc), "\xc3\xae", "&icirc;", "<icirc/>", "&#238;", "\\^{\\i}", "i\\*^", "\\'EE", { "i", DocSymbol::Perl_circ }},
125  { SYM(iuml), "\xc3\xaf", "&iuml;", "<iumlaut/>", "&#239;", "\\\"{\\i}", "i\\*(4", "\\'EF", { "i", DocSymbol::Perl_umlaut }},
126  { SYM(eth), "\xc3\xb0", "&eth;", "<eth/>", "&#240;", "\\dh", NULL, "\\'F0", { NULL, DocSymbol::Perl_unknown }},
127  { SYM(ntilde), "\xc3\xb1", "&ntilde;", "<ntilde/>", "&#241;", "\\~{n}", "n\\*~", "\\'F1", { "n", DocSymbol::Perl_tilde }},
128  { SYM(ograve), "\xc3\xb2", "&ograve;", "<ograve/>", "&#242;", "\\`{o}", "o\\*:", "\\'F2", { "o", DocSymbol::Perl_grave }},
129  { SYM(oacute), "\xc3\xb3", "&oacute;", "<oacute/>", "&#243;", "\\'{o}", "o\\*(`", "\\'F3", { "o", DocSymbol::Perl_acute }},
130  { SYM(ocirc), "\xc3\xb4", "&ocirc;", "<ocirc/>", "&#244;", "\\^{o}", "o\\*^", "\\'F4", { "o", DocSymbol::Perl_circ }},
131  { SYM(otilde), "\xc3\xb5", "&otilde;", "<otilde/>", "&#245;", "\\~{o}", "o\\*~", "\\'F5", { "o", DocSymbol::Perl_tilde }},
132  { SYM(ouml), "\xc3\xb6", "&ouml;", "<oumlaut/>", "&#246;", "\\\"{o}", "o\\*(4", "\\'F6", { "o", DocSymbol::Perl_umlaut }},
133  { SYM(divide), "\xc3\xb7", "&divide;", "<divide/>", "&#247;", "{$\\div$}", NULL, "\\'F7", { NULL, DocSymbol::Perl_unknown }},
134  { SYM(oslash), "\xc3\xb8", "&oslash;", "<oslash/>", "&#248;", "{\\o}", "o\x08/", "\\'F8", { "o", DocSymbol::Perl_slash }},
135  { SYM(ugrave), "\xc3\xb9", "&ugrave;", "<ugrave/>", "&#249;", "\\`{u}", "u\\*:", "\\'F9", { "u", DocSymbol::Perl_grave }},
136  { SYM(uacute), "\xc3\xba", "&uacute;", "<uacute/>", "&#250;", "\\'{u}", "u\\*(`", "\\'FA", { "u", DocSymbol::Perl_acute }},
137  { SYM(ucirc), "\xc3\xbb", "&ucirc;", "<ucirc/>", "&#251;", "\\^{u}", "u\\*^", "\\'FB", { "u", DocSymbol::Perl_circ }},
138  { SYM(uuml), "\xc3\xbc", "&uuml;", "<uumlaut/>", "&#252;", "\\\"{u}", "u\\*(4", "\\'FC", { "u", DocSymbol::Perl_umlaut }},
139  { SYM(yacute), "\xc3\xbd", "&yacute;", "<yacute/>", "&#253;", "\\'{y}", "y\\*(`", "\\'FD", { "y", DocSymbol::Perl_acute }},
140  { SYM(thorn), "\xc3\xbe", "&thorn;", "<thorn/>", "&#254;", "\\th", NULL, "\\'FE", { NULL, DocSymbol::Perl_unknown }},
141  { SYM(yuml), "\xc3\xbf", "&yuml;", "<yumlaut/>", "&#255;", "\\\"{y}", "y\\*(4", "\\'FF", { "y", DocSymbol::Perl_umlaut }},
142  { SYM(fnof), "\xc6\x92", "&fnof;", "<fnof/>", "&#402;", "\\textflorin", NULL, "\\'83", { NULL, DocSymbol::Perl_unknown }},
143  { SYM(Alpha), "\xce\x91", "&Alpha;", "<Alpha/>", "&#913;", "A", NULL, "\\u0913?", { "A", DocSymbol::Perl_char }},
144  { SYM(Beta), "\xce\x92", "&Beta;", "<Beta/>", "&#914;", "B", NULL, "\\u0914?", { "B", DocSymbol::Perl_char }},
145  { SYM(Gamma), "\xce\x93", "&Gamma;", "<Gamma/>", "&#915;", "{$\\Gamma$}", NULL, "\\u0915?", { "Gamma", DocSymbol::Perl_symbol }},
146  { SYM(Delta), "\xce\x94", "&Delta;", "<Delta/>", "&#916;", "{$\\Delta$}", NULL, "\\u0916?", { "Delta", DocSymbol::Perl_symbol }},
147  { SYM(Epsilon), "\xce\x95", "&Epsilon;", "<Epsilon/>", "&#917;", "E", NULL, "\\u0917?", { "E", DocSymbol::Perl_char }},
148  { SYM(Zeta), "\xce\x96", "&Zeta;", "<Zeta/>", "&#918;", "Z", NULL, "\\u0918?", { "Z", DocSymbol::Perl_char }},
149  { SYM(Eta), "\xce\x97", "&Eta;", "<Eta/>", "&#919;", "H", NULL, "\\u0919?", { "H", DocSymbol::Perl_char }},
150  { SYM(Theta), "\xce\x98", "&Theta;", "<Theta/>", "&#920;", "{$\\Theta$}", NULL, "\\u0920?", { "Theta", DocSymbol::Perl_symbol }},
151  { SYM(Iota), "\xce\x99", "&Iota;", "<Iota/>", "&#921;", "I", NULL, "\\u0921?", { "I", DocSymbol::Perl_char }},
152  { SYM(Kappa), "\xce\x9a", "&Kappa;", "<Kappa/>", "&#922;", "K", NULL, "\\u0922?", { "K", DocSymbol::Perl_char }},
153  { SYM(Lambda), "\xce\x9b", "&Lambda;", "<Lambda/>", "&#923;", "{$\\Lambda$}", NULL, "\\u0923?", { "Lambda", DocSymbol::Perl_symbol }},
154  { SYM(Mu), "\xce\x9c", "&Mu;", "<Mu/>", "&#924;", "M", NULL, "\\u0924?", { "M", DocSymbol::Perl_char }},
155  { SYM(Nu), "\xce\x9d", "&Nu;", "<Nu/>", "&#925;", "N", NULL, "\\u0925?", { "N", DocSymbol::Perl_char }},
156  { SYM(Xi), "\xce\x9e", "&Xi;", "<Xi/>", "&#926;", "{$\\Xi$}", NULL, "\\u0926?", { "Xi", DocSymbol::Perl_symbol }},
157  { SYM(Omicron), "\xce\x9f", "&Omicron;", "<Omicron/>", "&#927;", "O", NULL, "\\u0927?", { "O", DocSymbol::Perl_char }},
158  { SYM(Pi), "\xce\xa0", "&Pi;", "<Pi/>", "&#928;", "{$\\Pi$}", NULL, "\\u0928?", { "Pi", DocSymbol::Perl_symbol }},
159  { SYM(Rho), "\xce\xa1", "&Rho;", "<Rho/>", "&#929;", "P", NULL, "\\u0929?", { "P", DocSymbol::Perl_char }},
160  { SYM(Sigma), "\xce\xa3", "&Sigma;", "<Sigma/>", "&#931;", "{$\\Sigma$}", NULL, "\\u0931?", { "Sigma", DocSymbol::Perl_symbol }},
161  { SYM(Tau), "\xce\xa4", "&Tau;", "<Tau/>", "&#932;", "T", NULL, "\\u0932?", { "T", DocSymbol::Perl_char }},
162  { SYM(Upsilon), "\xce\xa5", "&Upsilon;", "<Upsilon/>", "&#933;", "{$\\Upsilon$}", NULL, "\\u0933?", { "Upsilon", DocSymbol::Perl_symbol }},
163  { SYM(Phi), "\xce\xa6", "&Phi;", "<Phi/>", "&#934;", "{$\\Phi$}", NULL, "\\u0934?", { "Phi", DocSymbol::Perl_symbol }},
164  { SYM(Chi), "\xce\xa7", "&Chi;", "<Chi/>", "&#935;", "X", NULL, "\\u0935?", { "X", DocSymbol::Perl_char }},
165  { SYM(Psi), "\xce\xa8", "&Psi;", "<Psi/>", "&#936;", "{$\\Psi$}", NULL, "\\u0936?", { "Psi", DocSymbol::Perl_symbol }},
166  { SYM(Omega), "\xce\xa9", "&Omega;", "<Omega/>", "&#937;", "{$\\Omega$}", NULL, "\\u0937?", { "Omega", DocSymbol::Perl_symbol }},
167  { SYM(alpha), "\xce\xb1", "&alpha;", "<alpha/>", "&#945;", "{$\\alpha$}", NULL, "\\u0945?", { "alpha", DocSymbol::Perl_symbol }},
168  { SYM(beta), "\xce\xb2", "&beta;", "<beta/>", "&#946;", "{$\\beta$}", NULL, "\\u0946?", { "beta", DocSymbol::Perl_symbol }},
169  { SYM(gamma), "\xce\xb3", "&gamma;", "<gamma/>", "&#947;", "{$\\gamma$}", NULL, "\\u0947?", { "gamma", DocSymbol::Perl_symbol }},
170  { SYM(delta), "\xce\xb4", "&delta;", "<delta/>", "&#948;", "{$\\delta$}", NULL, "\\u0948?", { "delta", DocSymbol::Perl_symbol }},
171  { SYM(epsilon), "\xce\xb5", "&epsilon;", "<epsilon/>", "&#949;", "{$\\varepsilon$}", NULL, "\\u0949?", { "epsilon", DocSymbol::Perl_symbol }},
172  { SYM(zeta), "\xce\xb6", "&zeta;", "<zeta/>", "&#950;", "{$\\zeta$}", NULL, "\\u0950?", { "zeta", DocSymbol::Perl_symbol }},
173  { SYM(eta), "\xce\xb7", "&eta;", "<eta/>", "&#951;", "{$\\eta$}", NULL, "\\u0951?", { "eta", DocSymbol::Perl_symbol }},
174  { SYM(theta), "\xce\xb8", "&theta;", "<theta/>", "&#952;", "{$\\theta$}", NULL, "\\u0952?", { "theta", DocSymbol::Perl_symbol }},
175  { SYM(iota), "\xce\xb9", "&iota;", "<iota/>", "&#953;", "{$\\iota$}", NULL, "\\u0953?", { "iota", DocSymbol::Perl_symbol }},
176  { SYM(kappa), "\xce\xba", "&kappa;", "<kappa/>", "&#954;", "{$\\kappa$}", NULL, "\\u0954?", { "kappa", DocSymbol::Perl_symbol }},
177  { SYM(lambda), "\xce\xbb", "&lambda;", "<lambda/>", "&#955;", "{$\\lambda$}", NULL, "\\u0955?", { "lambda", DocSymbol::Perl_symbol }},
178  { SYM(mu), "\xce\xbc", "&mu;", "<mu/>", "&#956;", "{$\\mu$}", NULL, "\\u0956?", { "mu", DocSymbol::Perl_symbol }},
179  { SYM(nu), "\xce\xbd", "&nu;", "<nu/>", "&#957;", "{$\\nu$}", NULL, "\\u0957?", { "nu", DocSymbol::Perl_symbol }},
180  { SYM(xi), "\xce\xbe", "&xi;", "<xi/>", "&#958;", "{$\\xi$}", NULL, "\\u0958?", { "xi", DocSymbol::Perl_symbol }},
181  { SYM(omicron), "\xce\xbf", "&omicron;", "<omicron/>", "&#959;", "{$\\omicron$}", NULL, "\\u0959?", { NULL, DocSymbol::Perl_unknown }},
182  { SYM(pi), "\xcf\x80", "&pi;", "<pi/>", "&#960;", "{$\\pi$}", NULL, "\\u0960?", { "pi", DocSymbol::Perl_symbol }},
183  { SYM(rho), "\xcf\x81", "&rho;", "<rho/>", "&#961;", "{$\\rho$}", NULL, "\\u0961?", { "rho", DocSymbol::Perl_symbol }},
184  { SYM(sigmaf), "\xcf\x82", "&sigmaf;", "<sigmaf/>", "&#962;", "{$\\varsigma$}", NULL, "\\u0962?", { "sigma", DocSymbol::Perl_symbol }},
185  { SYM(sigma), "\xcf\x83", "&sigma;", "<sigma/>", "&#963;", "{$\\sigma$}", NULL, "\\u0963?", { "sigma", DocSymbol::Perl_symbol }},
186  { SYM(tau), "\xcf\x84", "&tau;", "<tau/>", "&#964;", "{$\\tau$}", NULL, "\\u0964?", { "tau", DocSymbol::Perl_symbol }},
187  { SYM(upsilon), "\xcf\x85", "&upsilon;", "<upsilon/>", "&#965;", "{$\\upsilon$}", NULL, "\\u0965?", { "upsilon", DocSymbol::Perl_symbol }},
188  { SYM(phi), "\xcf\x86", "&phi;", "<phi/>", "&#966;", "{$\\varphi$}", NULL, "\\u0966?", { "phi", DocSymbol::Perl_symbol }},
189  { SYM(chi), "\xcf\x87", "&chi;", "<chi/>", "&#967;", "{$\\chi$}", NULL, "\\u0967?", { "chi", DocSymbol::Perl_symbol }},
190  { SYM(psi), "\xcf\x88", "&psi;", "<psi/>", "&#968;", "{$\\psi$}", NULL, "\\u0968?", { "psi", DocSymbol::Perl_symbol }},
191  { SYM(omega), "\xcf\x89", "&omega;", "<omega/>", "&#969;", "{$\\omega$}", NULL, "\\u0969?", { "omega", DocSymbol::Perl_symbol }},
192  { SYM(thetasym), "\xcf\x91", "&thetasym;", "<thetasym/>", "&#977;", "{$\\vartheta$}", NULL, "\\u977?", { NULL, DocSymbol::Perl_unknown }},
193  { SYM(upsih), "\xcf\x92", "&upsih;", "<upsih/>", "&#978;", "{$\\Upsilon$}", NULL, "\\u978?", { NULL, DocSymbol::Perl_unknown }},
194  { SYM(piv), "\xcf\x96", "&piv;", "<piv/>", "&#982;", "{$\\varpi$}", NULL, "\\u982?", { NULL, DocSymbol::Perl_unknown }},
195  { SYM(bull), "\xe2\x80\xa2", "&bull;", "<bull/>", "&#8226;", "\\textbullet{}", NULL, "\\'95", { NULL, DocSymbol::Perl_unknown }},
196  { SYM(hellip), "\xe2\x80\xa6", "&hellip;", "<hellip/>", "&#8230;", "{$\\dots$}", NULL, "\\'85", { NULL, DocSymbol::Perl_unknown }},
197  { SYM(prime), "\xe2\x80\xb2", "&prime;", "<prime/>", "&#8242;", "'", NULL, "\\u8242?", { "\\\'", DocSymbol::Perl_string }},
198  { SYM(Prime), "\xe2\x80\xb3", "&Prime;", "<Prime/>", "&#8243;", "''", NULL, "\\u8243?", { "\"", DocSymbol::Perl_char }},
199  { SYM(oline), "\xe2\x80\xbe", "&oline;", "<oline/>", "&#8254;", "{$\\overline{\\,}$}", NULL, "\\u8254?", { NULL, DocSymbol::Perl_unknown }},
200  { SYM(frasl), "\xe2\x81\x84", "&frasl;", "<frasl/>", "&#8260;", "/", NULL, "\\u8260?", { NULL, DocSymbol::Perl_unknown }},
201  { SYM(weierp), "\xe2\x84\x98", "&weierp;", "<weierp/>", "&#8472;", "{$\\wp$}", NULL, "\\u8472?", { NULL, DocSymbol::Perl_unknown }},
202  { SYM(image), "\xe2\x84\x91", "&image;", "<image/>", "&#8465;", "{$\\Im$}", NULL, "\\u8465?", { NULL, DocSymbol::Perl_unknown }},
203  { SYM(real), "\xe2\x84\x9c", "&real;", "<real/>", "&#8476;", "{$\\Re$}", NULL, "\\u8476?", { NULL, DocSymbol::Perl_unknown }},
204  { SYM(trade), "\xe2\x84\xa2", "&trade;", "<trademark/>", "&#8482;", "\\texttrademark{}", "(TM)", "\\'99", { "trademark", DocSymbol::Perl_symbol }},
205  { SYM(alefsym), "\xe2\x85\xb5", "&alefsym;", "<alefsym/>", "&#8501;", "{$\\aleph$}", NULL, "\\u8501?", { NULL, DocSymbol::Perl_unknown }},
206  { SYM(larr), "\xe2\x86\x90", "&larr;", "<larr/>", "&#8592;", "{$\\leftarrow$}", NULL, "\\u8592?", { "<-", DocSymbol::Perl_string }},
207  { SYM(uarr), "\xe2\x86\x91", "&uarr;", "<uarr/>", "&#8593;", "{$\\uparrow$}", NULL, "\\u8593?", { NULL, DocSymbol::Perl_unknown }},
208  { SYM(rarr), "\xe2\x86\x92", "&rarr;", "<rarr/>", "&#8594;", "{$\\rightarrow$}", NULL, "\\u8594?", { "->", DocSymbol::Perl_string }},
209  { SYM(darr), "\xe2\x86\x93", "&darr;", "<darr/>", "&#8595;", "{$\\downarrow$}", NULL, "\\u8595?", { NULL, DocSymbol::Perl_unknown }},
210  { SYM(harr), "\xe2\x86\x94", "&harr;", "<harr/>", "&#8596;", "{$\\leftrightarrow$}", NULL, "\\u8596?", { NULL, DocSymbol::Perl_unknown }},
211  { SYM(crarr), "\xe2\x86\xb5", "&crarr;", "<crarr/>", "&#8629;", "{$\\hookleftarrow$}", NULL, "\\u8629?", { NULL, DocSymbol::Perl_unknown }},
212  { SYM(lArr), "\xe2\x87\x90", "&lArr;", "<lArr/>", "&#8656;", "{$\\Leftarrow$}", NULL, "\\u8656?", { NULL, DocSymbol::Perl_unknown }},
213  { SYM(uArr), "\xe2\x87\x91", "&uArr;", "<uArr/>", "&#8657;", "{$\\Uparrow$}", NULL, "\\u8657?", { NULL, DocSymbol::Perl_unknown }},
214  { SYM(rArr), "\xe2\x87\x92", "&rArr;", "<rArr/>", "&#8658;", "{$\\Rightarrow$}", NULL, "\\u8658?", { NULL, DocSymbol::Perl_unknown }},
215  { SYM(dArr), "\xe2\x87\x93", "&dArr;", "<dArr/>", "&#8659;", "{$\\Downarrow$}", NULL, "\\u8659?", { NULL, DocSymbol::Perl_unknown }},
216  { SYM(hArr), "\xe2\x87\x94", "&hArr;", "<hArr/>", "&#8660;", "{$\\Leftrightarrow$}", NULL, "\\u8660?", { NULL, DocSymbol::Perl_unknown }},
217  { SYM(forall), "\xe2\x88\x80", "&forall;", "<forall/>", "&#8704;", "{$\\forall$}", NULL, "\\u8704?", { NULL, DocSymbol::Perl_unknown }},
218  { SYM(part), "\xe2\x88\x82", "&part;", "<part/>", "&#8706;", "{$\\partial$}", NULL, "\\u8706?", { "partial", DocSymbol::Perl_symbol }},
219  { SYM(exist), "\xe2\x88\x83", "&exist;", "<exist/>", "&#8707;", "{$\\exists$}", NULL, "\\u8707?", { NULL, DocSymbol::Perl_unknown }},
220  { SYM(empty), "\xe2\x88\x85", "&empty;", "<empty/>", "&#8709;", "{$\\emptyset$}", NULL, "\\u8709?", { "empty", DocSymbol::Perl_symbol }},
221  { SYM(nabla), "\xe2\x88\x87", "&nabla;", "<nabla/>", "&#8711;", "{$\\nabla$}", NULL, "\\u8711?", { "nabla", DocSymbol::Perl_symbol }},
222  { SYM(isin), "\xe2\x88\x88", "&isin;", "<isin/>", "&#8712;", "{$\\in$}", NULL, "\\u8712?", { "in", DocSymbol::Perl_symbol }},
223  { SYM(notin), "\xe2\x88\x89", "&notin;", "<notin/>", "&#8713;", "{$\\notin$}", NULL, "\\u8713?", { "notin", DocSymbol::Perl_symbol }},
224  { SYM(ni), "\xe2\x88\x8b", "&ni;", "<ni/>", "&#8715;", "{$\\ni$}", NULL, "\\u8715?", { NULL, DocSymbol::Perl_unknown }},
225  { SYM(prod), "\xe2\x88\x8f", "&prod;", "<prod/>", "&#8719;", "{$\\prod$}", NULL, "\\u8719?", { "prod", DocSymbol::Perl_symbol }},
226  { SYM(sum), "\xe2\x88\x91", "&sum;", "<sum/>", "&#8721;", "{$\\sum$}", NULL, "\\u8721?", { "sum", DocSymbol::Perl_symbol }},
227  { SYM(minus), "\xe2\x88\x92", "&minus;", "<minus/>", "&#8722;", "-", NULL, "\\u8722?", { "-", DocSymbol::Perl_char }},
228  { SYM(lowast), "\xe2\x88\x97", "&lowast;", "<lowast/>", "&#8727;", "{$\\ast$}", NULL, "\\u8727?", { NULL, DocSymbol::Perl_unknown }},
229  { SYM(radic), "\xe2\x88\x9a", "&radic;", "<radic/>", "&#8730;", "{$\\surd$}", NULL, "\\u8730?", { "sqrt", DocSymbol::Perl_symbol }},
230  { SYM(prop), "\xe2\x88\x9d", "&prop;", "<prop/>", "&#8733;", "{$\\propto$}", NULL, "\\u8733?", { "propto", DocSymbol::Perl_symbol }},
231  { SYM(infin), "\xe2\x88\x9e", "&infin;", "<infin/>", "&#8734;", "{$\\infty$}", NULL, "\\u8734?", { "inf", DocSymbol::Perl_symbol }},
232  { SYM(ang), "\xe2\x88\xa0", "&ang;", "<ang/>", "&#8736;", "{$\\angle$}", NULL, "\\u8736?", { NULL, DocSymbol::Perl_unknown }},
233  { SYM(and), "\xe2\x88\xa7", "&and;", "<and/>", "&#8743;", "{$\\wedge$}", NULL, "\\u8743?", { NULL, DocSymbol::Perl_unknown }},
234  { SYM(or), "\xe2\x88\xa8", "&or;", "<or/>", "&#8744;", "{$\\vee$}", NULL, "\\u8744?", { NULL, DocSymbol::Perl_unknown }},
235  { SYM(cap), "\xe2\x88\xa9", "&cap;", "<cap/>", "&#8745;", "{$\\cap$}", NULL, "\\u8745?", { NULL, DocSymbol::Perl_unknown }},
236  { SYM(cup), "\xe2\x88\xaa", "&cup;", "<cup/>", "&#8746;", "{$\\cup$}", NULL, "\\u8746?", { NULL, DocSymbol::Perl_unknown }},
237  { SYM(int), "\xe2\x88\xab", "&int;", "<int/>", "&#8747;", "{$\\int$}", NULL, "\\u8747?", { "int", DocSymbol::Perl_symbol }},
238  { SYM(there4), "\xe2\x88\xb4", "&there4;", "<there4/>", "&#8756;", "{$\\therefore$}", NULL, "\\u8756?", { NULL, DocSymbol::Perl_unknown }},
239  { SYM(sim), "\xe2\x88\xbc", "&sim;", "<sim/>", "&#8764;", "{$\\sim$}", NULL, "\\u8764?", { "~", DocSymbol::Perl_char }},
240  { SYM(cong), "\xe2\x89\x85", "&cong;", "<cong/>", "&#8773;", "{$\\cong$}", NULL, "\\u8773?", { NULL, DocSymbol::Perl_unknown }},
241  { SYM(asymp), "\xe2\x89\x88", "&asymp;", "<asymp/>", "&#8776;", "{$\\approx$}", NULL, "\\u8776?", { "approx", DocSymbol::Perl_symbol }},
242  { SYM(ne), "\xe2\x89\xa0", "&ne;", "<ne/>", "&#8800;", "{$\\ne$}", NULL, "\\u8800?", { "!=", DocSymbol::Perl_string }},
243  { SYM(equiv), "\xe2\x89\xa1", "&equiv;", "<equiv/>", "&#8801;", "{$\\equiv$}", NULL, "\\u8801?", { "equiv", DocSymbol::Perl_symbol }},
244  { SYM(le), "\xe2\x89\xa4", "&le;", "<le/>", "&#8804;", "{$\\le$}", NULL, "\\u8804?", { "<=", DocSymbol::Perl_string }},
245  { SYM(ge), "\xe2\x89\xa5", "&ge;", "<ge/>", "&#8805;", "{$\\ge$}", NULL, "\\u8805?", { ">=", DocSymbol::Perl_string }},
246  { SYM(sub), "\xe2\x8a\x82", "&sub;", "<sub/>", "&#8834;", "{$\\subset$}", NULL, "\\u8834?", { NULL, DocSymbol::Perl_unknown }},
247  { SYM(sup), "\xe2\x8a\x83", "&sup;", "<sup/>", "&#8835;", "{$\\supset$}", NULL, "\\u8835?", { NULL, DocSymbol::Perl_unknown }},
248  { SYM(nsub), "\xe2\x8a\x84", "&nsub;", "<nsub/>", "&#8836;", "{$\\not\\subset$}", NULL, "\\u8836?", { NULL, DocSymbol::Perl_unknown }},
249  { SYM(sube), "\xe2\x8a\x86", "&sube;", "<sube/>", "&#8838;", "{$\\subseteq$}", NULL, "\\u8838?", { NULL, DocSymbol::Perl_unknown }},
250  { SYM(supe), "\xe2\x8a\x87", "&supe;", "<supe/>", "&#8839;", "{$\\supseteq$}", NULL, "\\u8839?", { NULL, DocSymbol::Perl_unknown }},
251  { SYM(oplus), "\xe2\x8a\x95", "&oplus;", "<oplus/>", "&#8853;", "{$\\oplus$}", NULL, "\\u8853?", { NULL, DocSymbol::Perl_unknown }},
252  { SYM(otimes), "\xe2\x8a\x97", "&otimes;", "<otimes/>", "&#8855;", "{$\\otimes$}", NULL, "\\u8855?", { NULL, DocSymbol::Perl_unknown }},
253  { SYM(perp), "\xe2\x8a\xa5", "&perp;", "<perp/>", "&#8869;", "{$\\perp$}", NULL, "\\u8869?", { "perp", DocSymbol::Perl_symbol }},
254  { SYM(sdot), "\xe2\x8b\x85", "&sdot;", "<sdot/>", "&#8901;", "{$\\cdot$}", NULL, "\\u8901?", { ".", DocSymbol::Perl_char }},
255  { SYM(lceil), "\xe2\x8c\x88", "&lceil;", "<lceil/>", "&#8968;", "{$\\lceil$}", NULL, "\\u8968?", { "lceil", DocSymbol::Perl_symbol }},
256  { SYM(rceil), "\xe2\x8c\x89", "&rceil;", "<rceil/>", "&#8969;", "{$\\rceil$}", NULL, "\\u8969?", { "rceil", DocSymbol::Perl_symbol }},
257  { SYM(lfloor), "\xe2\x8c\x8a", "&lfloor;", "<lfloor/>", "&#8970;", "{$\\lfloor$}", NULL, "\\u8970?", { "lfloor", DocSymbol::Perl_symbol }},
258  { SYM(rfloor), "\xe2\x8c\x8b", "&rfloor;", "<rfloor/>", "&#8971;", "{$\\rfloor$}", NULL, "\\u8971?", { "rfloor", DocSymbol::Perl_symbol }},
259  { SYM(lang), "\xe2\x8c\xa9", "&lang;", "<lang/>", "&#9001;", "{$\\langle$}", NULL, "\\u9001?", { NULL, DocSymbol::Perl_unknown }},
260  { SYM(rang), "\xe2\x8c\xaa", "&rang;", "<rang/>", "&#9002;", "{$\\rangle$}", NULL, "\\u9002?", { NULL, DocSymbol::Perl_unknown }},
261  { SYM(loz), "\xe2\x97\x8a", "&loz;", "<loz/>", "&#9674;", "{$\\lozenge$}", NULL, "\\u9674?", { NULL, DocSymbol::Perl_unknown }},
262  { SYM(spades), "\xe2\x99\xa0", "&spades;", "<spades/>", "&#9824;", "{$\\spadesuit$}", NULL, "\\u9824?", { NULL, DocSymbol::Perl_unknown }},
263  { SYM(clubs), "\xe2\x99\xa3", "&clubs;", "<clubs/>", "&#9827;", "{$\\clubsuit$}", NULL, "\\u9827?", { NULL, DocSymbol::Perl_unknown }},
264  { SYM(hearts), "\xe2\x99\xa5", "&hearts;", "<hearts/>", "&#9829;", "{$\\heartsuit$}", NULL, "\\u9829?", { NULL, DocSymbol::Perl_unknown }},
265  { SYM(diams), "\xe2\x99\xa6", "&diams;", "<diams/>", "&#9830;", "{$\\diamondsuit$}", NULL, "\\u9830?", { NULL, DocSymbol::Perl_unknown }},
266  { SYM(quot), "\"", "&quot;", "\"", "&quot;", "\"", "\"", "\"", { "\"", DocSymbol::Perl_char }},
267  { SYM(amp), "&", "&amp;", "&amp;", "&amp;", "\\&", "&", "&", { "&", DocSymbol::Perl_char }},
268  { SYM(lt), "<", "&lt;", "&lt;", "&lt;", "<", "<", "<", { "<", DocSymbol::Perl_char }},
269  { SYM(gt), ">", "&gt;", "&gt;", "&gt;", ">", ">", ">", { ">", DocSymbol::Perl_char }},
270  { SYM(OElig), "\xc5\x92", "&OElig;", "<OElig/>", "&#338;", "\\OE", NULL, "\\'8C", { NULL, DocSymbol::Perl_unknown }},
271  { SYM(oelig), "\xc5\x93", "&oelig;", "<oelig/>", "&#339;", "\\oe", NULL, "\\'9C", { NULL, DocSymbol::Perl_unknown }},
272  { SYM(Scaron), "\xc5\xa0", "&Scaron;", "<Scaron/>", "&#352;", "\\v{S}", NULL, "\\'8A", { NULL, DocSymbol::Perl_unknown }},
273  { SYM(scaron), "\xc5\xa1", "&scaron;", "<scaron/>", "&#353;", "\\v{s}", NULL, "\\'9A", { NULL, DocSymbol::Perl_unknown }},
274  { SYM(Yuml), "\xc5\xb8", "&Yuml;", "<Yumlaut/>", "&#376;", "\\\"{Y}", "Y\\*(4", "\\'9F", { "Y", DocSymbol::Perl_umlaut }},
275  { SYM(circ), "\xcb\x86", "&circ;", "<circ/>", "&#710;", "{$\\circ$}", NULL, "\\'88", { " ", DocSymbol::Perl_circ }},
276  { SYM(tilde), "\xcb\x9c", "&tilde;", "<tilde/>", "&#732;", "\\~{}", "~", "\\'98", { " ", DocSymbol::Perl_tilde }},
277  { SYM(ensp), "\xe2\x80\x82", "&ensp;", "<ensp/>", "&#8194;", "\\enskip{}", NULL, "{\\enspace}", { NULL, DocSymbol::Perl_unknown }},
278  { SYM(emsp), "\xe2\x80\x83", "&emsp;", "<emsp/>", "&#8195;", "\\quad{}", NULL, "{\\emspace}", { NULL, DocSymbol::Perl_unknown }},
279  { SYM(thinsp), "\xe2\x80\x89", "&thinsp;", "<thinsp/>", "&#8201;", "\\,", NULL, "{\\qmspace}", { NULL, DocSymbol::Perl_unknown }},
280  { SYM(zwnj), "\xe2\x80\x8c", "&zwnj;", "<zwnj/>", "&#8204;", "{}", NULL, "\\zwnj", { NULL, DocSymbol::Perl_unknown }},
281  { SYM(zwj), "\xe2\x80\x8d", "&zwj;", "<zwj/>", "&#8205;", "", NULL, "\\zwj", { NULL, DocSymbol::Perl_unknown }},
282  { SYM(lrm), "\xe2\x80\x8e", "&lrm;", "<lrm/>", "&#8206;", "", NULL, "\\ltrmark", { NULL, DocSymbol::Perl_unknown }},
283  { SYM(rlm), "\xe2\x80\x8f", "&rlm;", "<rlm/>", "&#8207;", "", NULL, "\\rtlmark", { NULL, DocSymbol::Perl_unknown }},
284  { SYM(ndash), "\xe2\x80\x93", "&ndash;", "<ndash/>", "&#8211;", "--", "--", "\\'96", { "-", DocSymbol::Perl_char }},
285  { SYM(mdash), "\xe2\x80\x94", "&mdash;", "<mdash/>", "&#8212;", "---", "---", "\\'97", { "--", DocSymbol::Perl_string }},
286  { SYM(lsquo), "\xe2\x80\x98", "&lsquo;", "<lsquo/>", "&#8216;", "`", "`", "\\'91", { "\\\'", DocSymbol::Perl_string }},
287  { SYM(rsquo), "\xe2\x80\x99", "&rsquo;", "<rsquo/>", "&#8217;", "'", "'", "\\'92", { "\\\'", DocSymbol::Perl_string }},
288  { SYM(sbquo), "\xe2\x80\x9a", "&sbquo;", "<sbquo/>", "&#8218;", "\\quotesinglbase{}", NULL, "\\'82", { NULL, DocSymbol::Perl_unknown }},
289  { SYM(ldquo), "\xe2\x80\x9c", "&ldquo;", "<ldquo/>", "&#8220;", "``", "``", "\\'93", { "\"", DocSymbol::Perl_char }},
290  { SYM(rdquo), "\xe2\x80\x9d", "&rdquo;", "<rdquo/>", "&#8221;", "''", "''", "\\'94", { "\"", DocSymbol::Perl_char }},
291  { SYM(bdquo), "\xe2\x80\x9e", "&bdquo;", "<bdquo/>", "&#8222;", "\\quotedblbase{}", NULL, "\\'84", { NULL, DocSymbol::Perl_unknown }},
292  { SYM(dagger), "\xe2\x80\xa0", "&dagger;", "<dagger/>", "&#8224;", "{$\\dagger$}", NULL, "\\'86", { NULL, DocSymbol::Perl_unknown }},
293  { SYM(Dagger), "\xe2\x80\xa1", "&Dagger;", "<Dagger/>", "&#8225;", "{$\\ddagger$}", NULL, "\\'87", { NULL, DocSymbol::Perl_unknown }},
294  { SYM(permil), "\xe2\x80\xb0", "&permil;", "<permil/>", "&#8240;", "{$\\permil{}$}", NULL, "\\'89", { NULL, DocSymbol::Perl_unknown }},
295  { SYM(lsaquo), "\xe2\x80\xb9", "&lsaquo;", "<lsaquo/>", "&#8249;", "\\guilsinglleft{}", NULL, "\\'8B", { NULL, DocSymbol::Perl_unknown }},
296  { SYM(rsaquo), "\xe2\x80\xba", "&rsaquo;", "<rsaquo/>", "&#8250;", "\\guilsinglright{}", NULL, "\\'9B", { NULL, DocSymbol::Perl_unknown }},
297  { SYM(euro), "\xe2\x82\xac", "&euro;", "<euro/>", "&#8364;", "\\texteuro{}", NULL, "\\'80", { NULL, DocSymbol::Perl_unknown }},
298 
299  // doxygen extension to the HTML4 table of HTML entities
300  { SYM(tm), "\xe2\x84\xa2", "&trade;", "<trademark/>", "&#8482;", "\\texttrademark{}", "(TM)", "\\'99", { "trademark", DocSymbol::Perl_symbol }},
301  { SYM(apos), "'", "'", "'", "&apos;", "\\textquotesingle{}", "'", "'", { "\\\'", DocSymbol::Perl_string }},
302 
303  // doxygen commands represented as HTML entities
304  { SYM(BSlash), "\\", "\\", "\\", "\\", "\\textbackslash{}", "\\\\", "\\\\", { "\\\\", DocSymbol::Perl_string }},
305  { SYM(At), "@", "@", "@", "@", "@", "@", "@", { "@", DocSymbol::Perl_char }},
306  { SYM(Less), "<", "&lt;", "&lt;", "&lt;", "<", "<", "<", { "<", DocSymbol::Perl_char }},
307  { SYM(Greater), ">", "&gt;", "&gt;", "&gt;", ">", ">", ">", { ">", DocSymbol::Perl_char }},
308  { SYM(Amp), "&", "&amp;", "&amp;", "&amp;", "\\&", "&", "&", { "&", DocSymbol::Perl_char }},
309  { SYM(Dollar), "$", "$", "$", "$", "\\$", "$", "$", { "$", DocSymbol::Perl_char }},
310  { SYM(Hash), "#;", "#", "#", "#", "\\#", "#", "#", { "#", DocSymbol::Perl_char }},
311  { SYM(DoubleColon), "::", "::", "::", "::", "::", "::", "::", { "::", DocSymbol::Perl_string }},
312  { SYM(Percent), "%", "%", "%", "%", "\\%", "%", "%", { "%", DocSymbol::Perl_char }},
313  { SYM(Pipe), "|", "|", "|", "|", "$|$", "|", "|", { "|", DocSymbol::Perl_char }},
314  { SYM(Quot), "\"", "\"", "\"", "&quot;", "\"", "\"", "\"", { "\"", DocSymbol::Perl_char }},
315  { SYM(Minus), "-", "-", "-", "-", "-\\/", "-", "-", { "-", DocSymbol::Perl_char }},
316  { SYM(Plus), "+", "+", "+", "+", "+", "+", "+", { "+", DocSymbol::Perl_char }},
317  { SYM(Dot), ".", ".", ".", ".", ".", ".", ".", { ".", DocSymbol::Perl_char }}
318 };
319 
320 static const int g_numHtmlEntities = (int)(sizeof(g_htmlEntities)/ sizeof(*g_htmlEntities));
321 
323 
325 {
326  m_name2sym = new QDict<int>(1009);
327  m_name2sym->setAutoDelete(TRUE);
328  for (int i = 0; i < g_numHtmlEntities; i++)
329  {
330  m_name2sym->insert(g_htmlEntities[i].item,new int(g_htmlEntities[i].symb));
331  }
332  validate();
333 }
334 
336 {
337  delete m_name2sym;
338 }
339 
340 /** Returns the one and only instance of the HTML entity mapper */
342 {
343  if (s_instance==0)
344  {
345  s_instance = new HtmlEntityMapper;
346  }
347  return s_instance;
348 }
349 
350 /** Deletes the one and only instance of the HTML entity mapper */
352 {
353  delete s_instance;
354  s_instance=0;
355 }
356 
357 
358 /*! @brief Access routine to the UTF8 code of the HTML entity
359  *
360  * @param symb Code of the requested HTML entity
361  * @param useInPrintf If TRUE the result will be escaped such that it can be
362  * used in a printf string pattern
363  * @return the UTF8 code of the HTML entity,
364  * in case the UTF code is unknown \c NULL is returned.
365  */
366 const char *HtmlEntityMapper::utf8(DocSymbol::SymType symb,bool useInPrintf) const
367 {
368  if (useInPrintf && symb==DocSymbol::Sym_Percent)
369  {
370  return "%%"; // escape for printf
371  }
372  else
373  {
374  return g_htmlEntities[symb].UTF8;
375  }
376 }
377 
378 /*! @brief Access routine to the html code of the HTML entity
379  *
380  * @param symb Code of the requested HTML entity
381  * @param useInPrintf If TRUE the result will be escaped such that it can be
382  * used in a printf string pattern
383  * @return the html representation of the HTML entity,
384  * in case the html code is unknown \c NULL is returned.
385  */
386 const char *HtmlEntityMapper::html(DocSymbol::SymType symb,bool useInPrintf) const
387 {
388  if (useInPrintf && symb==DocSymbol::Sym_Percent)
389  {
390  return "%%"; // escape for printf
391  }
392  else
393  {
394  return g_htmlEntities[symb].html;
395  }
396 }
397 
398 /*! @brief Access routine to the XML code of the HTML entity
399  *
400  * @param symb Code of the requested HTML entity
401  * @return the XML code of the HTML entity,
402  * in case the XML code is unknown \c NULL is returned.
403  */
405 {
406  return g_htmlEntities[symb].xml;
407 }
408 
409 /*! @brief Access routine to the docbook code of the HTML entity
410  *
411  * @param symb Code of the requested HTML entity
412  * @return the docbook code of the HTML entity,
413  * in case the docbook code is unknown \c NULL is returned.
414  */
416 {
417  return g_htmlEntities[symb].docbook;
418 }
419 
420 /*! @brief Access routine to the LaTeX code of the HTML entity
421  *
422  * @param symb Code of the requested HTML entity
423  * @return the LaTeX code of the HTML entity,
424  * in case the LaTeX code is unknown \c NULL is returned.
425  */
427 {
428  return g_htmlEntities[symb].latex;
429 }
430 
431 /*! @brief Access routine to the man code of the HTML entity
432  *
433  * @param symb Code of the requested HTML entity
434  * @return the man of the HTML entity,
435  * in case the man code is unknown \c NULL is returned.
436  */
438 {
439  return g_htmlEntities[symb].man;
440 }
441 
442 /*! @brief Access routine to the RTF code of the HTML entity
443  *
444  * @param symb Code of the requested HTML entity
445  * @return the RTF of the HTML entity,
446  * in case the RTF code is unknown \c NULL is returned.
447  */
449 {
450  return g_htmlEntities[symb].rtf;
451 }
452 
453 /*! @brief Access routine to the perl struct with the perl code of the HTML entity
454  *
455  * @param symb Code of the requested HTML entity
456  * @return the pointer to perl struct with the perl code of the HTML entity,
457  * in case the perl code does not exists the NULL pointer is entered in the
458  * \c symb field and in the `DocSymbol::Perl_unknown` in the \c type field.
459  */
461 {
462  return &g_htmlEntities[symb].perl;
463 }
464 
465 /*!
466  * @brief Give code of the requested HTML entity name
467  * @param symName HTML entity name without \c & and \c ;
468  * @return the code for the requested HTML entity name,
469  * in case the requested HTML item does not exist `DocSymbol::Sym_unknown` is returned.
470  */
472 {
473  int *pSymb = m_name2sym->find(symName);
474  return pSymb ? ((DocSymbol::SymType)*pSymb) : DocSymbol::Sym_Unknown;
475 }
476 
478 {
479  for (int i=0;i<g_numHtmlEntities - g_numberHtmlMappedCmds;i++)
480  {
481  QCString bareName = g_htmlEntities[i].xml;
482  if (!bareName.isEmpty() && bareName.at(0)=='<' && bareName.right(2)=="/>")
483  {
484  bareName = bareName.mid(1,bareName.length()-3); // strip < and />
485  t << " <xsd:element name=\"" << bareName << "\" type=\"docEmptyType\" />\n";
486  }
487  }
488 }
489 
490 /*! @brief Routine to check if the entries of the html_entities are numbered correctly
491  * @details in case of a mismatch a warning message is given.
492  */
494 {
495  for (int i = 0; i < g_numHtmlEntities; i++)
496  {
497  if (i != g_htmlEntities[i].symb)
498  {
499  warn_uncond("Internal inconsistency, htmlentries code %d (item=%s)\n",i,g_htmlEntities[i].item);
500  }
501  }
502 }
const char * item
Definition: htmlentity.cpp:30
const char * man(DocSymbol::SymType symb) const
Access routine to the man code of the HTML entity.
Definition: htmlentity.cpp:437
static HtmlEntityMapper * s_instance
Definition: htmlentity.h:43
void writeXMLSchema(FTextStream &t)
Definition: htmlentity.cpp:477
double beta(double KE, const simb::MCParticle *part)
bool isEmpty() const
Definition: qcstring.h:189
uint length() const
Definition: qcstring.h:195
char & at(uint i) const
Definition: qcstring.h:326
const char * xml
Definition: htmlentity.cpp:33
DocSymbol::SymType name2sym(const QCString &symName) const
Give code of the requested HTML entity name.
Definition: htmlentity.cpp:471
Structure defining all HTML4 entities, doxygen extensions and doxygen commands representing special s...
Definition: htmlentity.cpp:27
const char * xml(DocSymbol::SymType symb) const
Access routine to the XML code of the HTML entity.
Definition: htmlentity.cpp:404
#define SYM(s)
static HtmlEntityMapper * instance()
Definition: htmlentity.cpp:341
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
const char * latex(DocSymbol::SymType symb) const
Access routine to the LaTeX code of the HTML entity.
Definition: htmlentity.cpp:426
tm
Definition: demo.py:21
void validate()
Routine to check if the entries of the html_entities are numbered correctly.
Definition: htmlentity.cpp:493
static void deleteInstance()
Definition: htmlentity.cpp:351
const DocSymbol::PerlSymb * perl(DocSymbol::SymType symb) const
Access routine to the perl struct with the perl code of the HTML entity.
Definition: htmlentity.cpp:460
const char * docbook(DocSymbol::SymType symb) const
Access routine to the docbook code of the HTML entity.
Definition: htmlentity.cpp:415
const char * UTF8
Definition: htmlentity.cpp:31
DocSymbol::SymType symb
Definition: htmlentity.cpp:29
const char * man
Definition: htmlentity.cpp:36
static struct htmlEntityInfo g_htmlEntities[]
QCString right(uint len) const
Definition: qcstring.cpp:231
double Rho
Definition: doAna.cpp:13
double alpha
Definition: doAna.cpp:15
DocSymbol::PerlSymb perl
Definition: htmlentity.cpp:38
static const int g_numberHtmlMappedCmds
Number of doxygen commands mapped as if it were HTML entities.
Definition: htmlentity.cpp:21
static constexpr double deg
Definition: Units.h:167
const char * html(DocSymbol::SymType symb, bool useInPrintf=FALSE) const
Access routine to the html code of the HTML entity.
Definition: htmlentity.cpp:386
double gamma(double KE, const simb::MCParticle *part)
Code to link reconstructed objects back to the MC truth information.
const char * rtf(DocSymbol::SymType symb) const
Access routine to the RTF code of the HTML entity.
Definition: htmlentity.cpp:448
def validate(nxgraph, desc)
Definition: graph.py:45
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
static const int g_numHtmlEntities
Definition: htmlentity.cpp:320
const char * html
Definition: htmlentity.cpp:32
const char * rtf
Definition: htmlentity.cpp:37
T copy(T const &v)
const char * latex
Definition: htmlentity.cpp:35
Singleton helper class to map html entities to other formats.
Definition: htmlentity.h:24
float pi
Definition: units.py:11
std::string sup(const std::string &a, const std::string &b)
Definition: TruthText.cxx:94
const bool TRUE
Definition: qglobal.h:371
const char * docbook
Definition: htmlentity.cpp:34
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:97
const char * utf8(DocSymbol::SymType symb, bool useInPrintf=FALSE) const
Access routine to the UTF8 code of the HTML entity.
Definition: htmlentity.cpp:366
std::string sub(const std::string &a, const std::string &b)
Definition: TruthText.cxx:100
void warn_uncond(const char *fmt,...)
Definition: message.cpp:218