NamedEnts.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. // Copyright 2017 Patrick Brosi
  2. // info@patrickbrosi.de
  3. #ifndef XML_NAMEDENTS_H_
  4. #define XML_NAMEDENTS_H_
  5. #include <map>
  6. #include <string>
  7. namespace xml {
  8. // see
  9. // http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
  10. std::map<std::string, const char*> ENTITIES = {
  11. {"aacute", "á"},
  12. {"Aacute", "Á"},
  13. {"acirc", "â"},
  14. {"Acirc", "Â"},
  15. {"acute", "´"},
  16. {"aelig", "æ"},
  17. {"AElig", "Æ"},
  18. {"agrave", "à"},
  19. {"Agrave", "À"},
  20. {"alefsym", "ℵ"},
  21. {"alpha", "α"},
  22. {"Alpha", "Α"},
  23. {"amp", "&"},
  24. {"and", "∧"},
  25. {"ang", "∠"},
  26. {"apos", "'"},
  27. {"aring", "å"},
  28. {"Aring", "Å"},
  29. {"asymp", "≈"},
  30. {"atilde", "ã"},
  31. {"Atilde", "Ã"},
  32. {"auml", "ä"},
  33. {"Auml", "Ä"},
  34. {"bdquo", "„"},
  35. {"beta", "β"},
  36. {"Beta", "Β"},
  37. {"brvbar", "¦"},
  38. {"bull", "•"},
  39. {"cap", "∩"},
  40. {"ccedil", "ç"},
  41. {"Ccedil", "Ç"},
  42. {"cedil", "¸"},
  43. {"cent", "¢"},
  44. {"chi", "χ"},
  45. {"Chi", "Χ"},
  46. {"circ", "ˆ"},
  47. {"clubs", "♣"},
  48. {"cong", "≅"},
  49. {"copy", "©"},
  50. {"crarr", "↵"},
  51. {"cup", "∪"},
  52. {"curren", "¤"},
  53. {"dagger", "†"},
  54. {"Dagger", "‡"},
  55. {"darr", "↓"},
  56. {"dArr", "⇓"},
  57. {"deg", "°"},
  58. {"delta", "δ"},
  59. {"Delta", "Δ"},
  60. {"diams", "♦"},
  61. {"divide", "÷"},
  62. {"eacute", "é"},
  63. {"Eacute", "É"},
  64. {"ecirc", "ê"},
  65. {"Ecirc", "Ê"},
  66. {"egrave", "è"},
  67. {"Egrave", "È"},
  68. {"empty", "∅"},
  69. {"emsp", "\xE2\x80\x83"},
  70. {"ensp", "\xE2\x80\x82"},
  71. {"epsilon", "ε"},
  72. {"Epsilon", "Ε"},
  73. {"equiv", "≡"},
  74. {"eta", "η"},
  75. {"Eta", "Η"},
  76. {"eth", "ð"},
  77. {"ETH", "Ð"},
  78. {"euml", "ë"},
  79. {"Euml", "Ë"},
  80. {"euro", "€"},
  81. {"exist", "∃"},
  82. {"fnof", "ƒ"},
  83. {"forall", "∀"},
  84. {"frac12", "½"},
  85. {"frac14", "¼"},
  86. {"frac34", "¾"},
  87. {"frasl", "⁄"},
  88. {"gamma", "γ"},
  89. {"Gamma", "Γ"},
  90. {"ge", "≥"},
  91. {"gt", ">"},
  92. {"harr", "↔"},
  93. {"hArr", "⇔"},
  94. {"hearts", "♥"},
  95. {"hellip", "…"},
  96. {"iacute", "í"},
  97. {"Iacute", "Í"},
  98. {"icirc", "î"},
  99. {"Icirc", "Î"},
  100. {"iexcl", "¡"},
  101. {"igrave", "ì"},
  102. {"Igrave", "Ì"},
  103. {"image", "ℑ"},
  104. {"infin", "∞"},
  105. {"int", "∫"},
  106. {"iota", "ι"},
  107. {"Iota", "Ι"},
  108. {"iquest", "¿"},
  109. {"isin", "∈"},
  110. {"iuml", "ï"},
  111. {"Iuml", "Ï"},
  112. {"kappa", "κ"},
  113. {"Kappa", "Κ"},
  114. {"lambda", "λ"},
  115. {"Lambda", "Λ"},
  116. {"lang", "〈"},
  117. {"laquo", "«"},
  118. {"larr", "←"},
  119. {"lArr", "⇐"},
  120. {"lceil", "⌈"},
  121. {"ldquo", "“"},
  122. {"le", "≤"},
  123. {"lfloor", "⌊"},
  124. {"lowast", "∗"},
  125. {"loz", "◊"},
  126. {"lrm", "\xE2\x80\x8E"},
  127. {"lsaquo", "‹"},
  128. {"lsquo", "‘"},
  129. {"lt", "<"},
  130. {"macr", "¯"},
  131. {"mdash", "—"},
  132. {"micro", "µ"},
  133. {"middot", "·"},
  134. {"minus", "−"},
  135. {"mu", "μ"},
  136. {"Mu", "Μ"},
  137. {"nabla", "∇"},
  138. {"nbsp", "\xC2\xA0"},
  139. {"ndash", "–"},
  140. {"ne", "≠"},
  141. {"ni", "∋"},
  142. {"not", "¬"},
  143. {"notin", "∉"},
  144. {"nsub", "⊄"},
  145. {"ntilde", "ñ"},
  146. {"Ntilde", "Ñ"},
  147. {"nu", "ν"},
  148. {"Nu", "Ν"},
  149. {"oacute", "ó"},
  150. {"Oacute", "Ó"},
  151. {"ocirc", "ô"},
  152. {"Ocirc", "Ô"},
  153. {"oelig", "œ"},
  154. {"OElig", "Œ"},
  155. {"ograve", "ò"},
  156. {"Ograve", "Ò"},
  157. {"oline", "‾"},
  158. {"omega", "ω"},
  159. {"Omega", "Ω"},
  160. {"omicron", "ο"},
  161. {"Omicron", "Ο"},
  162. {"oplus", "⊕"},
  163. {"or", "∨"},
  164. {"ordf", "ª"},
  165. {"ordm", "º"},
  166. {"oslash", "ø"},
  167. {"Oslash", "Ø"},
  168. {"otilde", "õ"},
  169. {"Otilde", "Õ"},
  170. {"otimes", "⊗"},
  171. {"ouml", "ö"},
  172. {"Ouml", "Ö"},
  173. {"para", "¶"},
  174. {"part", "∂"},
  175. {"permil", "‰"},
  176. {"perp", "⊥"},
  177. {"phi", "φ"},
  178. {"Phi", "Φ"},
  179. {"piv", "ϖ"},
  180. {"pi", "π"},
  181. {"Pi", "Π"},
  182. {"plusmn", "±"},
  183. {"pound", "£"},
  184. {"prime", "′"},
  185. {"Prime", "″"},
  186. {"prod", "∏"},
  187. {"prop", "∝"},
  188. {"psi", "ψ"},
  189. {"Psi", "Ψ"},
  190. {"quot", "\""},
  191. {"radic", "√"},
  192. {"rang", "〉"},
  193. {"raquo", "»"},
  194. {"rarr", "→"},
  195. {"rArr", "⇒"},
  196. {"rceil", "⌉"},
  197. {"rdquo", "”"},
  198. {"real", "ℜ"},
  199. {"reg", "®"},
  200. {"rfloor", "⌋"},
  201. {"rho", "ρ"},
  202. {"Rho", "Ρ"},
  203. {"rlm", "\xE2\x80\x8F"},
  204. {"rsaquo", "›"},
  205. {"rsquo", "’"},
  206. {"sbquo", "‚"},
  207. {"scaron", "š"},
  208. {"Scaron", "Š"},
  209. {"sdot", "⋅"},
  210. {"sect", "§"},
  211. {"shy", "\xC2\xAD"},
  212. {"sigmaf", "ς"},
  213. {"sigma", "σ"},
  214. {"Sigma", "Σ"},
  215. {"sim", "∼"},
  216. {"spades", "♠"},
  217. {"sub", "⊂"},
  218. {"sube", "⊆"},
  219. {"sum", "∑"},
  220. {"sup", "⊃"},
  221. {"sup1", "¹"},
  222. {"sup2", "²"},
  223. {"sup3", "³"},
  224. {"supe", "⊇"},
  225. {"szlig", "ß"},
  226. {"tau", "τ"},
  227. {"Tau", "Τ"},
  228. {"there4", "∴"},
  229. {"thetasym", "ϑ"},
  230. {"theta", "θ"},
  231. {"Theta", "Θ"},
  232. {"thinsp", "\xE2\x80\x89"},
  233. {"thorn", "þ"},
  234. {"THORN", "Þ"},
  235. {"tilde", "˜"},
  236. {"times", "×"},
  237. {"trade", "™"},
  238. {"uacute", "ú"},
  239. {"Uacute", "Ú"},
  240. {"uarr", "↑"},
  241. {"uArr", "⇑"},
  242. {"ucirc", "û"},
  243. {"Ucirc", "Û"},
  244. {"ugrave", "ù"},
  245. {"Ugrave", "Ù"},
  246. {"uml", "¨"},
  247. {"upsih", "ϒ"},
  248. {"upsilon", "υ"},
  249. {"Upsilon", "Υ"},
  250. {"uuml", "ü"},
  251. {"Uuml", "Ü"},
  252. {"weierp", "℘"},
  253. {"xi", "ξ"},
  254. {"Xi", "Ξ"},
  255. {"yacute", "ý"},
  256. {"Yacute", "Ý"},
  257. {"yen", "¥"},
  258. {"yuml", "ÿ"},
  259. {"Yuml", "Ÿ"},
  260. {"zeta", "ζ"},
  261. {"Zeta", "Ζ"},
  262. {"zwj", "\xE2\x80\x8D"},
  263. {"zwnj", "\xE2\x80\x8C"}
  264. };
  265. }
  266. #endif // XML_NAMEDENTS_H_