initial commit
authorLaurent MAZET <laurent.mazet@thalesgroup.com>
Fri, 2 Oct 2026 16:47:53 +0000 (18:47 +0200)
committerLaurent MAZET <laurent.mazet@thalesgroup.com>
Fri, 2 Oct 2026 16:47:53 +0000 (18:47 +0200)
debug.c [new file with mode: 0644]
debug.h [new file with mode: 0644]
element.c [new file with mode: 0644]
element.h [new file with mode: 0644]
html2txt.c [new file with mode: 0644]
makefile [new file with mode: 0644]
test.html [new file with mode: 0644]

diff --git a/debug.c b/debug.c
new file mode 100644 (file)
index 0000000..fbf4938
--- /dev/null
+++ b/debug.c
@@ -0,0 +1,5 @@
+#include "debug.h"
+
+int verbose = INFO;
+
+/* vim: set ts=4 sw=4 et: */
diff --git a/debug.h b/debug.h
new file mode 100644 (file)
index 0000000..4c41f33
--- /dev/null
+++ b/debug.h
@@ -0,0 +1,27 @@
+#ifndef __DEBUG_H__
+#define __DEBUG_H__
+
+/* constants */
+
+#define DEBUG 3
+#define INFO 2
+#define WARNING 1
+#define ERROR 0
+
+/* macros */
+
+#define VERBOSE(level, args...) do { \
+    if (level <= verbose) { \
+        fprintf ((level == ERROR) ? stderr : stdout, args); \
+        fflush (stdout); \
+        fflush (stderr); \
+    } \
+} while(0)
+
+/* gobal variables */
+
+extern int verbose;
+
+#endif /* __DEBUG_H__ */
+
+/* vim: set ts=4 sw=4 et: */
diff --git a/element.c b/element.c
new file mode 100644 (file)
index 0000000..f3e6d18
--- /dev/null
+++ b/element.c
@@ -0,0 +1,2260 @@
+#include <stddef.h>
+#include <string.h>
+
+#include "element.h"
+
+typedef struct {
+    char *name;
+    char *glyph;
+} nchar_t;
+
+nchar_t elements[] = {
+    { "Aacute;", "Á" },
+    { "Aacute", "Á" },
+    { "aacute;", "á" },
+    { "aacute", "á" },
+    { "Abreve;", "Ă" },
+    { "abreve;", "ă" },
+    { "ac;", "∾" },
+    { "acd;", "∿" },
+    { "acE;", "∾̳" },
+    { "Acirc;", "Â" },
+    { "Acirc", "Â" },
+    { "acirc;", "â" },
+    { "acirc", "â" },
+    { "acute;", "´" },
+    { "acute", "´" },
+    { "Acy;", "А" },
+    { "acy;", "а" },
+    { "AElig;", "Æ" },
+    { "AElig", "Æ" },
+    { "aelig;", "æ" },
+    { "aelig", "æ" },
+    { "af;", "⁡" },
+    { "Afr;", "𝔄" },
+    { "afr;", "𝔞" },
+    { "Agrave;", "À" },
+    { "Agrave", "À" },
+    { "agrave;", "à" },
+    { "agrave", "à" },
+    { "alefsym;", "ℵ" },
+    { "aleph;", "ℵ" },
+    { "Alpha;", "Α" },
+    { "alpha;", "α" },
+    { "Amacr;", "Ā" },
+    { "amacr;", "ā" },
+    { "amalg;", "⨿" },
+    { "AMP;", "&" },
+    { "AMP", "&" },
+    { "amp;", "&" },
+    { "amp", "&" },
+    { "And;", "⩓" },
+    { "and;", "∧" },
+    { "andand;", "⩕" },
+    { "andd;", "⩜" },
+    { "andslope;", "⩘" },
+    { "andv;", "⩚" },
+    { "ang;", "∠" },
+    { "ange;", "⦤" },
+    { "angle;", "∠" },
+    { "angmsd;", "∡" },
+    { "angmsdaa;", "⦨" },
+    { "angmsdab;", "⦩" },
+    { "angmsdac;", "⦪" },
+    { "angmsdad;", "⦫" },
+    { "angmsdae;", "⦬" },
+    { "angmsdaf;", "⦭" },
+    { "angmsdag;", "⦮" },
+    { "angmsdah;", "⦯" },
+    { "angrt;", "∟" },
+    { "angrtvb;", "⊾" },
+    { "angrtvbd;", "⦝" },
+    { "angsph;", "∢" },
+    { "angst;", "Å" },
+    { "angzarr;", "⍼" },
+    { "Aogon;", "Ą" },
+    { "aogon;", "ą" },
+    { "Aopf;", "𝔸" },
+    { "aopf;", "𝕒" },
+    { "ap;", "≈" },
+    { "apacir;", "⩯" },
+    { "apE;", "⩰" },
+    { "ape;", "≊" },
+    { "apid;", "≋" },
+    { "apos;", "'" },
+    { "ApplyFunction;", "⁡" },
+    { "approx;", "≈" },
+    { "approxeq;", "≊" },
+    { "Aring;", "Å" },
+    { "Aring", "Å" },
+    { "aring;", "å" },
+    { "aring", "å" },
+    { "Ascr;", "𝒜" },
+    { "ascr;", "𝒶" },
+    { "Assign;", "≔" },
+    { "ast;", "*" },
+    { "asymp;", "≈" },
+    { "asympeq;", "≍" },
+    { "Atilde;", "Ã" },
+    { "Atilde", "Ã" },
+    { "atilde;", "ã" },
+    { "atilde", "ã" },
+    { "Auml;", "Ä" },
+    { "Auml", "Ä" },
+    { "auml;", "ä" },
+    { "auml", "ä" },
+    { "awconint;", "∳" },
+    { "awint;", "⨑" },
+    { "backcong;", "≌" },
+    { "backepsilon;", "϶" },
+    { "backprime;", "‵" },
+    { "backsim;", "∽" },
+    { "backsimeq;", "⋍" },
+    { "Backslash;", "∖" },
+    { "Barv;", "⫧" },
+    { "barvee;", "⊽" },
+    { "Barwed;", "⌆" },
+    { "barwed;", "⌅" },
+    { "barwedge;", "⌅" },
+    { "bbrk;", "⎵" },
+    { "bbrktbrk;", "⎶" },
+    { "bcong;", "≌" },
+    { "Bcy;", "Б" },
+    { "bcy;", "б" },
+    { "bdquo;", "„" },
+    { "becaus;", "∵" },
+    { "Because;", "∵" },
+    { "because;", "∵" },
+    { "bemptyv;", "⦰" },
+    { "bepsi;", "϶" },
+    { "bernou;", "ℬ" },
+    { "Bernoullis;", "ℬ" },
+    { "Beta;", "Β" },
+    { "beta;", "β" },
+    { "beth;", "ℶ" },
+    { "between;", "≬" },
+    { "Bfr;", "𝔅" },
+    { "bfr;", "𝔟" },
+    { "bigcap;", "⋂" },
+    { "bigcirc;", "◯" },
+    { "bigcup;", "⋃" },
+    { "bigodot;", "⨀" },
+    { "bigoplus;", "⨁" },
+    { "bigotimes;", "⨂" },
+    { "bigsqcup;", "⨆" },
+    { "bigstar;", "★" },
+    { "bigtriangledown;", "▽" },
+    { "bigtriangleup;", "△" },
+    { "biguplus;", "⨄" },
+    { "bigvee;", "⋁" },
+    { "bigwedge;", "⋀" },
+    { "bkarow;", "⤍" },
+    { "blacklozenge;", "⧫" },
+    { "blacksquare;", "▪" },
+    { "blacktriangle;", "▴" },
+    { "blacktriangledown;", "▾" },
+    { "blacktriangleleft;", "◂" },
+    { "blacktriangleright;", "▸" },
+    { "blank;", "␣" },
+    { "blk12;", "▒" },
+    { "blk14;", "░" },
+    { "blk34;", "▓" },
+    { "block;", "█" },
+    { "bne;", "=⃥" },
+    { "bnequiv;", "≡⃥" },
+    { "bNot;", "⫭" },
+    { "bnot;", "⌐" },
+    { "Bopf;", "𝔹" },
+    { "bopf;", "𝕓" },
+    { "bot;", "⊥" },
+    { "bottom;", "⊥" },
+    { "bowtie;", "⋈" },
+    { "boxbox;", "⧉" },
+    { "boxDL;", "╗" },
+    { "boxDl;", "╖" },
+    { "boxdL;", "╕" },
+    { "boxdl;", "┐" },
+    { "boxDR;", "╔" },
+    { "boxDr;", "╓" },
+    { "boxdR;", "╒" },
+    { "boxdr;", "┌" },
+    { "boxH;", "═" },
+    { "boxh;", "─" },
+    { "boxHD;", "╦" },
+    { "boxHd;", "╤" },
+    { "boxhD;", "╥" },
+    { "boxhd;", "┬" },
+    { "boxHU;", "╩" },
+    { "boxHu;", "╧" },
+    { "boxhU;", "╨" },
+    { "boxhu;", "┴" },
+    { "boxminus;", "⊟" },
+    { "boxplus;", "⊞" },
+    { "boxtimes;", "⊠" },
+    { "boxUL;", "╝" },
+    { "boxUl;", "╜" },
+    { "boxuL;", "╛" },
+    { "boxul;", "┘" },
+    { "boxUR;", "╚" },
+    { "boxUr;", "╙" },
+    { "boxuR;", "╘" },
+    { "boxur;", "└" },
+    { "boxV;", "║" },
+    { "boxv;", "│" },
+    { "boxVH;", "╬" },
+    { "boxVh;", "╫" },
+    { "boxvH;", "╪" },
+    { "boxvh;", "┼" },
+    { "boxVL;", "╣" },
+    { "boxVl;", "╢" },
+    { "boxvL;", "╡" },
+    { "boxvl;", "┤" },
+    { "boxVR;", "╠" },
+    { "boxVr;", "╟" },
+    { "boxvR;", "╞" },
+    { "boxvr;", "├" },
+    { "bprime;", "‵" },
+    { "Breve;", "˘" },
+    { "breve;", "˘" },
+    { "brvbar;", "¦" },
+    { "brvbar", "¦" },
+    { "Bscr;", "ℬ" },
+    { "bscr;", "𝒷" },
+    { "bsemi;", "⁏" },
+    { "bsim;", "∽" },
+    { "bsime;", "⋍" },
+    { "bsol;", "\\" },
+    { "bsolb;", "⧅" },
+    { "bsolhsub;", "⟈" },
+    { "bull;", "•" },
+    { "bullet;", "•" },
+    { "bump;", "≎" },
+    { "bumpE;", "⪮" },
+    { "bumpe;", "≏" },
+    { "Bumpeq;", "≎" },
+    { "bumpeq;", "≏" },
+    { "Cacute;", "Ć" },
+    { "cacute;", "ć" },
+    { "Cap;", "⋒" },
+    { "cap;", "∩" },
+    { "capand;", "⩄" },
+    { "capbrcup;", "⩉" },
+    { "capcap;", "⩋" },
+    { "capcup;", "⩇" },
+    { "capdot;", "⩀" },
+    { "CapitalDifferentialD;", "ⅅ" },
+    { "caps;", "∩︀" },
+    { "caret;", "⁁" },
+    { "caron;", "ˇ" },
+    { "Cayleys;", "ℭ" },
+    { "ccaps;", "⩍" },
+    { "Ccaron;", "Č" },
+    { "ccaron;", "č" },
+    { "Ccedil;", "Ç" },
+    { "Ccedil", "Ç" },
+    { "ccedil;", "ç" },
+    { "ccedil", "ç" },
+    { "Ccirc;", "Ĉ" },
+    { "ccirc;", "ĉ" },
+    { "Cconint;", "∰" },
+    { "ccups;", "⩌" },
+    { "ccupssm;", "⩐" },
+    { "Cdot;", "Ċ" },
+    { "cdot;", "ċ" },
+    { "cedil;", "¸" },
+    { "cedil", "¸" },
+    { "Cedilla;", "¸" },
+    { "cemptyv;", "⦲" },
+    { "cent;", "¢" },
+    { "cent", "¢" },
+    { "CenterDot;", "·" },
+    { "centerdot;", "·" },
+    { "Cfr;", "ℭ" },
+    { "cfr;", "𝔠" },
+    { "CHcy;", "Ч" },
+    { "chcy;", "ч" },
+    { "check;", "✓" },
+    { "checkmark;", "✓" },
+    { "Chi;", "Χ" },
+    { "chi;", "χ" },
+    { "cir;", "○" },
+    { "circ;", "ˆ" },
+    { "circeq;", "≗" },
+    { "circlearrowleft;", "↺" },
+    { "circlearrowright;", "↻" },
+    { "circledast;", "⊛" },
+    { "circledcirc;", "⊚" },
+    { "circleddash;", "⊝" },
+    { "CircleDot;", "⊙" },
+    { "circledR;", "®" },
+    { "circledS;", "Ⓢ" },
+    { "CircleMinus;", "⊖" },
+    { "CirclePlus;", "⊕" },
+    { "CircleTimes;", "⊗" },
+    { "cirE;", "⧃" },
+    { "cire;", "≗" },
+    { "cirfnint;", "⨐" },
+    { "cirmid;", "⫯" },
+    { "cirscir;", "⧂" },
+    { "ClockwiseContourIntegral;", "∲" },
+    { "CloseCurlyDoubleQuote;", "”" },
+    { "CloseCurlyQuote;", "’" },
+    { "clubs;", "♣" },
+    { "clubsuit;", "♣" },
+    { "Colon;", "∷" },
+    { "colon;", ":" },
+    { "Colone;", "⩴" },
+    { "colone;", "≔" },
+    { "coloneq;", "≔" },
+    { "comma;", "," },
+    { "commat;", "@" },
+    { "comp;", "∁" },
+    { "compfn;", "∘" },
+    { "complement;", "∁" },
+    { "complexes;", "ℂ" },
+    { "cong;", "≅" },
+    { "congdot;", "⩭" },
+    { "Congruent;", "≡" },
+    { "Conint;", "∯" },
+    { "conint;", "∮" },
+    { "ContourIntegral;", "∮" },
+    { "Copf;", "ℂ" },
+    { "copf;", "𝕔" },
+    { "coprod;", "∐" },
+    { "Coproduct;", "∐" },
+    { "COPY;", "©" },
+    { "COPY", "©" },
+    { "copy;", "©" },
+    { "copy", "©" },
+    { "copysr;", "℗" },
+    { "CounterClockwiseContourIntegral;", "∳" },
+    { "crarr;", "↵" },
+    { "Cross;", "⨯" },
+    { "cross;", "✗" },
+    { "Cscr;", "𝒞" },
+    { "cscr;", "𝒸" },
+    { "csub;", "⫏" },
+    { "csube;", "⫑" },
+    { "csup;", "⫐" },
+    { "csupe;", "⫒" },
+    { "ctdot;", "⋯" },
+    { "cudarrl;", "⤸" },
+    { "cudarrr;", "⤵" },
+    { "cuepr;", "⋞" },
+    { "cuesc;", "⋟" },
+    { "cularr;", "↶" },
+    { "cularrp;", "⤽" },
+    { "Cup;", "⋓" },
+    { "cup;", "∪" },
+    { "cupbrcap;", "⩈" },
+    { "CupCap;", "≍" },
+    { "cupcap;", "⩆" },
+    { "cupcup;", "⩊" },
+    { "cupdot;", "⊍" },
+    { "cupor;", "⩅" },
+    { "cups;", "∪︀" },
+    { "curarr;", "↷" },
+    { "curarrm;", "⤼" },
+    { "curlyeqprec;", "⋞" },
+    { "curlyeqsucc;", "⋟" },
+    { "curlyvee;", "⋎" },
+    { "curlywedge;", "⋏" },
+    { "curren;", "¤" },
+    { "curren", "¤" },
+    { "curvearrowleft;", "↶" },
+    { "curvearrowright;", "↷" },
+    { "cuvee;", "⋎" },
+    { "cuwed;", "⋏" },
+    { "cwconint;", "∲" },
+    { "cwint;", "∱" },
+    { "cylcty;", "⌭" },
+    { "Dagger;", "‡" },
+    { "dagger;", "†" },
+    { "daleth;", "ℸ" },
+    { "Darr;", "↡" },
+    { "dArr;", "⇓" },
+    { "darr;", "↓" },
+    { "dash;", "‐" },
+    { "Dashv;", "⫤" },
+    { "dashv;", "⊣" },
+    { "dbkarow;", "⤏" },
+    { "dblac;", "˝" },
+    { "Dcaron;", "Ď" },
+    { "dcaron;", "ď" },
+    { "Dcy;", "Д" },
+    { "dcy;", "д" },
+    { "DD;", "ⅅ" },
+    { "dd;", "ⅆ" },
+    { "ddagger;", "‡" },
+    { "ddarr;", "⇊" },
+    { "DDotrahd;", "⤑" },
+    { "ddotseq;", "⩷" },
+    { "deg;", "°" },
+    { "deg", "°" },
+    { "Del;", "∇" },
+    { "Delta;", "Δ" },
+    { "delta;", "δ" },
+    { "demptyv;", "⦱" },
+    { "dfisht;", "⥿" },
+    { "Dfr;", "𝔇" },
+    { "dfr;", "𝔡" },
+    { "dHar;", "⥥" },
+    { "dharl;", "⇃" },
+    { "dharr;", "⇂" },
+    { "DiacriticalAcute;", "´" },
+    { "DiacriticalDot;", "˙" },
+    { "DiacriticalDoubleAcute;", "˝" },
+    { "DiacriticalGrave;", "`" },
+    { "DiacriticalTilde;", "˜" },
+    { "diam;", "⋄" },
+    { "Diamond;", "⋄" },
+    { "diamond;", "⋄" },
+    { "diamondsuit;", "♦" },
+    { "diams;", "♦" },
+    { "die;", "¨" },
+    { "DifferentialD;", "ⅆ" },
+    { "digamma;", "ϝ" },
+    { "disin;", "⋲" },
+    { "div;", "÷" },
+    { "divide;", "÷" },
+    { "divide", "÷" },
+    { "divideontimes;", "⋇" },
+    { "divonx;", "⋇" },
+    { "DJcy;", "Ђ" },
+    { "djcy;", "ђ" },
+    { "dlcorn;", "⌞" },
+    { "dlcrop;", "⌍" },
+    { "dollar;", "$" },
+    { "Dopf;", "𝔻" },
+    { "dopf;", "𝕕" },
+    { "Dot;", "¨" },
+    { "dot;", "˙" },
+    { "DotDot;", "◌⃜" },
+    { "doteq;", "≐" },
+    { "doteqdot;", "≑" },
+    { "DotEqual;", "≐" },
+    { "dotminus;", "∸" },
+    { "dotplus;", "∔" },
+    { "dotsquare;", "⊡" },
+    { "doublebarwedge;", "⌆" },
+    { "DoubleContourIntegral;", "∯" },
+    { "DoubleDot;", "¨" },
+    { "DoubleDownArrow;", "⇓" },
+    { "DoubleLeftArrow;", "⇐" },
+    { "DoubleLeftRightArrow;", "⇔" },
+    { "DoubleLeftTee;", "⫤" },
+    { "DoubleLongLeftArrow;", "⟸" },
+    { "DoubleLongLeftRightArrow;", "⟺" },
+    { "DoubleLongRightArrow;", "⟹" },
+    { "DoubleRightArrow;", "⇒" },
+    { "DoubleRightTee;", "⊨" },
+    { "DoubleUpArrow;", "⇑" },
+    { "DoubleUpDownArrow;", "⇕" },
+    { "DoubleVerticalBar;", "∥" },
+    { "DownArrow;", "↓" },
+    { "Downarrow;", "⇓" },
+    { "downarrow;", "↓" },
+    { "DownArrowBar;", "⤓" },
+    { "DownArrowUpArrow;", "⇵" },
+    { "DownBreve;", "◌̑" },
+    { "downdownarrows;", "⇊" },
+    { "downharpoonleft;", "⇃" },
+    { "downharpoonright;", "⇂" },
+    { "DownLeftRightVector;", "⥐" },
+    { "DownLeftTeeVector;", "⥞" },
+    { "DownLeftVector;", "↽" },
+    { "DownLeftVectorBar;", "⥖" },
+    { "DownRightTeeVector;", "⥟" },
+    { "DownRightVector;", "⇁" },
+    { "DownRightVectorBar;", "⥗" },
+    { "DownTee;", "⊤" },
+    { "DownTeeArrow;", "↧" },
+    { "drbkarow;", "⤐" },
+    { "drcorn;", "⌟" },
+    { "drcrop;", "⌌" },
+    { "Dscr;", "𝒟" },
+    { "dscr;", "𝒹" },
+    { "DScy;", "Ѕ" },
+    { "dscy;", "ѕ" },
+    { "dsol;", "⧶" },
+    { "Dstrok;", "Đ" },
+    { "dstrok;", "đ" },
+    { "dtdot;", "⋱" },
+    { "dtri;", "▿" },
+    { "dtrif;", "▾" },
+    { "duarr;", "⇵" },
+    { "duhar;", "⥯" },
+    { "dwangle;", "⦦" },
+    { "DZcy;", "Џ" },
+    { "dzcy;", "џ" },
+    { "dzigrarr;", "⟿" },
+    { "Eacute;", "É" },
+    { "Eacute", "É" },
+    { "eacute;", "é" },
+    { "eacute", "é" },
+    { "easter;", "⩮" },
+    { "Ecaron;", "Ě" },
+    { "ecaron;", "ě" },
+    { "ecir;", "≖" },
+    { "Ecirc;", "Ê" },
+    { "Ecirc", "Ê" },
+    { "ecirc;", "ê" },
+    { "ecirc", "ê" },
+    { "ecolon;", "≕" },
+    { "Ecy;", "Э" },
+    { "ecy;", "э" },
+    { "eDDot;", "⩷" },
+    { "Edot;", "Ė" },
+    { "eDot;", "≑" },
+    { "edot;", "ė" },
+    { "ee;", "ⅇ" },
+    { "efDot;", "≒" },
+    { "Efr;", "𝔈" },
+    { "efr;", "𝔢" },
+    { "eg;", "⪚" },
+    { "Egrave;", "È" },
+    { "Egrave", "È" },
+    { "egrave;", "è" },
+    { "egrave", "è" },
+    { "egs;", "⪖" },
+    { "egsdot;", "⪘" },
+    { "el;", "⪙" },
+    { "Element;", "∈" },
+    { "elinters;", "⏧" },
+    { "ell;", "ℓ" },
+    { "els;", "⪕" },
+    { "elsdot;", "⪗" },
+    { "Emacr;", "Ē" },
+    { "emacr;", "ē" },
+    { "empty;", "∅" },
+    { "emptyset;", "∅" },
+    { "EmptySmallSquare;", "◻" },
+    { "emptyv;", "∅" },
+    { "EmptyVerySmallSquare;", "▫" },
+    { "emsp;", " " },
+    { "emsp13;", " " },
+    { "emsp14;", " " },
+    { "ENG;", "Ŋ" },
+    { "eng;", "ŋ" },
+    { "ensp;", " " },
+    { "Eogon;", "Ę" },
+    { "eogon;", "ę" },
+    { "Eopf;", "𝔼" },
+    { "eopf;", "𝕖" },
+    { "epar;", "⋕" },
+    { "eparsl;", "⧣" },
+    { "eplus;", "⩱" },
+    { "epsi;", "ε" },
+    { "Epsilon;", "Ε" },
+    { "epsilon;", "ε" },
+    { "epsiv;", "ϵ" },
+    { "eqcirc;", "≖" },
+    { "eqcolon;", "≕" },
+    { "eqsim;", "≂" },
+    { "eqslantgtr;", "⪖" },
+    { "eqslantless;", "⪕" },
+    { "Equal;", "⩵" },
+    { "equals;", "=" },
+    { "EqualTilde;", "≂" },
+    { "equest;", "≟" },
+    { "Equilibrium;", "⇌" },
+    { "equiv;", "≡" },
+    { "equivDD;", "⩸" },
+    { "eqvparsl;", "⧥" },
+    { "erarr;", "⥱" },
+    { "erDot;", "≓" },
+    { "Escr;", "ℰ" },
+    { "escr;", "ℯ" },
+    { "esdot;", "≐" },
+    { "Esim;", "⩳" },
+    { "esim;", "≂" },
+    { "Eta;", "Η" },
+    { "eta;", "η" },
+    { "ETH;", "Ð" },
+    { "ETH", "Ð" },
+    { "eth;", "ð" },
+    { "eth", "ð" },
+    { "Euml;", "Ë" },
+    { "Euml", "Ë" },
+    { "euml;", "ë" },
+    { "euml", "ë" },
+    { "euro;", "€" },
+    { "excl;", "!" },
+    { "exist;", "∃" },
+    { "Exists;", "∃" },
+    { "expectation;", "ℰ" },
+    { "ExponentialE;", "ⅇ" },
+    { "exponentiale;", "ⅇ" },
+    { "fallingdotseq;", "≒" },
+    { "Fcy;", "Ф" },
+    { "fcy;", "ф" },
+    { "female;", "♀" },
+    { "ffilig;", "ffi" },
+    { "fflig;", "ff" },
+    { "ffllig;", "ffl" },
+    { "Ffr;", "𝔉" },
+    { "ffr;", "𝔣" },
+    { "filig;", "fi" },
+    { "FilledSmallSquare;", "◼" },
+    { "FilledVerySmallSquare;", "▪" },
+    { "fjlig;", "fj" },
+    { "flat;", "♭" },
+    { "fllig;", "fl" },
+    { "fltns;", "▱" },
+    { "fnof;", "ƒ" },
+    { "Fopf;", "𝔽" },
+    { "fopf;", "𝕗" },
+    { "ForAll;", "∀" },
+    { "forall;", "∀" },
+    { "fork;", "⋔" },
+    { "forkv;", "⫙" },
+    { "Fouriertrf;", "ℱ" },
+    { "fpartint;", "⨍" },
+    { "frac12;", "½" },
+    { "frac12", "½" },
+    { "frac13;", "⅓" },
+    { "frac14;", "¼" },
+    { "frac14", "¼" },
+    { "frac15;", "⅕" },
+    { "frac16;", "⅙" },
+    { "frac18;", "⅛" },
+    { "frac23;", "⅔" },
+    { "frac25;", "⅖" },
+    { "frac34;", "¾" },
+    { "frac34", "¾" },
+    { "frac35;", "⅗" },
+    { "frac38;", "⅜" },
+    { "frac45;", "⅘" },
+    { "frac56;", "⅚" },
+    { "frac58;", "⅝" },
+    { "frac78;", "⅞" },
+    { "frasl;", "⁄" },
+    { "frown;", "⌢" },
+    { "Fscr;", "ℱ" },
+    { "fscr;", "𝒻" },
+    { "gacute;", "ǵ" },
+    { "Gamma;", "Γ" },
+    { "gamma;", "γ" },
+    { "Gammad;", "Ϝ" },
+    { "gammad;", "ϝ" },
+    { "gap;", "⪆" },
+    { "Gbreve;", "Ğ" },
+    { "gbreve;", "ğ" },
+    { "Gcedil;", "Ģ" },
+    { "Gcirc;", "Ĝ" },
+    { "gcirc;", "ĝ" },
+    { "Gcy;", "Г" },
+    { "gcy;", "г" },
+    { "Gdot;", "Ġ" },
+    { "gdot;", "ġ" },
+    { "gE;", "≧" },
+    { "ge;", "≥" },
+    { "gEl;", "⪌" },
+    { "gel;", "⋛" },
+    { "geq;", "≥" },
+    { "geqq;", "≧" },
+    { "geqslant;", "⩾" },
+    { "ges;", "⩾" },
+    { "gescc;", "⪩" },
+    { "gesdot;", "⪀" },
+    { "gesdoto;", "⪂" },
+    { "gesdotol;", "⪄" },
+    { "gesl;", "⋛︀" },
+    { "gesles;", "⪔" },
+    { "Gfr;", "𝔊" },
+    { "gfr;", "𝔤" },
+    { "Gg;", "⋙" },
+    { "gg;", "≫" },
+    { "ggg;", "⋙" },
+    { "gimel;", "ℷ" },
+    { "GJcy;", "Ѓ" },
+    { "gjcy;", "ѓ" },
+    { "gl;", "≷" },
+    { "gla;", "⪥" },
+    { "glE;", "⪒" },
+    { "glj;", "⪤" },
+    { "gnap;", "⪊" },
+    { "gnapprox;", "⪊" },
+    { "gnE;", "≩" },
+    { "gne;", "⪈" },
+    { "gneq;", "⪈" },
+    { "gneqq;", "≩" },
+    { "gnsim;", "⋧" },
+    { "Gopf;", "𝔾" },
+    { "gopf;", "𝕘" },
+    { "grave;", "`" },
+    { "GreaterEqual;", "≥" },
+    { "GreaterEqualLess;", "⋛" },
+    { "GreaterFullEqual;", "≧" },
+    { "GreaterGreater;", "⪢" },
+    { "GreaterLess;", "≷" },
+    { "GreaterSlantEqual;", "⩾" },
+    { "GreaterTilde;", "≳" },
+    { "Gscr;", "𝒢" },
+    { "gscr;", "ℊ" },
+    { "gsim;", "≳" },
+    { "gsime;", "⪎" },
+    { "gsiml;", "⪐" },
+    { "GT;", ">" },
+    { "GT", ">" },
+    { "Gt;", "≫" },
+    { "gt;", ">" },
+    { "gt", ">" },
+    { "gtcc;", "⪧" },
+    { "gtcir;", "⩺" },
+    { "gtdot;", "⋗" },
+    { "gtlPar;", "⦕" },
+    { "gtquest;", "⩼" },
+    { "gtrapprox;", "⪆" },
+    { "gtrarr;", "⥸" },
+    { "gtrdot;", "⋗" },
+    { "gtreqless;", "⋛" },
+    { "gtreqqless;", "⪌" },
+    { "gtrless;", "≷" },
+    { "gtrsim;", "≳" },
+    { "gvertneqq;", "≩︀" },
+    { "gvnE;", "≩︀" },
+    { "Hacek;", "ˇ" },
+    { "hairsp;", " " },
+    { "half;", "½" },
+    { "hamilt;", "ℋ" },
+    { "HARDcy;", "Ъ" },
+    { "hardcy;", "ъ" },
+    { "hArr;", "⇔" },
+    { "harr;", "↔" },
+    { "harrcir;", "⥈" },
+    { "harrw;", "↭" },
+    { "Hat;", "^" },
+    { "hbar;", "ℏ" },
+    { "Hcirc;", "Ĥ" },
+    { "hcirc;", "ĥ" },
+    { "hearts;", "♥" },
+    { "heartsuit;", "♥" },
+    { "hellip;", "…" },
+    { "hercon;", "⊹" },
+    { "Hfr;", "ℌ" },
+    { "hfr;", "𝔥" },
+    { "HilbertSpace;", "ℋ" },
+    { "hksearow;", "⤥" },
+    { "hkswarow;", "⤦" },
+    { "hoarr;", "⇿" },
+    { "homtht;", "∻" },
+    { "hookleftarrow;", "↩" },
+    { "hookrightarrow;", "↪" },
+    { "Hopf;", "ℍ" },
+    { "hopf;", "𝕙" },
+    { "horbar;", "―" },
+    { "HorizontalLine;", "─" },
+    { "Hscr;", "ℋ" },
+    { "hscr;", "𝒽" },
+    { "hslash;", "ℏ" },
+    { "Hstrok;", "Ħ" },
+    { "hstrok;", "ħ" },
+    { "HumpDownHump;", "≎" },
+    { "HumpEqual;", "≏" },
+    { "hybull;", "⁃" },
+    { "hyphen;", "‐" },
+    { "Iacute;", "Í" },
+    { "Iacute", "Í" },
+    { "iacute;", "í" },
+    { "iacute", "í" },
+    { "ic;", "⁣" },
+    { "Icirc;", "Î" },
+    { "Icirc", "Î" },
+    { "icirc;", "î" },
+    { "icirc", "î" },
+    { "Icy;", "И" },
+    { "icy;", "и" },
+    { "Idot;", "İ" },
+    { "IEcy;", "Е" },
+    { "iecy;", "е" },
+    { "iexcl;", "¡" },
+    { "iexcl", "¡" },
+    { "iff;", "⇔" },
+    { "Ifr;", "ℑ" },
+    { "ifr;", "𝔦" },
+    { "Igrave;", "Ì" },
+    { "Igrave", "Ì" },
+    { "igrave;", "ì" },
+    { "igrave", "ì" },
+    { "ii;", "ⅈ" },
+    { "iiiint;", "⨌" },
+    { "iiint;", "∭" },
+    { "iinfin;", "⧜" },
+    { "iiota;", "℩" },
+    { "IJlig;", "IJ" },
+    { "ijlig;", "ij" },
+    { "Im;", "ℑ" },
+    { "Imacr;", "Ī" },
+    { "imacr;", "ī" },
+    { "image;", "ℑ" },
+    { "ImaginaryI;", "ⅈ" },
+    { "imagline;", "ℐ" },
+    { "imagpart;", "ℑ" },
+    { "imath;", "ı" },
+    { "imof;", "⊷" },
+    { "imped;", "Ƶ" },
+    { "Implies;", "⇒" },
+    { "in;", "∈" },
+    { "incare;", "℅" },
+    { "infin;", "∞" },
+    { "infintie;", "⧝" },
+    { "inodot;", "ı" },
+    { "Int;", "∬" },
+    { "int;", "∫" },
+    { "intcal;", "⊺" },
+    { "integers;", "ℤ" },
+    { "Integral;", "∫" },
+    { "intercal;", "⊺" },
+    { "Intersection;", "⋂" },
+    { "intlarhk;", "⨗" },
+    { "intprod;", "⨼" },
+    { "InvisibleComma;", "⁣" },
+    { "InvisibleTimes;", "⁢" },
+    { "IOcy;", "Ё" },
+    { "iocy;", "ё" },
+    { "Iogon;", "Į" },
+    { "iogon;", "į" },
+    { "Iopf;", "𝕀" },
+    { "iopf;", "𝕚" },
+    { "Iota;", "Ι" },
+    { "iota;", "ι" },
+    { "iprod;", "⨼" },
+    { "iquest;", "¿" },
+    { "iquest", "¿" },
+    { "Iscr;", "ℐ" },
+    { "iscr;", "𝒾" },
+    { "isin;", "∈" },
+    { "isindot;", "⋵" },
+    { "isinE;", "⋹" },
+    { "isins;", "⋴" },
+    { "isinsv;", "⋳" },
+    { "isinv;", "∈" },
+    { "it;", "⁢" },
+    { "Itilde;", "Ĩ" },
+    { "itilde;", "ĩ" },
+    { "Iukcy;", "І" },
+    { "iukcy;", "і" },
+    { "Iuml;", "Ï" },
+    { "Iuml", "Ï" },
+    { "iuml;", "ï" },
+    { "iuml", "ï" },
+    { "Jcirc;", "Ĵ" },
+    { "jcirc;", "ĵ" },
+    { "Jcy;", "Й" },
+    { "jcy;", "й" },
+    { "Jfr;", "𝔍" },
+    { "jfr;", "𝔧" },
+    { "jmath;", "ȷ" },
+    { "Jopf;", "𝕁" },
+    { "jopf;", "𝕛" },
+    { "Jscr;", "𝒥" },
+    { "jscr;", "𝒿" },
+    { "Jsercy;", "Ј" },
+    { "jsercy;", "ј" },
+    { "Jukcy;", "Є" },
+    { "jukcy;", "є" },
+    { "Kappa;", "Κ" },
+    { "kappa;", "κ" },
+    { "kappav;", "ϰ" },
+    { "Kcedil;", "Ķ" },
+    { "kcedil;", "ķ" },
+    { "Kcy;", "К" },
+    { "kcy;", "к" },
+    { "Kfr;", "𝔎" },
+    { "kfr;", "𝔨" },
+    { "kgreen;", "ĸ" },
+    { "KHcy;", "Х" },
+    { "khcy;", "х" },
+    { "KJcy;", "Ќ" },
+    { "kjcy;", "ќ" },
+    { "Kopf;", "𝕂" },
+    { "kopf;", "𝕜" },
+    { "Kscr;", "𝒦" },
+    { "kscr;", "𝓀" },
+    { "lAarr;", "⇚" },
+    { "Lacute;", "Ĺ" },
+    { "lacute;", "ĺ" },
+    { "laemptyv;", "⦴" },
+    { "lagran;", "ℒ" },
+    { "Lambda;", "Λ" },
+    { "lambda;", "λ" },
+    { "Lang;", "⟪" },
+    { "lang;", "⟨" },
+    { "langd;", "⦑" },
+    { "langle;", "⟨" },
+    { "lap;", "⪅" },
+    { "Laplacetrf;", "ℒ" },
+    { "laquo;", "«" },
+    { "laquo", "«" },
+    { "Larr;", "↞" },
+    { "lArr;", "⇐" },
+    { "larr;", "←" },
+    { "larrb;", "⇤" },
+    { "larrbfs;", "⤟" },
+    { "larrfs;", "⤝" },
+    { "larrhk;", "↩" },
+    { "larrlp;", "↫" },
+    { "larrpl;", "⤹" },
+    { "larrsim;", "⥳" },
+    { "larrtl;", "↢" },
+    { "lat;", "⪫" },
+    { "lAtail;", "⤛" },
+    { "latail;", "⤙" },
+    { "late;", "⪭" },
+    { "lates;", "⪭︀" },
+    { "lBarr;", "⤎" },
+    { "lbarr;", "⤌" },
+    { "lbbrk;", "❲" },
+    { "lbrace;", "{" },
+    { "lbrack;", "[" },
+    { "lbrke;", "⦋" },
+    { "lbrksld;", "⦏" },
+    { "lbrkslu;", "⦍" },
+    { "Lcaron;", "Ľ" },
+    { "lcaron;", "ľ" },
+    { "Lcedil;", "Ļ" },
+    { "lcedil;", "ļ" },
+    { "lceil;", "⌈" },
+    { "lcub;", "{" },
+    { "Lcy;", "Л" },
+    { "lcy;", "л" },
+    { "ldca;", "⤶" },
+    { "ldquo;", "“" },
+    { "ldquor;", "„" },
+    { "ldrdhar;", "⥧" },
+    { "ldrushar;", "⥋" },
+    { "ldsh;", "↲" },
+    { "lE;", "≦" },
+    { "le;", "≤" },
+    { "LeftAngleBracket;", "⟨" },
+    { "LeftArrow;", "←" },
+    { "Leftarrow;", "⇐" },
+    { "leftarrow;", "←" },
+    { "LeftArrowBar;", "⇤" },
+    { "LeftArrowRightArrow;", "⇆" },
+    { "leftarrowtail;", "↢" },
+    { "LeftCeiling;", "⌈" },
+    { "LeftDoubleBracket;", "⟦" },
+    { "LeftDownTeeVector;", "⥡" },
+    { "LeftDownVector;", "⇃" },
+    { "LeftDownVectorBar;", "⥙" },
+    { "LeftFloor;", "⌊" },
+    { "leftharpoondown;", "↽" },
+    { "leftharpoonup;", "↼" },
+    { "leftleftarrows;", "⇇" },
+    { "LeftRightArrow;", "↔" },
+    { "Leftrightarrow;", "⇔" },
+    { "leftrightarrow;", "↔" },
+    { "leftrightarrows;", "⇆" },
+    { "leftrightharpoons;", "⇋" },
+    { "leftrightsquigarrow;", "↭" },
+    { "LeftRightVector;", "⥎" },
+    { "LeftTee;", "⊣" },
+    { "LeftTeeArrow;", "↤" },
+    { "LeftTeeVector;", "⥚" },
+    { "leftthreetimes;", "⋋" },
+    { "LeftTriangle;", "⊲" },
+    { "LeftTriangleBar;", "⧏" },
+    { "LeftTriangleEqual;", "⊴" },
+    { "LeftUpDownVector;", "⥑" },
+    { "LeftUpTeeVector;", "⥠" },
+    { "LeftUpVector;", "↿" },
+    { "LeftUpVectorBar;", "⥘" },
+    { "LeftVector;", "↼" },
+    { "LeftVectorBar;", "⥒" },
+    { "lEg;", "⪋" },
+    { "leg;", "⋚" },
+    { "leq;", "≤" },
+    { "leqq;", "≦" },
+    { "leqslant;", "⩽" },
+    { "les;", "⩽" },
+    { "lescc;", "⪨" },
+    { "lesdot;", "⩿" },
+    { "lesdoto;", "⪁" },
+    { "lesdotor;", "⪃" },
+    { "lesg;", "⋚︀" },
+    { "lesges;", "⪓" },
+    { "lessapprox;", "⪅" },
+    { "lessdot;", "⋖" },
+    { "lesseqgtr;", "⋚" },
+    { "lesseqqgtr;", "⪋" },
+    { "LessEqualGreater;", "⋚" },
+    { "LessFullEqual;", "≦" },
+    { "LessGreater;", "≶" },
+    { "lessgtr;", "≶" },
+    { "LessLess;", "⪡" },
+    { "lesssim;", "≲" },
+    { "LessSlantEqual;", "⩽" },
+    { "LessTilde;", "≲" },
+    { "lfisht;", "⥼" },
+    { "lfloor;", "⌊" },
+    { "Lfr;", "𝔏" },
+    { "lfr;", "𝔩" },
+    { "lg;", "≶" },
+    { "lgE;", "⪑" },
+    { "lHar;", "⥢" },
+    { "lhard;", "↽" },
+    { "lharu;", "↼" },
+    { "lharul;", "⥪" },
+    { "lhblk;", "▄" },
+    { "LJcy;", "Љ" },
+    { "ljcy;", "љ" },
+    { "Ll;", "⋘" },
+    { "ll;", "≪" },
+    { "llarr;", "⇇" },
+    { "llcorner;", "⌞" },
+    { "Lleftarrow;", "⇚" },
+    { "llhard;", "⥫" },
+    { "lltri;", "◺" },
+    { "Lmidot;", "Ŀ" },
+    { "lmidot;", "ŀ" },
+    { "lmoust;", "⎰" },
+    { "lmoustache;", "⎰" },
+    { "lnap;", "⪉" },
+    { "lnapprox;", "⪉" },
+    { "lnE;", "≨" },
+    { "lne;", "⪇" },
+    { "lneq;", "⪇" },
+    { "lneqq;", "≨" },
+    { "lnsim;", "⋦" },
+    { "loang;", "⟬" },
+    { "loarr;", "⇽" },
+    { "lobrk;", "⟦" },
+    { "LongLeftArrow;", "⟵" },
+    { "Longleftarrow;", "⟸" },
+    { "longleftarrow;", "⟵" },
+    { "LongLeftRightArrow;", "⟷" },
+    { "Longleftrightarrow;", "⟺" },
+    { "longleftrightarrow;", "⟷" },
+    { "longmapsto;", "⟼" },
+    { "LongRightArrow;", "⟶" },
+    { "Longrightarrow;", "⟹" },
+    { "longrightarrow;", "⟶" },
+    { "looparrowleft;", "↫" },
+    { "looparrowright;", "↬" },
+    { "lopar;", "⦅" },
+    { "Lopf;", "𝕃" },
+    { "lopf;", "𝕝" },
+    { "loplus;", "⨭" },
+    { "lotimes;", "⨴" },
+    { "lowast;", "∗" },
+    { "lowbar;", "_" },
+    { "LowerLeftArrow;", "↙" },
+    { "LowerRightArrow;", "↘" },
+    { "loz;", "◊" },
+    { "lozenge;", "◊" },
+    { "lozf;", "⧫" },
+    { "lpar;", "(" },
+    { "lparlt;", "⦓" },
+    { "lrarr;", "⇆" },
+    { "lrcorner;", "⌟" },
+    { "lrhar;", "⇋" },
+    { "lrhard;", "⥭" },
+    { "lrm;", "‎" },
+    { "lrtri;", "⊿" },
+    { "lsaquo;", "‹" },
+    { "Lscr;", "ℒ" },
+    { "lscr;", "𝓁" },
+    { "Lsh;", "↰" },
+    { "lsh;", "↰" },
+    { "lsim;", "≲" },
+    { "lsime;", "⪍" },
+    { "lsimg;", "⪏" },
+    { "lsqb;", "[" },
+    { "lsquo;", "‘" },
+    { "lsquor;", "‚" },
+    { "Lstrok;", "Ł" },
+    { "lstrok;", "ł" },
+    { "LT;", "<" },
+    { "LT", "<" },
+    { "Lt;", "≪" },
+    { "lt;", "<" },
+    { "lt", "<" },
+    { "ltcc;", "⪦" },
+    { "ltcir;", "⩹" },
+    { "ltdot;", "⋖" },
+    { "lthree;", "⋋" },
+    { "ltimes;", "⋉" },
+    { "ltlarr;", "⥶" },
+    { "ltquest;", "⩻" },
+    { "ltri;", "◃" },
+    { "ltrie;", "⊴" },
+    { "ltrif;", "◂" },
+    { "ltrPar;", "⦖" },
+    { "lurdshar;", "⥊" },
+    { "luruhar;", "⥦" },
+    { "lvertneqq;", "≨︀" },
+    { "lvnE;", "≨︀" },
+    { "macr;", "¯" },
+    { "macr", "¯" },
+    { "male;", "♂" },
+    { "malt;", "✠" },
+    { "maltese;", "✠" },
+    { "Map;", "⤅" },
+    { "map;", "↦" },
+    { "mapsto;", "↦" },
+    { "mapstodown;", "↧" },
+    { "mapstoleft;", "↤" },
+    { "mapstoup;", "↥" },
+    { "marker;", "▮" },
+    { "mcomma;", "⨩" },
+    { "Mcy;", "М" },
+    { "mcy;", "м" },
+    { "mdash;", "—" },
+    { "mDDot;", "∺" },
+    { "measuredangle;", "∡" },
+    { "MediumSpace;", " " },
+    { "Mellintrf;", "ℳ" },
+    { "Mfr;", "𝔐" },
+    { "mfr;", "𝔪" },
+    { "mho;", "℧" },
+    { "micro;", "µ" },
+    { "micro", "µ" },
+    { "mid;", "∣" },
+    { "midast;", "*" },
+    { "midcir;", "⫰" },
+    { "middot;", "·" },
+    { "middot", "·" },
+    { "minus;", "−" },
+    { "minusb;", "⊟" },
+    { "minusd;", "∸" },
+    { "minusdu;", "⨪" },
+    { "MinusPlus;", "∓" },
+    { "mlcp;", "⫛" },
+    { "mldr;", "…" },
+    { "mnplus;", "∓" },
+    { "models;", "⊧" },
+    { "Mopf;", "𝕄" },
+    { "mopf;", "𝕞" },
+    { "mp;", "∓" },
+    { "Mscr;", "ℳ" },
+    { "mscr;", "𝓂" },
+    { "mstpos;", "∾" },
+    { "Mu;", "Μ" },
+    { "mu;", "μ" },
+    { "multimap;", "⊸" },
+    { "mumap;", "⊸" },
+    { "nabla;", "∇" },
+    { "Nacute;", "Ń" },
+    { "nacute;", "ń" },
+    { "nang;", "∠⃒" },
+    { "nap;", "≉" },
+    { "napE;", "⩰̸" },
+    { "napid;", "≋̸" },
+    { "napos;", "ʼn" },
+    { "napprox;", "≉" },
+    { "natur;", "♮" },
+    { "natural;", "♮" },
+    { "naturals;", "ℕ" },
+    { "nbsp;", " " },
+    { "nbsp", " " },
+    { "nbump;", "≎̸" },
+    { "nbumpe;", "≏̸" },
+    { "ncap;", "⩃" },
+    { "Ncaron;", "Ň" },
+    { "ncaron;", "ň" },
+    { "Ncedil;", "Ņ" },
+    { "ncedil;", "ņ" },
+    { "ncong;", "≇" },
+    { "ncongdot;", "⩭̸" },
+    { "ncup;", "⩂" },
+    { "Ncy;", "Н" },
+    { "ncy;", "н" },
+    { "ndash;", "–" },
+    { "ne;", "≠" },
+    { "nearhk;", "⤤" },
+    { "neArr;", "⇗" },
+    { "nearr;", "↗" },
+    { "nearrow;", "↗" },
+    { "nedot;", "≐̸" },
+    { "NegativeMediumSpace;", "​" },
+    { "NegativeThickSpace;", "​" },
+    { "NegativeThinSpace;", "​" },
+    { "NegativeVeryThinSpace;", "​" },
+    { "nequiv;", "≢" },
+    { "nesear;", "⤨" },
+    { "nesim;", "≂̸" },
+    { "NestedGreaterGreater;", "≫" },
+    { "NestedLessLess;", "≪" },
+    { "NewLine;", "␊" },
+    { "nexist;", "∄" },
+    { "nexists;", "∄" },
+    { "Nfr;", "𝔑" },
+    { "nfr;", "𝔫" },
+    { "ngE;", "≧̸" },
+    { "nge;", "≱" },
+    { "ngeq;", "≱" },
+    { "ngeqq;", "≧̸" },
+    { "ngeqslant;", "⩾̸" },
+    { "nges;", "⩾̸" },
+    { "nGg;", "⋙̸" },
+    { "ngsim;", "≵" },
+    { "nGt;", "≫⃒" },
+    { "ngt;", "≯" },
+    { "ngtr;", "≯" },
+    { "nGtv;", "≫̸" },
+    { "nhArr;", "⇎" },
+    { "nharr;", "↮" },
+    { "nhpar;", "⫲" },
+    { "ni;", "∋" },
+    { "nis;", "⋼" },
+    { "nisd;", "⋺" },
+    { "niv;", "∋" },
+    { "NJcy;", "Њ" },
+    { "njcy;", "њ" },
+    { "nlArr;", "⇍" },
+    { "nlarr;", "↚" },
+    { "nldr;", "‥" },
+    { "nlE;", "≦̸" },
+    { "nle;", "≰" },
+    { "nLeftarrow;", "⇍" },
+    { "nleftarrow;", "↚" },
+    { "nLeftrightarrow;", "⇎" },
+    { "nleftrightarrow;", "↮" },
+    { "nleq;", "≰" },
+    { "nleqq;", "≦̸" },
+    { "nleqslant;", "⩽̸" },
+    { "nles;", "⩽̸" },
+    { "nless;", "≮" },
+    { "nLl;", "⋘̸" },
+    { "nlsim;", "≴" },
+    { "nLt;", "≪⃒" },
+    { "nlt;", "≮" },
+    { "nltri;", "⋪" },
+    { "nltrie;", "⋬" },
+    { "nLtv;", "≪̸" },
+    { "nmid;", "∤" },
+    { "NoBreak;", "⁠" },
+    { "NonBreakingSpace;", " " },
+    { "Nopf;", "ℕ" },
+    { "nopf;", "𝕟" },
+    { "Not;", "⫬" },
+    { "not;", "¬" },
+    { "not", "¬" },
+    { "NotCongruent;", "≢" },
+    { "NotCupCap;", "≭" },
+    { "NotDoubleVerticalBar;", "∦" },
+    { "NotElement;", "∉" },
+    { "NotEqual;", "≠" },
+    { "NotEqualTilde;", "≂̸" },
+    { "NotExists;", "∄" },
+    { "NotGreater;", "≯" },
+    { "NotGreaterEqual;", "≱" },
+    { "NotGreaterFullEqual;", "≧̸" },
+    { "NotGreaterGreater;", "≫̸" },
+    { "NotGreaterLess;", "≹" },
+    { "NotGreaterSlantEqual;", "⩾̸" },
+    { "NotGreaterTilde;", "≵" },
+    { "NotHumpDownHump;", "≎̸" },
+    { "NotHumpEqual;", "≏̸" },
+    { "notin;", "∉" },
+    { "notindot;", "⋵̸" },
+    { "notinE;", "⋹̸" },
+    { "notinva;", "∉" },
+    { "notinvb;", "⋷" },
+    { "notinvc;", "⋶" },
+    { "NotLeftTriangle;", "⋪" },
+    { "NotLeftTriangleBar;", "⧏̸" },
+    { "NotLeftTriangleEqual;", "⋬" },
+    { "NotLess;", "≮" },
+    { "NotLessEqual;", "≰" },
+    { "NotLessGreater;", "≸" },
+    { "NotLessLess;", "≪̸" },
+    { "NotLessSlantEqual;", "⩽̸" },
+    { "NotLessTilde;", "≴" },
+    { "NotNestedGreaterGreater;", "⪢̸" },
+    { "NotNestedLessLess;", "⪡̸" },
+    { "notni;", "∌" },
+    { "notniva;", "∌" },
+    { "notnivb;", "⋾" },
+    { "notnivc;", "⋽" },
+    { "NotPrecedes;", "⊀" },
+    { "NotPrecedesEqual;", "⪯̸" },
+    { "NotPrecedesSlantEqual;", "⋠" },
+    { "NotReverseElement;", "∌" },
+    { "NotRightTriangle;", "⋫" },
+    { "NotRightTriangleBar;", "⧐̸" },
+    { "NotRightTriangleEqual;", "⋭" },
+    { "NotSquareSubset;", "⊏̸" },
+    { "NotSquareSubsetEqual;", "⋢" },
+    { "NotSquareSuperset;", "⊐̸" },
+    { "NotSquareSupersetEqual;", "⋣" },
+    { "NotSubset;", "⊂⃒" },
+    { "NotSubsetEqual;", "⊈" },
+    { "NotSucceeds;", "⊁" },
+    { "NotSucceedsEqual;", "⪰̸" },
+    { "NotSucceedsSlantEqual;", "⋡" },
+    { "NotSucceedsTilde;", "≿̸" },
+    { "NotSuperset;", "⊃⃒" },
+    { "NotSupersetEqual;", "⊉" },
+    { "NotTilde;", "≁" },
+    { "NotTildeEqual;", "≄" },
+    { "NotTildeFullEqual;", "≇" },
+    { "NotTildeTilde;", "≉" },
+    { "NotVerticalBar;", "∤" },
+    { "npar;", "∦" },
+    { "nparallel;", "∦" },
+    { "nparsl;", "⫽⃥" },
+    { "npart;", "∂̸" },
+    { "npolint;", "⨔" },
+    { "npr;", "⊀" },
+    { "nprcue;", "⋠" },
+    { "npre;", "⪯̸" },
+    { "nprec;", "⊀" },
+    { "npreceq;", "⪯̸" },
+    { "nrArr;", "⇏" },
+    { "nrarr;", "↛" },
+    { "nrarrc;", "⤳̸" },
+    { "nrarrw;", "↝̸" },
+    { "nRightarrow;", "⇏" },
+    { "nrightarrow;", "↛" },
+    { "nrtri;", "⋫" },
+    { "nrtrie;", "⋭" },
+    { "nsc;", "⊁" },
+    { "nsccue;", "⋡" },
+    { "nsce;", "⪰̸" },
+    { "Nscr;", "𝒩" },
+    { "nscr;", "𝓃" },
+    { "nshortmid;", "∤" },
+    { "nshortparallel;", "∦" },
+    { "nsim;", "≁" },
+    { "nsime;", "≄" },
+    { "nsimeq;", "≄" },
+    { "nsmid;", "∤" },
+    { "nspar;", "∦" },
+    { "nsqsube;", "⋢" },
+    { "nsqsupe;", "⋣" },
+    { "nsub;", "⊄" },
+    { "nsubE;", "⫅̸" },
+    { "nsube;", "⊈" },
+    { "nsubset;", "⊂⃒" },
+    { "nsubseteq;", "⊈" },
+    { "nsubseteqq;", "⫅̸" },
+    { "nsucc;", "⊁" },
+    { "nsucceq;", "⪰̸" },
+    { "nsup;", "⊅" },
+    { "nsupE;", "⫆̸" },
+    { "nsupe;", "⊉" },
+    { "nsupset;", "⊃⃒" },
+    { "nsupseteq;", "⊉" },
+    { "nsupseteqq;", "⫆̸" },
+    { "ntgl;", "≹" },
+    { "Ntilde;", "Ñ" },
+    { "Ntilde", "Ñ" },
+    { "ntilde;", "ñ" },
+    { "ntilde", "ñ" },
+    { "ntlg;", "≸" },
+    { "ntriangleleft;", "⋪" },
+    { "ntrianglelefteq;", "⋬" },
+    { "ntriangleright;", "⋫" },
+    { "ntrianglerighteq;", "⋭" },
+    { "Nu;", "Ν" },
+    { "nu;", "ν" },
+    { "num;", "#" },
+    { "numero;", "№" },
+    { "numsp;", " " },
+    { "nvap;", "≍⃒" },
+    { "nVDash;", "⊯" },
+    { "nVdash;", "⊮" },
+    { "nvDash;", "⊭" },
+    { "nvdash;", "⊬" },
+    { "nvge;", "≥⃒" },
+    { "nvgt;", ">⃒" },
+    { "nvHarr;", "⤄" },
+    { "nvinfin;", "⧞" },
+    { "nvlArr;", "⤂" },
+    { "nvle;", "≤⃒" },
+    { "nvlt;", "<⃒" },
+    { "nvltrie;", "⊴⃒" },
+    { "nvrArr;", "⤃" },
+    { "nvrtrie;", "⊵⃒" },
+    { "nvsim;", "∼⃒" },
+    { "nwarhk;", "⤣" },
+    { "nwArr;", "⇖" },
+    { "nwarr;", "↖" },
+    { "nwarrow;", "↖" },
+    { "nwnear;", "⤧" },
+    { "Oacute;", "Ó" },
+    { "Oacute", "Ó" },
+    { "oacute;", "ó" },
+    { "oacute", "ó" },
+    { "oast;", "⊛" },
+    { "ocir;", "⊚" },
+    { "Ocirc;", "Ô" },
+    { "Ocirc", "Ô" },
+    { "ocirc;", "ô" },
+    { "ocirc", "ô" },
+    { "Ocy;", "О" },
+    { "ocy;", "о" },
+    { "odash;", "⊝" },
+    { "Odblac;", "Ő" },
+    { "odblac;", "ő" },
+    { "odiv;", "⨸" },
+    { "odot;", "⊙" },
+    { "odsold;", "⦼" },
+    { "OElig;", "Œ" },
+    { "oelig;", "œ" },
+    { "ofcir;", "⦿" },
+    { "Ofr;", "𝔒" },
+    { "ofr;", "𝔬" },
+    { "ogon;", "˛" },
+    { "Ograve;", "Ò" },
+    { "Ograve", "Ò" },
+    { "ograve;", "ò" },
+    { "ograve", "ò" },
+    { "ogt;", "⧁" },
+    { "ohbar;", "⦵" },
+    { "ohm;", "Ω" },
+    { "oint;", "∮" },
+    { "olarr;", "↺" },
+    { "olcir;", "⦾" },
+    { "olcross;", "⦻" },
+    { "oline;", "‾" },
+    { "olt;", "⧀" },
+    { "Omacr;", "Ō" },
+    { "omacr;", "ō" },
+    { "Omega;", "Ω" },
+    { "omega;", "ω" },
+    { "Omicron;", "Ο" },
+    { "omicron;", "ο" },
+    { "omid;", "⦶" },
+    { "ominus;", "⊖" },
+    { "Oopf;", "𝕆" },
+    { "oopf;", "𝕠" },
+    { "opar;", "⦷" },
+    { "OpenCurlyDoubleQuote;", "“" },
+    { "OpenCurlyQuote;", "‘" },
+    { "operp;", "⦹" },
+    { "oplus;", "⊕" },
+    { "Or;", "⩔" },
+    { "or;", "∨" },
+    { "orarr;", "↻" },
+    { "ord;", "⩝" },
+    { "order;", "ℴ" },
+    { "orderof;", "ℴ" },
+    { "ordf;", "ª" },
+    { "ordf", "ª" },
+    { "ordm;", "º" },
+    { "ordm", "º" },
+    { "origof;", "⊶" },
+    { "oror;", "⩖" },
+    { "orslope;", "⩗" },
+    { "orv;", "⩛" },
+    { "oS;", "Ⓢ" },
+    { "Oscr;", "𝒪" },
+    { "oscr;", "ℴ" },
+    { "Oslash;", "Ø" },
+    { "Oslash", "Ø" },
+    { "oslash;", "ø" },
+    { "oslash", "ø" },
+    { "osol;", "⊘" },
+    { "Otilde;", "Õ" },
+    { "Otilde", "Õ" },
+    { "otilde;", "õ" },
+    { "otilde", "õ" },
+    { "Otimes;", "⨷" },
+    { "otimes;", "⊗" },
+    { "otimesas;", "⨶" },
+    { "Ouml;", "Ö" },
+    { "Ouml", "Ö" },
+    { "ouml;", "ö" },
+    { "ouml", "ö" },
+    { "ovbar;", "⌽" },
+    { "OverBar;", "‾" },
+    { "OverBrace;", "⏞" },
+    { "OverBracket;", "⎴" },
+    { "OverParenthesis;", "⏜" },
+    { "par;", "∥" },
+    { "para;", "¶" },
+    { "para", "¶" },
+    { "parallel;", "∥" },
+    { "parsim;", "⫳" },
+    { "parsl;", "⫽" },
+    { "part;", "∂" },
+    { "PartialD;", "∂" },
+    { "Pcy;", "П" },
+    { "pcy;", "п" },
+    { "percnt;", "%" },
+    { "period;", "." },
+    { "permil;", "‰" },
+    { "perp;", "⊥" },
+    { "pertenk;", "‱" },
+    { "Pfr;", "𝔓" },
+    { "pfr;", "𝔭" },
+    { "Phi;", "Φ" },
+    { "phi;", "φ" },
+    { "phiv;", "ϕ" },
+    { "phmmat;", "ℳ" },
+    { "phone;", "☎" },
+    { "Pi;", "Π" },
+    { "pi;", "π" },
+    { "pitchfork;", "⋔" },
+    { "piv;", "ϖ" },
+    { "planck;", "ℏ" },
+    { "planckh;", "ℎ" },
+    { "plankv;", "ℏ" },
+    { "plus;", "+" },
+    { "plusacir;", "⨣" },
+    { "plusb;", "⊞" },
+    { "pluscir;", "⨢" },
+    { "plusdo;", "∔" },
+    { "plusdu;", "⨥" },
+    { "pluse;", "⩲" },
+    { "PlusMinus;", "±" },
+    { "plusmn;", "±" },
+    { "plusmn", "±" },
+    { "plussim;", "⨦" },
+    { "plustwo;", "⨧" },
+    { "pm;", "±" },
+    { "Poincareplane;", "ℌ" },
+    { "pointint;", "⨕" },
+    { "Popf;", "ℙ" },
+    { "popf;", "𝕡" },
+    { "pound;", "£" },
+    { "pound", "£" },
+    { "Pr;", "⪻" },
+    { "pr;", "≺" },
+    { "prap;", "⪷" },
+    { "prcue;", "≼" },
+    { "prE;", "⪳" },
+    { "pre;", "⪯" },
+    { "prec;", "≺" },
+    { "precapprox;", "⪷" },
+    { "preccurlyeq;", "≼" },
+    { "Precedes;", "≺" },
+    { "PrecedesEqual;", "⪯" },
+    { "PrecedesSlantEqual;", "≼" },
+    { "PrecedesTilde;", "≾" },
+    { "preceq;", "⪯" },
+    { "precnapprox;", "⪹" },
+    { "precneqq;", "⪵" },
+    { "precnsim;", "⋨" },
+    { "precsim;", "≾" },
+    { "Prime;", "″" },
+    { "prime;", "′" },
+    { "primes;", "ℙ" },
+    { "prnap;", "⪹" },
+    { "prnE;", "⪵" },
+    { "prnsim;", "⋨" },
+    { "prod;", "∏" },
+    { "Product;", "∏" },
+    { "profalar;", "⌮" },
+    { "profline;", "⌒" },
+    { "profsurf;", "⌓" },
+    { "prop;", "∝" },
+    { "Proportion;", "∷" },
+    { "Proportional;", "∝" },
+    { "propto;", "∝" },
+    { "prsim;", "≾" },
+    { "prurel;", "⊰" },
+    { "Pscr;", "𝒫" },
+    { "pscr;", "𝓅" },
+    { "Psi;", "Ψ" },
+    { "psi;", "ψ" },
+    { "puncsp;", " " },
+    { "Qfr;", "𝔔" },
+    { "qfr;", "𝔮" },
+    { "qint;", "⨌" },
+    { "Qopf;", "ℚ" },
+    { "qopf;", "𝕢" },
+    { "qprime;", "⁗" },
+    { "Qscr;", "𝒬" },
+    { "qscr;", "𝓆" },
+    { "quaternions;", "ℍ" },
+    { "quatint;", "⨖" },
+    { "quest;", "?" },
+    { "questeq;", "≟" },
+    { "QUOT;", "\"" },
+    { "QUOT", "\"" },
+    { "quot;", "\"" },
+    { "quot", "\"" },
+    { "rAarr;", "⇛" },
+    { "race;", "∽̱" },
+    { "Racute;", "Ŕ" },
+    { "racute;", "ŕ" },
+    { "radic;", "√" },
+    { "raemptyv;", "⦳" },
+    { "Rang;", "⟫" },
+    { "rang;", "⟩" },
+    { "rangd;", "⦒" },
+    { "range;", "⦥" },
+    { "rangle;", "⟩" },
+    { "raquo;", "»" },
+    { "raquo", "»" },
+    { "Rarr;", "↠" },
+    { "rArr;", "⇒" },
+    { "rarr;", "→" },
+    { "rarrap;", "⥵" },
+    { "rarrb;", "⇥" },
+    { "rarrbfs;", "⤠" },
+    { "rarrc;", "⤳" },
+    { "rarrfs;", "⤞" },
+    { "rarrhk;", "↪" },
+    { "rarrlp;", "↬" },
+    { "rarrpl;", "⥅" },
+    { "rarrsim;", "⥴" },
+    { "Rarrtl;", "⤖" },
+    { "rarrtl;", "↣" },
+    { "rarrw;", "↝" },
+    { "rAtail;", "⤜" },
+    { "ratail;", "⤚" },
+    { "ratio;", "∶" },
+    { "rationals;", "ℚ" },
+    { "RBarr;", "⤐" },
+    { "rBarr;", "⤏" },
+    { "rbarr;", "⤍" },
+    { "rbbrk;", "❳" },
+    { "rbrace;", "}" },
+    { "rbrack;", "]" },
+    { "rbrke;", "⦌" },
+    { "rbrksld;", "⦎" },
+    { "rbrkslu;", "⦐" },
+    { "Rcaron;", "Ř" },
+    { "rcaron;", "ř" },
+    { "Rcedil;", "Ŗ" },
+    { "rcedil;", "ŗ" },
+    { "rceil;", "⌉" },
+    { "rcub;", "}" },
+    { "Rcy;", "Р" },
+    { "rcy;", "р" },
+    { "rdca;", "⤷" },
+    { "rdldhar;", "⥩" },
+    { "rdquo;", "”" },
+    { "rdquor;", "”" },
+    { "rdsh;", "↳" },
+    { "Re;", "ℜ" },
+    { "real;", "ℜ" },
+    { "realine;", "ℛ" },
+    { "realpart;", "ℜ" },
+    { "reals;", "ℝ" },
+    { "rect;", "▭" },
+    { "REG;", "®" },
+    { "REG", "®" },
+    { "reg;", "®" },
+    { "reg", "®" },
+    { "ReverseElement;", "∋" },
+    { "ReverseEquilibrium;", "⇋" },
+    { "ReverseUpEquilibrium;", "⥯" },
+    { "rfisht;", "⥽" },
+    { "rfloor;", "⌋" },
+    { "Rfr;", "ℜ" },
+    { "rfr;", "𝔯" },
+    { "rHar;", "⥤" },
+    { "rhard;", "⇁" },
+    { "rharu;", "⇀" },
+    { "rharul;", "⥬" },
+    { "Rho;", "Ρ" },
+    { "rho;", "ρ" },
+    { "rhov;", "ϱ" },
+    { "RightAngleBracket;", "⟩" },
+    { "RightArrow;", "→" },
+    { "Rightarrow;", "⇒" },
+    { "rightarrow;", "→" },
+    { "RightArrowBar;", "⇥" },
+    { "RightArrowLeftArrow;", "⇄" },
+    { "rightarrowtail;", "↣" },
+    { "RightCeiling;", "⌉" },
+    { "RightDoubleBracket;", "⟧" },
+    { "RightDownTeeVector;", "⥝" },
+    { "RightDownVector;", "⇂" },
+    { "RightDownVectorBar;", "⥕" },
+    { "RightFloor;", "⌋" },
+    { "rightharpoondown;", "⇁" },
+    { "rightharpoonup;", "⇀" },
+    { "rightleftarrows;", "⇄" },
+    { "rightleftharpoons;", "⇌" },
+    { "rightrightarrows;", "⇉" },
+    { "rightsquigarrow;", "↝" },
+    { "RightTee;", "⊢" },
+    { "RightTeeArrow;", "↦" },
+    { "RightTeeVector;", "⥛" },
+    { "rightthreetimes;", "⋌" },
+    { "RightTriangle;", "⊳" },
+    { "RightTriangleBar;", "⧐" },
+    { "RightTriangleEqual;", "⊵" },
+    { "RightUpDownVector;", "⥏" },
+    { "RightUpTeeVector;", "⥜" },
+    { "RightUpVector;", "↾" },
+    { "RightUpVectorBar;", "⥔" },
+    { "RightVector;", "⇀" },
+    { "RightVectorBar;", "⥓" },
+    { "ring;", "˚" },
+    { "risingdotseq;", "≓" },
+    { "rlarr;", "⇄" },
+    { "rlhar;", "⇌" },
+    { "rlm;", "‏" },
+    { "rmoust;", "⎱" },
+    { "rmoustache;", "⎱" },
+    { "rnmid;", "⫮" },
+    { "roang;", "⟭" },
+    { "roarr;", "⇾" },
+    { "robrk;", "⟧" },
+    { "ropar;", "⦆" },
+    { "Ropf;", "ℝ" },
+    { "ropf;", "𝕣" },
+    { "roplus;", "⨮" },
+    { "rotimes;", "⨵" },
+    { "RoundImplies;", "⥰" },
+    { "rpar;", ")" },
+    { "rpargt;", "⦔" },
+    { "rppolint;", "⨒" },
+    { "rrarr;", "⇉" },
+    { "Rrightarrow;", "⇛" },
+    { "rsaquo;", "›" },
+    { "Rscr;", "ℛ" },
+    { "rscr;", "𝓇" },
+    { "Rsh;", "↱" },
+    { "rsh;", "↱" },
+    { "rsqb;", "]" },
+    { "rsquo;", "’" },
+    { "rsquor;", "’" },
+    { "rthree;", "⋌" },
+    { "rtimes;", "⋊" },
+    { "rtri;", "▹" },
+    { "rtrie;", "⊵" },
+    { "rtrif;", "▸" },
+    { "rtriltri;", "⧎" },
+    { "RuleDelayed;", "⧴" },
+    { "ruluhar;", "⥨" },
+    { "rx;", "℞" },
+    { "Sacute;", "Ś" },
+    { "sacute;", "ś" },
+    { "sbquo;", "‚" },
+    { "Sc;", "⪼" },
+    { "sc;", "≻" },
+    { "scap;", "⪸" },
+    { "Scaron;", "Š" },
+    { "scaron;", "š" },
+    { "sccue;", "≽" },
+    { "scE;", "⪴" },
+    { "sce;", "⪰" },
+    { "Scedil;", "Ş" },
+    { "scedil;", "ş" },
+    { "Scirc;", "Ŝ" },
+    { "scirc;", "ŝ" },
+    { "scnap;", "⪺" },
+    { "scnE;", "⪶" },
+    { "scnsim;", "⋩" },
+    { "scpolint;", "⨓" },
+    { "scsim;", "≿" },
+    { "Scy;", "С" },
+    { "scy;", "с" },
+    { "sdot;", "⋅" },
+    { "sdotb;", "⊡" },
+    { "sdote;", "⩦" },
+    { "searhk;", "⤥" },
+    { "seArr;", "⇘" },
+    { "searr;", "↘" },
+    { "searrow;", "↘" },
+    { "sect;", "§" },
+    { "sect", "§" },
+    { "semi;", "" },
+    { "seswar;", "⤩" },
+    { "setminus;", "∖" },
+    { "setmn;", "∖" },
+    { "sext;", "✶" },
+    { "Sfr;", "𝔖" },
+    { "sfr;", "𝔰" },
+    { "sfrown;", "⌢" },
+    { "sharp;", "♯" },
+    { "SHCHcy;", "Щ" },
+    { "shchcy;", "щ" },
+    { "SHcy;", "Ш" },
+    { "shcy;", "ш" },
+    { "ShortDownArrow;", "↓" },
+    { "ShortLeftArrow;", "←" },
+    { "shortmid;", "∣" },
+    { "shortparallel;", "∥" },
+    { "ShortRightArrow;", "→" },
+    { "ShortUpArrow;", "↑" },
+    { "shy;", "­" },
+    { "shy", "­" },
+    { "Sigma;", "Σ" },
+    { "sigma;", "σ" },
+    { "sigmaf;", "ς" },
+    { "sigmav;", "ς" },
+    { "sim;", "∼" },
+    { "simdot;", "⩪" },
+    { "sime;", "≃" },
+    { "simeq;", "≃" },
+    { "simg;", "⪞" },
+    { "simgE;", "⪠" },
+    { "siml;", "⪝" },
+    { "simlE;", "⪟" },
+    { "simne;", "≆" },
+    { "simplus;", "⨤" },
+    { "simrarr;", "⥲" },
+    { "slarr;", "←" },
+    { "SmallCircle;", "∘" },
+    { "smallsetminus;", "∖" },
+    { "smashp;", "⨳" },
+    { "smeparsl;", "⧤" },
+    { "smid;", "∣" },
+    { "smile;", "⌣" },
+    { "smt;", "⪪" },
+    { "smte;", "⪬" },
+    { "smtes;", "⪬︀" },
+    { "SOFTcy;", "Ь" },
+    { "softcy;", "ь" },
+    { "sol;", "/" },
+    { "solb;", "⧄" },
+    { "solbar;", "⌿" },
+    { "Sopf;", "𝕊" },
+    { "sopf;", "𝕤" },
+    { "spades;", "♠" },
+    { "spadesuit;", "♠" },
+    { "spar;", "∥" },
+    { "sqcap;", "⊓" },
+    { "sqcaps;", "⊓︀" },
+    { "sqcup;", "⊔" },
+    { "sqcups;", "⊔︀" },
+    { "Sqrt;", "√" },
+    { "sqsub;", "⊏" },
+    { "sqsube;", "⊑" },
+    { "sqsubset;", "⊏" },
+    { "sqsubseteq;", "⊑" },
+    { "sqsup;", "⊐" },
+    { "sqsupe;", "⊒" },
+    { "sqsupset;", "⊐" },
+    { "sqsupseteq;", "⊒" },
+    { "squ;", "□" },
+    { "Square;", "□" },
+    { "square;", "□" },
+    { "SquareIntersection;", "⊓" },
+    { "SquareSubset;", "⊏" },
+    { "SquareSubsetEqual;", "⊑" },
+    { "SquareSuperset;", "⊐" },
+    { "SquareSupersetEqual;", "⊒" },
+    { "SquareUnion;", "⊔" },
+    { "squarf;", "▪" },
+    { "squf;", "▪" },
+    { "srarr;", "→" },
+    { "Sscr;", "𝒮" },
+    { "sscr;", "𝓈" },
+    { "ssetmn;", "∖" },
+    { "ssmile;", "⌣" },
+    { "sstarf;", "⋆" },
+    { "Star;", "⋆" },
+    { "star;", "☆" },
+    { "starf;", "★" },
+    { "straightepsilon;", "ϵ" },
+    { "straightphi;", "ϕ" },
+    { "strns;", "¯" },
+    { "Sub;", "⋐" },
+    { "sub;", "⊂" },
+    { "subdot;", "⪽" },
+    { "subE;", "⫅" },
+    { "sube;", "⊆" },
+    { "subedot;", "⫃" },
+    { "submult;", "⫁" },
+    { "subnE;", "⫋" },
+    { "subne;", "⊊" },
+    { "subplus;", "⪿" },
+    { "subrarr;", "⥹" },
+    { "Subset;", "⋐" },
+    { "subset;", "⊂" },
+    { "subseteq;", "⊆" },
+    { "subseteqq;", "⫅" },
+    { "SubsetEqual;", "⊆" },
+    { "subsetneq;", "⊊" },
+    { "subsetneqq;", "⫋" },
+    { "subsim;", "⫇" },
+    { "subsub;", "⫕" },
+    { "subsup;", "⫓" },
+    { "succ;", "≻" },
+    { "succapprox;", "⪸" },
+    { "succcurlyeq;", "≽" },
+    { "Succeeds;", "≻" },
+    { "SucceedsEqual;", "⪰" },
+    { "SucceedsSlantEqual;", "≽" },
+    { "SucceedsTilde;", "≿" },
+    { "succeq;", "⪰" },
+    { "succnapprox;", "⪺" },
+    { "succneqq;", "⪶" },
+    { "succnsim;", "⋩" },
+    { "succsim;", "≿" },
+    { "SuchThat;", "∋" },
+    { "Sum;", "∑" },
+    { "sum;", "∑" },
+    { "sung;", "♪" },
+    { "Sup;", "⋑" },
+    { "sup;", "⊃" },
+    { "sup1;", "¹" },
+    { "sup1", "¹" },
+    { "sup2;", "²" },
+    { "sup2", "²" },
+    { "sup3;", "³" },
+    { "sup3", "³" },
+    { "supdot;", "⪾" },
+    { "supdsub;", "⫘" },
+    { "supE;", "⫆" },
+    { "supe;", "⊇" },
+    { "supedot;", "⫄" },
+    { "Superset;", "⊃" },
+    { "SupersetEqual;", "⊇" },
+    { "suphsol;", "⟉" },
+    { "suphsub;", "⫗" },
+    { "suplarr;", "⥻" },
+    { "supmult;", "⫂" },
+    { "supnE;", "⫌" },
+    { "supne;", "⊋" },
+    { "supplus;", "⫀" },
+    { "Supset;", "⋑" },
+    { "supset;", "⊃" },
+    { "supseteq;", "⊇" },
+    { "supseteqq;", "⫆" },
+    { "supsetneq;", "⊋" },
+    { "supsetneqq;", "⫌" },
+    { "supsim;", "⫈" },
+    { "supsub;", "⫔" },
+    { "supsup;", "⫖" },
+    { "swarhk;", "⤦" },
+    { "swArr;", "⇙" },
+    { "swarr;", "↙" },
+    { "swarrow;", "↙" },
+    { "swnwar;", "⤪" },
+    { "szlig;", "ß" },
+    { "szlig", "ß" },
+    { "Tab;", "␉" },
+    { "target;", "⌖" },
+    { "Tau;", "Τ" },
+    { "tau;", "τ" },
+    { "tbrk;", "⎴" },
+    { "Tcaron;", "Ť" },
+    { "tcaron;", "ť" },
+    { "Tcedil;", "Ţ" },
+    { "tcedil;", "ţ" },
+    { "Tcy;", "Т" },
+    { "tcy;", "т" },
+    { "tdot;", "◌⃛" },
+    { "telrec;", "⌕" },
+    { "Tfr;", "𝔗" },
+    { "tfr;", "𝔱" },
+    { "there4;", "∴" },
+    { "Therefore;", "∴" },
+    { "therefore;", "∴" },
+    { "Theta;", "Θ" },
+    { "theta;", "θ" },
+    { "thetasym;", "ϑ" },
+    { "thetav;", "ϑ" },
+    { "thickapprox;", "≈" },
+    { "thicksim;", "∼" },
+    { "ThickSpace;", "  " },
+    { "thinsp;", " " },
+    { "ThinSpace;", " " },
+    { "thkap;", "≈" },
+    { "thksim;", "∼" },
+    { "THORN;", "Þ" },
+    { "THORN", "Þ" },
+    { "thorn;", "þ" },
+    { "thorn", "þ" },
+    { "Tilde;", "∼" },
+    { "tilde;", "˜" },
+    { "TildeEqual;", "≃" },
+    { "TildeFullEqual;", "≅" },
+    { "TildeTilde;", "≈" },
+    { "times;", "×" },
+    { "times", "×" },
+    { "timesb;", "⊠" },
+    { "timesbar;", "⨱" },
+    { "timesd;", "⨰" },
+    { "tint;", "∭" },
+    { "toea;", "⤨" },
+    { "top;", "⊤" },
+    { "topbot;", "⌶" },
+    { "topcir;", "⫱" },
+    { "Topf;", "𝕋" },
+    { "topf;", "𝕥" },
+    { "topfork;", "⫚" },
+    { "tosa;", "⤩" },
+    { "tprime;", "‴" },
+    { "TRADE;", "™" },
+    { "trade;", "™" },
+    { "triangle;", "▵" },
+    { "triangledown;", "▿" },
+    { "triangleleft;", "◃" },
+    { "trianglelefteq;", "⊴" },
+    { "triangleq;", "≜" },
+    { "triangleright;", "▹" },
+    { "trianglerighteq;", "⊵" },
+    { "tridot;", "◬" },
+    { "trie;", "≜" },
+    { "triminus;", "⨺" },
+    { "TripleDot;", "◌⃛" },
+    { "triplus;", "⨹" },
+    { "trisb;", "⧍" },
+    { "tritime;", "⨻" },
+    { "trpezium;", "⏢" },
+    { "Tscr;", "𝒯" },
+    { "tscr;", "𝓉" },
+    { "TScy;", "Ц" },
+    { "tscy;", "ц" },
+    { "TSHcy;", "Ћ" },
+    { "tshcy;", "ћ" },
+    { "Tstrok;", "Ŧ" },
+    { "tstrok;", "ŧ" },
+    { "twixt;", "≬" },
+    { "twoheadleftarrow;", "↞" },
+    { "twoheadrightarrow;", "↠" },
+    { "Uacute;", "Ú" },
+    { "Uacute", "Ú" },
+    { "uacute;", "ú" },
+    { "uacute", "ú" },
+    { "Uarr;", "↟" },
+    { "uArr;", "⇑" },
+    { "uarr;", "↑" },
+    { "Uarrocir;", "⥉" },
+    { "Ubrcy;", "Ў" },
+    { "ubrcy;", "ў" },
+    { "Ubreve;", "Ŭ" },
+    { "ubreve;", "ŭ" },
+    { "Ucirc;", "Û" },
+    { "Ucirc", "Û" },
+    { "ucirc;", "û" },
+    { "ucirc", "û" },
+    { "Ucy;", "У" },
+    { "ucy;", "у" },
+    { "udarr;", "⇅" },
+    { "Udblac;", "Ű" },
+    { "udblac;", "ű" },
+    { "udhar;", "⥮" },
+    { "ufisht;", "⥾" },
+    { "Ufr;", "𝔘" },
+    { "ufr;", "𝔲" },
+    { "Ugrave;", "Ù" },
+    { "Ugrave", "Ù" },
+    { "ugrave;", "ù" },
+    { "ugrave", "ù" },
+    { "uHar;", "⥣" },
+    { "uharl;", "↿" },
+    { "uharr;", "↾" },
+    { "uhblk;", "▀" },
+    { "ulcorn;", "⌜" },
+    { "ulcorner;", "⌜" },
+    { "ulcrop;", "⌏" },
+    { "ultri;", "◸" },
+    { "Umacr;", "Ū" },
+    { "umacr;", "ū" },
+    { "uml;", "¨" },
+    { "uml", "¨" },
+    { "UnderBar;", "_" },
+    { "UnderBrace;", "⏟" },
+    { "UnderBracket;", "⎵" },
+    { "UnderParenthesis;", "⏝" },
+    { "Union;", "⋃" },
+    { "UnionPlus;", "⊎" },
+    { "Uogon;", "Ų" },
+    { "uogon;", "ų" },
+    { "Uopf;", "𝕌" },
+    { "uopf;", "𝕦" },
+    { "UpArrow;", "↑" },
+    { "Uparrow;", "⇑" },
+    { "uparrow;", "↑" },
+    { "UpArrowBar;", "⤒" },
+    { "UpArrowDownArrow;", "⇅" },
+    { "UpDownArrow;", "↕" },
+    { "Updownarrow;", "⇕" },
+    { "updownarrow;", "↕" },
+    { "UpEquilibrium;", "⥮" },
+    { "upharpoonleft;", "↿" },
+    { "upharpoonright;", "↾" },
+    { "uplus;", "⊎" },
+    { "UpperLeftArrow;", "↖" },
+    { "UpperRightArrow;", "↗" },
+    { "Upsi;", "ϒ" },
+    { "upsi;", "υ" },
+    { "upsih;", "ϒ" },
+    { "Upsilon;", "Υ" },
+    { "upsilon;", "υ" },
+    { "UpTee;", "⊥" },
+    { "UpTeeArrow;", "↥" },
+    { "upuparrows;", "⇈" },
+    { "urcorn;", "⌝" },
+    { "urcorner;", "⌝" },
+    { "urcrop;", "⌎" },
+    { "Uring;", "Ů" },
+    { "uring;", "ů" },
+    { "urtri;", "◹" },
+    { "Uscr;", "𝒰" },
+    { "uscr;", "𝓊" },
+    { "utdot;", "⋰" },
+    { "Utilde;", "Ũ" },
+    { "utilde;", "ũ" },
+    { "utri;", "▵" },
+    { "utrif;", "▴" },
+    { "uuarr;", "⇈" },
+    { "Uuml;", "Ü" },
+    { "Uuml", "Ü" },
+    { "uuml;", "ü" },
+    { "uuml", "ü" },
+    { "uwangle;", "⦧" },
+    { "vangrt;", "⦜" },
+    { "varepsilon;", "ϵ" },
+    { "varkappa;", "ϰ" },
+    { "varnothing;", "∅" },
+    { "varphi;", "ϕ" },
+    { "varpi;", "ϖ" },
+    { "varpropto;", "∝" },
+    { "vArr;", "⇕" },
+    { "varr;", "↕" },
+    { "varrho;", "ϱ" },
+    { "varsigma;", "ς" },
+    { "varsubsetneq;", "⊊︀" },
+    { "varsubsetneqq;", "⫋︀" },
+    { "varsupsetneq;", "⊋︀" },
+    { "varsupsetneqq;", "⫌︀" },
+    { "vartheta;", "ϑ" },
+    { "vartriangleleft;", "⊲" },
+    { "vartriangleright;", "⊳" },
+    { "Vbar;", "⫫" },
+    { "vBar;", "⫨" },
+    { "vBarv;", "⫩" },
+    { "Vcy;", "В" },
+    { "vcy;", "в" },
+    { "VDash;", "⊫" },
+    { "Vdash;", "⊩" },
+    { "vDash;", "⊨" },
+    { "vdash;", "⊢" },
+    { "Vdashl;", "⫦" },
+    { "Vee;", "⋁" },
+    { "vee;", "∨" },
+    { "veebar;", "⊻" },
+    { "veeeq;", "≚" },
+    { "vellip;", "⋮" },
+    { "Verbar;", "‖" },
+    { "verbar;", "|" },
+    { "Vert;", "‖" },
+    { "vert;", "|" },
+    { "VerticalBar;", "∣" },
+    { "VerticalLine;", "|" },
+    { "VerticalSeparator;", "❘" },
+    { "VerticalTilde;", "≀" },
+    { "VeryThinSpace;", " " },
+    { "Vfr;", "𝔙" },
+    { "vfr;", "𝔳" },
+    { "vltri;", "⊲" },
+    { "vnsub;", "⊂⃒" },
+    { "vnsup;", "⊃⃒" },
+    { "Vopf;", "𝕍" },
+    { "vopf;", "𝕧" },
+    { "vprop;", "∝" },
+    { "vrtri;", "⊳" },
+    { "Vscr;", "𝒱" },
+    { "vscr;", "𝓋" },
+    { "vsubnE;", "⫋︀" },
+    { "vsubne;", "⊊︀" },
+    { "vsupnE;", "⫌︀" },
+    { "vsupne;", "⊋︀" },
+    { "Vvdash;", "⊪" },
+    { "vzigzag;", "⦚" },
+    { "Wcirc;", "Ŵ" },
+    { "wcirc;", "ŵ" },
+    { "wedbar;", "⩟" },
+    { "Wedge;", "⋀" },
+    { "wedge;", "∧" },
+    { "wedgeq;", "≙" },
+    { "weierp;", "℘" },
+    { "Wfr;", "𝔚" },
+    { "wfr;", "𝔴" },
+    { "Wopf;", "𝕎" },
+    { "wopf;", "𝕨" },
+    { "wp;", "℘" },
+    { "wr;", "≀" },
+    { "wreath;", "≀" },
+    { "Wscr;", "𝒲" },
+    { "wscr;", "𝓌" },
+    { "xcap;", "⋂" },
+    { "xcirc;", "◯" },
+    { "xcup;", "⋃" },
+    { "xdtri;", "▽" },
+    { "Xfr;", "𝔛" },
+    { "xfr;", "𝔵" },
+    { "xhArr;", "⟺" },
+    { "xharr;", "⟷" },
+    { "Xi;", "Ξ" },
+    { "xi;", "ξ" },
+    { "xlArr;", "⟸" },
+    { "xlarr;", "⟵" },
+    { "xmap;", "⟼" },
+    { "xnis;", "⋻" },
+    { "xodot;", "⨀" },
+    { "Xopf;", "𝕏" },
+    { "xopf;", "𝕩" },
+    { "xoplus;", "⨁" },
+    { "xotime;", "⨂" },
+    { "xrArr;", "⟹" },
+    { "xrarr;", "⟶" },
+    { "Xscr;", "𝒳" },
+    { "xscr;", "𝓍" },
+    { "xsqcup;", "⨆" },
+    { "xuplus;", "⨄" },
+    { "xutri;", "△" },
+    { "xvee;", "⋁" },
+    { "xwedge;", "⋀" },
+    { "Yacute;", "Ý" },
+    { "Yacute", "Ý" },
+    { "yacute;", "ý" },
+    { "yacute", "ý" },
+    { "YAcy;", "Я" },
+    { "yacy;", "я" },
+    { "Ycirc;", "Ŷ" },
+    { "ycirc;", "ŷ" },
+    { "Ycy;", "Ы" },
+    { "ycy;", "ы" },
+    { "yen;", "¥" },
+    { "yen", "¥" },
+    { "Yfr;", "𝔜" },
+    { "yfr;", "𝔶" },
+    { "YIcy;", "Ї" },
+    { "yicy;", "ї" },
+    { "Yopf;", "𝕐" },
+    { "yopf;", "𝕪" },
+    { "Yscr;", "𝒴" },
+    { "yscr;", "𝓎" },
+    { "YUcy;", "Ю" },
+    { "yucy;", "ю" },
+    { "Yuml;", "Ÿ" },
+    { "yuml;", "ÿ" },
+    { "yuml", "ÿ" },
+    { "Zacute;", "Ź" },
+    { "zacute;", "ź" },
+    { "Zcaron;", "Ž" },
+    { "zcaron;", "ž" },
+    { "Zcy;", "З" },
+    { "zcy;", "з" },
+    { "Zdot;", "Ż" },
+    { "zdot;", "ż" },
+    { "zeetrf;", "ℨ" },
+    { "ZeroWidthSpace;", "​" },
+    { "Zeta;", "Ζ" },
+    { "zeta;", "ζ" },
+    { "Zfr;", "ℨ" },
+    { "zfr;", "𝔷" },
+    { "ZHcy;", "Ж" },
+    { "zhcy;", "ж" },
+    { "zigrarr;", "⇝" },
+    { "Zopf;", "ℤ" },
+    { "zopf;", "𝕫" },
+    { "Zscr;", "𝒵" },
+    { "zscr;", "𝓏" },
+    { "zwj;", "‍" },
+    { "zwnj;", "‌" },
+    { NULL, NULL }
+};
+
+int check_element (char *str, char **glyph)
+{
+    nchar_t *pt = elements;
+    while (pt->name) {
+        int len = strlen (pt->name);
+        if (strncmp (str, pt->name, len) == 0) {
+            *glyph = pt->glyph;
+            return len;
+        }
+        pt++;
+    }
+    return 0;
+}
+
+/* vim: set ts=4 sw=4 et: */
diff --git a/element.h b/element.h
new file mode 100644 (file)
index 0000000..4259494
--- /dev/null
+++ b/element.h
@@ -0,0 +1,8 @@
+#ifndef __ELEMENT_H__
+#define __ELEMENT_H__
+
+int check_element (char *str, char **glyph);
+
+#endif /* __ELEMENT_H__ */
+
+/* vim: set ts=4 sw=4 et: */
diff --git a/html2txt.c b/html2txt.c
new file mode 100644 (file)
index 0000000..40e1643
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+  File name        : htm2txt.c
+  Projet           : 
+  Date of creation : 2026/10/02
+  Version          : 0.1
+  Copyright        : 
+  Author           : Laurent Mazet <mazet@softndesig.org>
+
+  Description      : Generic CLI
+
+  History          :
+  - initial version
+*/
+
+/* depend: */
+/* cflags: */
+/* linker: debug.o element.o */
+/* doslnk: debug.o element.o */
+/* winlnk: debug.o element.o*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "debug.h"
+#include "element.h"
+
+/* global constants */
+#define BUFSIZE 256
+
+/* static variables */
+char *progname = NULL;
+char *version = "0.1";
+
+char *fin = NULL;
+
+/* usage function */
+int usage (int ret)
+{
+    FILE *fd = ret ? stderr : stdout;
+    fprintf (fd, "usage: %s [-v int] [-h] [-i file]\n", progname);
+    fprintf (fd, " -h: help message\n");
+    fprintf (fd, " -v: verbose level(%d)\n", verbose);
+    fprintf (fd, " -i file: input file (%s)\n", fin ? fin : "<stdin>");
+    fprintf (fd, "%s version %s\n", progname, version);
+
+    return ret;
+}
+
+/* main function */
+int main (int argc, char *argv[])
+{
+
+    /* get basename */
+    char *pt = progname = argv[0];
+    while (*pt) {
+        if ((*pt == '/') || (*pt == '\\')) {
+           progname = pt + 1;
+        }
+        pt++;
+    }
+
+    /* process argument */
+    while (argc-- > 1) {
+        char *arg = *(++argv);
+        if (arg[0] != '-') {
+            VERBOSE (ERROR, "%s: invalid option -- %s\n", progname, arg);
+            return usage (1);
+        }
+        char c = arg[1];
+        switch (c) {
+        case 'i':
+            arg = (arg[2]) ? arg + 2 : (--argc > 0) ? *(++argv) : NULL;
+            if (arg == NULL) {
+                VERBOSE (ERROR, "%s: missing file name\n", progname);
+                return usage (1);
+            }
+            fin = arg;
+            break;
+        case 'v':
+            arg = (arg[2]) ? arg + 2 : (--argc > 0) ? *(++argv) : NULL;
+            if (arg == NULL) {
+                VERBOSE (ERROR, "%s: missing verbose level\n", progname);
+                return usage (1);
+            }
+            verbose = atoi (arg);
+            break;
+        case 'h':
+        default:
+            return usage (c != 'h');
+        }
+    }
+
+    /* open file */
+    FILE *in = stdin;
+    if (fin) {
+        in = fopen (fin, "r");
+        if (in == NULL) {
+            VERBOSE (ERROR, "%s: can't open file '%s'\n", progname, fin);
+            return 1;
+        }
+    }
+
+    /* read file */
+    char  *buffer = NULL;
+    int size = 0;
+    while (!feof (in)) {
+        buffer = (char *) realloc (buffer, size + BUFSIZE);
+        if (buffer == NULL) {
+            VERBOSE (ERROR, "%s: can't get enough memory\n", progname);
+            return 1;
+        }
+        memset (buffer + size, 0, BUFSIZE);
+        int n = fread (buffer + size, 1, BUFSIZE, in);
+        if ((n == 0) && (errno != 0)) {
+            VERBOSE (ERROR, "%s: can't read data from file '%s'\n", progname, fin);
+            return 1;
+        }
+        size += BUFSIZE;
+    }
+
+    /* close input file */
+    if (in != stdin) {
+        fclose (in);
+    }
+
+    /* process file */
+    pt = buffer;
+    while (*pt) {
+        char *glyph = NULL;
+        char out[5] = {0};
+        switch (*pt) {
+        case '<':
+            while ((*pt) && (*pt != '>')) pt++;
+            break;
+        case '&':
+            pt += check_element (pt + 1, &glyph);
+            if (glyph) {
+                strcpy (out, glyph);
+            } else {
+                strncpy (out, pt, 1);
+            }
+            break;
+        default:
+            strncpy (out, pt, 1);
+        }
+        if (*out) {
+            printf ("%s", out);
+        }
+        pt++;
+    }
+
+    free (buffer);
+
+    return 0;
+}
+
+/* test: html2txt.exe -h | grep usage */
+/* test: html2txt.exe -i 2>&1 | grep missing */
+/* test: html2txt.exe -v 2>&1 | grep missing */
+/* test: html2txt.exe -i foobar 2>&1 | grep "can't open file" */
+/* test: html2txt.exe -i test.html >/dev/null */
+/* test: cat test.html | html2txt.exe >/dev/null */
+
+/* vim: set ts=4 sw=4 et: */
diff --git a/makefile b/makefile
new file mode 100644 (file)
index 0000000..a129391
--- /dev/null
+++ b/makefile
@@ -0,0 +1,288 @@
+
+# Default flags
+
+AR = ar
+CC = gcc
+RANLIB = ranlib
+
+#INCLUDES += -I../debug -D__MEMORY_ALLOCATION__
+OFLAGS  = -O4 -Os
+#OFLAGS  = -O0
+#OFLAGS  = -O4 -ffast-math -finline-functions
+#OFLAGS  = -O4 -finline-functions
+#OFLAGS += -mtune=pentium3 -mmmx -msse -msse2 -m3dnow
+#OFLAGS += -minline-all-stringops -fsingle-precision-constant
+#OFLAGS += -malign-double
+CFLAGS += -W -Wall -Wextra -g
+#CFLAGS += -std=c99 -D_XOPEN_SOURCE=500
+#CFLAGS += -D_XOPEN_SOURCE=500
+CFLAGS += $(OFLAGS) $(INCLUDES) $(OPTIONS)
+LDFLAGS += -g $(LDOPTS) $(OPTIONS)
+
+LDOPT = linker
+AROPT = archive
+MV = mv
+ifneq (, $(findstring linux, $(MAKE_HOST)))
+# Linux
+else ifneq (, $(findstring mingw, $(MAKE_HOST)))
+# Windows MinGw
+CFLAGS += -DWIN32
+#LDLIBS += -lws2_32
+LDOPT = winlnk
+AROPT =
+else ifneq (, $(findstring cygwin, $(MAKE_HOST)))
+# Windows CygWin
+CFLAGS += -DWIN32
+LDOPT = winlnk
+AROPT =
+else ifneq (, $(findstring msdos, $(MAKE_HOST)))
+# MSDOS
+LDOPT = doslnk
+AROPT =
+MV = move
+endif
+
+ifeq ($(DESTDIR),)
+DESTDIR = /usr/local
+endif
+
+BINDIR = $(DESTDIR)/bin
+INCDIR = $(DESTDIR)/include
+LIBDIR = $(DESTDIR)/lib
+
+# Targets
+
+ALLEXE  = $(shell for f in *.c; do grep -q '/\*\s*$(LDOPT):' $$f && echo $${f/.c}; done)
+
+ALLDLL  = $(shell for f in *.c; do grep -q '/\*\s*$(AROPT):' $$f && echo lib$${f/.c}; done)
+
+SHELL = bash
+
+#MAKE = mingw32-make
+MAKEFLAGS += -s
+include $(wildcard .makefile)
+
+# Functions
+
+TITLE = echo -en "\033[0;1m$(strip $(1))\033[0;0m:\t"
+PASS = echo -e "\033[1;32m$(strip $(1))\033[0;0m"
+WARN = echo -e "\033[1;33m$(strip $(1))\033[0;0m"
+FAIL = echo -e "\033[1;31m$(strip $(1))\033[0;0m"
+
+INSTALL = test -d $(2) || mkdir -p $(2) && cp -pa $(1) $(2) && chmod a+rX,go-w $(2) $(addprefix $(2)/,$(1))
+
+VALID = $(call TITLE, $(1)) && $(2) && $(call PASS, SUCCESS) || { $(call FAIL, FAILED); test; }
+
+GETCOMMENTS = awk '/\/\*[ \t]*$(1):/,/\*\// { sub(/.*\/\*[ \t]*$(1):/, ""); sub (/[ \t]*\*\/.*/, ""); print } /\/\/[ \t]*$(1):/ {sub (/.*\/\/[ \t]*$(1):/, ""); print }' $(2)
+#GETCOMMENTS = perl -- getcomments.pl -p='$(1):\s' -f='%' $(2)
+
+DATE = $(shell git log -1 HEAD --format=%ai|awk '{print $$1}')
+#DATE = $(shell hg log -r-1 --template '{date|isodate}'|awk '{print $$1}')
+
+## Generic rules
+
+all: depends
+       [ -z "$(ALLEXE)" ] || $(MAKE) exe
+       [ -z "$(ALLDLL)" ] || $(MAKE) lib
+
+analyze:
+       make purge
+       scan-build make
+       #scan-build -stats make
+
+count:
+       wc $(MAKEFILE_LIST) $(sort $(wildcard \
+           $(patsubst %.o,%.c,$(shell $(call GETCOMMENTS,$(LDOPT),$(ALLEXE:%=%.c) $(MAKEFILE_LIST)))) \
+           $(patsubst %.o,%.h,$(shell $(call GETCOMMENTS,$(LDOPT),$(ALLEXE:%=%.c) $(MAKEFILE_LIST)))) \
+           $(patsubst %.o,%.c,$(shell $(call GETCOMMENTS,$(AROPT),$(ALLDLL:lib%=%.c) $(MAKEFILE_LIST)))) \
+           $(patsubst %.o,%.h,$(shell $(call GETCOMMENTS,$(AROPT),$(ALLDLL:lib%=%.c) $(MAKEFILE_LIST))))))
+
+clean:
+       $(call TITLE, "Cleaning")
+       touch clean
+       rm -f clean $(wildcard \
+           $(shell $(call GETCOMMENTS,$(LDOPT),$(ALLEXE:%=%.c) $(MAKEFILE_LIST))) \
+           $(patsubst %.o,%.d,$(shell $(call GETCOMMENTS,$(LDOPT),$(ALLEXE:%=%.c) $(MAKEFILE_LIST)))) \
+           $(shell $(call GETCOMMENTS,$(AROPT),$(ALLDLL:lib%=%.c) $(MAKEFILE_LIST))) \
+           $(patsubst %.o,%.d,$(shell $(call GETCOMMENTS,$(AROPT),$(ALLDLL:lib%=%.c) $(MAKEFILE_LIST)))) \
+           *.d *.ld *.lld *.log *.o *.test .exec_* gmon.out)
+       $(call PASS, SUCCESS)
+
+depends:
+       [ "$(ALLEXE)" ] || $(call WARN,no exec to proceed)
+       for exe in $(ALLEXE); do INCLUDES="`$(call GETCOMMENTS,includes,$$exe.c)`" make `$(call GETCOMMENTS,$(LDOPT),$$exe.c) | sed 's/[^ ]*\.[^o]//g' | sed 's/\.o/.d/g'` || exit 1; done
+       [ -z "$(ALLEXE)" ] || make $(patsubst %, %.ld, $(ALLEXE))
+       [ "$(ALLDLL)" ] || $(call WARN,no library to proceed)
+       for dll in $(ALLDLL:lib%=%); do INCLUDES="`$(call GETCOMMENTS,includes,$$dll.c)`" make `$(call GETCOMMENTS,$(AROPT),$$dll.c) | sed 's/[^ ]*\.[^o]//g' | sed 's/\.o/.d/g'` || exit 1; done
+       [ -z "$(ALLDLL)" ] || make $(patsubst %, %.lld, $(ALLDLL))
+
+documentation: doxygen.conf $(shell test -f doxygen.conf && awk '{sub(/#.*/,"")} /^FILE_PATTERNS/,!/\\$$/ {sub(/\\$$/,"");sub(/.*=/,"");print}' doxygen.conf)
+       doxygen $<; true
+       sed -i s/__BEGIN_DECLS//g documentation/html/*.html
+       sed -i s/\\_\\-\\_BEGIN\\_\\-DECLS//g documentation/latex/*.tex
+
+exe: depends
+       [ "$(ALLEXE)" ] || { $(call FAIL,no exec to proceed); test; } && for exe in $(ALLEXE); do INCLUDES="`$(call GETCOMMENTS,includes,$$exe.c)`" CFLAGS="`$(call GETCOMMENTS,cflags,$$exe.c)`" $(MAKE) $$exe.exe || exit 1; done
+
+gcovs: wipe
+       $(MAKE) $(addprefix gcov_,$(ALLEXE))
+
+gprofs:
+       $(MAKE) $(addprefix gprof_,$(ALLEXE))
+
+lib: depends
+       [ "$(ALLDLL)" ] || { $(call FAIL,no exec to proceed); test; } && for dll in $(ALLDLL:lib%=%); do INCLUDES="`$(call GETCOMMENTS,includes,$$dll.c)`" CFLAGS="`$(call GETCOMMENTS,cflags,$$exe.c)`" $(MAKE) lib$$dll.a || exit 1; done
+
+purge: clean
+       $(call TITLE, "Purging")
+       touch purge
+       rm -f purge $(ALLEXE:%=%.exe) $(ALLDLL:%=%.a)
+       $(call PASS, SUCCESS)
+
+valgrinds:
+       $(MAKE) all
+       $(MAKE) $(addprefix valgrind_,$(ALLEXE))
+
+wipe: purge
+       $(call TITLE, "Wiping")
+       touch wipe
+       rm -f wipe $(wildcard *.gcda *.gcno *.gcov *.glog)
+       $(call PASS, SUCCESS)
+
+tests:
+       -rm -f $(ALLEXE:%=%.exe)
+       $(MAKE) all
+       $(MAKE) $(addprefix test_,$(ALLEXE))
+
+archive: wipe changelog
+       [ \! -f doxygen.conf ] || make documentation
+       name=`basename "$$(pwd)"`; cd ..; tar cvz --exclude='.git*' -f $$name-$(DATE).tgz $$name
+
+## Main rules
+
+include $(sort $(wildcard \
+    $(patsubst %.o,%.d,$(shell $(call GETCOMMENTS,$(LDOPT),$(ALLEXE:%=%.c) $(MAKEFILE_LIST))))) \
+    $(wildcard $(patsubst %.o,%.d,$(shell $(call GETCOMMENTS,$(AROPT),$(ALLDLL:lib%=%.c) $(MAKEFILE_LIST))))))
+include $(wildcard *.ld)
+include $(wildcard *.lld)
+
+gcov_%:
+       $(MAKE) purge
+       $(MAKE) depends
+       OPTIONS="-coverage -O0" $(MAKE) ${@:gcov_%=%}.exe
+       $(MAKE) test_$(@:gcov_%=%)
+       gcov `sed -e 's/\.exe:/.c/;s/\.o/.c/g;s/ -l[^ ]*//g' $(@:gcov_%=%.ld)`
+       $(MAKE) purge
+       grep '^ *#####' *.c.gcov || true
+
+gprof_%:
+       $(MAKE) purge
+       $(MAKE) depends
+       OPTIONS="-pg" $(MAKE) ${@:gprof_%=%}.exe
+       $(MAKE) ${@:gprof_%=%}.test
+       IFS=$$'\n'; id=1; \
+               for test in `cat ${@:gprof_%=%}.test | sed 's,${@:gprof_%=%}.exe,./${@:gprof_%=%}.exe,g'`; do \
+               log=${@:gprof_%=%}.prof-$$id.glog; \
+               $(call TITLE, test: $$test); \
+               echo $$test > $$log; \
+               eval $$test >> $$log; \
+               [ $$? -eq 0 ] \
+                       && echo -e "\033[1;32mSUCCESS\033[0;0m" \
+                       || echo -e "\033[1;31mFAILED\033[0;0m"; \
+               [ -f gmon.out ] && { gprof ${@:gprof_%=%}.exe gmon.out >> $$log; rm gmon.out; }; \
+               let id++; \
+       done;
+       $(MAKE) purge
+
+%.test: %.c
+       $(call TITLE, "Building $@")
+       $(call GETCOMMENTS,test, $<) > $@
+       $(call PASS, SUCCESS)
+       -rm -f _
+
+test_%: %.test %.exe
+       IFS=$$'\n'; RC=0; \
+       for test in `cat $< | sed 's,${<:.test=.exe},$(VALGRIND) ./${<:.test=.exe},g'`; do \
+         echo "=== $$test ==="; \
+         eval $$test; \
+         [ $$? -eq 0 ] && echo -e "\033[1;32mSUCCESS\033[0;0m" \
+                       || { echo -e "\033[1;31mFAILED\033[0;0m"; RC=1; }; \
+         test "$$RC" = 1 -a "$(STOP)" = 1 && break; \
+       done; \
+       test "$$RC" -ne 1
+
+valgrind_%: %.exe
+       VALGRIND="valgrind -v --leak-check=full --log-fd=3"; \
+       export VALGRIND; \
+       $(MAKE) $(@:valgrind_%=test_%) 3>$@.log
+
+%.d: %.c
+       $(call TITLE, "Building $@")
+       $(CC) $(INCLUDES) -MM $< -o $@~
+       echo ${<:.c=.o}: $(shell $(call GETCOMMENTS,depend, $<)) >> $@~
+       $(MV) $@~ $@
+       $(call PASS, SUCCESS)
+
+lib%.lld: %.c
+       $(call TITLE, "Building $@")
+       echo ${@:.lld=.a}: $(shell $(call GETCOMMENTS,$(AROPT), $<) | awk '{for (i=1;i<=NF;i++) if ($$(i) ~ /.o$$/) printf " %s", $$(i)}') > $@
+       $(call PASS, SUCCESS)
+
+%.ld: %.c
+       $(call TITLE, "Building $@")
+       echo ${<:.c=.exe}: $(shell $(call GETCOMMENTS,$(LDOPT), $<) | awk '{for (i=1;i<=NF;i++) if ($$(i) ~ /.o$$/) printf " %s", $$(i)}') > $@
+       $(call PASS, SUCCESS)
+
+%.o: %.c
+       $(call TITLE, "Building $@")
+       $(CC) $(CFLAGS) $(INCLUDES) $(shell $(call GETCOMMENTS,cflags, $<)) -c $< -o $@
+       $(call PASS, SUCCESS)
+ 
+
+%.exe: %.c
+       INCLUDES="$(shell $(call GETCOMMENTS,includes, $<))" CFLAGS="$(shell $(call GETCOMMENTS,cflags, $<))" make $(<:.c=.d)
+       INCLUDES="$(shell $(call GETCOMMENTS,includes, $<))" CFLAGS="$(shell $(call GETCOMMENTS,cflags, $<))" make $(<:.c=.o)
+       $(call TITLE, "Building $@")
+       $(CC) $(LDFLAGS) ${<:.c=.o} $(shell $(call GETCOMMENTS,$(LDOPT), $<)) $(LDLIBS) -o $@
+       $(call PASS, SUCCESS)
+
+lib%.a: %.c
+       INCLUDES="$(shell $(call GETCOMMENTS,includes, $<))" CFLAGS="$(shell $(call GETCOMMENTS,cflags, $<))" make $(<:.c=.d)
+       INCLUDES="$(shell $(call GETCOMMENTS,includes, $<))" CFLAGS="$(shell $(call GETCOMMENTS,cflags, $<))" make $(<:.c=.o)
+       $(call TITLE, "Building $@")
+       $(AR) rc $@ ${<:.c=.o} $(shell $(call GETCOMMENTS,$(AROPT), $<))
+       $(RANLIB) $@
+       $(call PASS, SUCCESS)
+
+## install rules
+
+install_lib%: lib%.a
+       $(call TITLE, "Install $<")
+       $(call INSTALL, $(shell $(call GETCOMMENTS,include, `echo $< | sed 's/^lib//;s/\.a$$/.c/'`)), $(INCDIR)/`echo $< | sed 's/^lib//;s/\.a$$//'`)
+       sed -i 's/\(#include\) "\(.*\)"/\1 <'`echo $< | sed 's/^lib//;s/\.a$$//'`'\/\2>/' $(INCDIR)/`echo $< | sed 's/^lib//;s/\.a$$//'`/*.h
+       $(call INSTALL, $<, $(LIBDIR))
+       $(call PASS, SUCCESS)
+
+install_%: %.exe
+       $(call TITLE, "Install $<")
+       $(call INSTALL, $<, $(BINDIR))
+       $(call PASS, SUCCESS)
+
+install_lib:
+       make $(addprefix install_,$(ALLDLL))
+
+install_exe:
+       make $(addprefix install_,$(ALLEXE))
+
+changelog:
+       echo "Logs from $(DATE)" > $@.txt
+       git log --pretty=format:'- %s' >> $@.txt
+#      hg log --template changelog >>$@.txt
+
+## Phony
+
+.PHONY: all analyze archive changelog clean count depends documentation exe gcovs gprofs install_lib install_exe lib purge tests valgrinds wipe
+
+## Precious
+
+.PRECIOUS: %.d %.o
diff --git a/test.html b/test.html
new file mode 100644 (file)
index 0000000..1b08ec1
--- /dev/null
+++ b/test.html
@@ -0,0 +1,20 @@
+<div class="article-full__body-content article-paywall p402_premium"
+                             rel="js-article-content"
+                                                            data-state="fixed-height"
+                                data-selection="disabled"
+                                                                                >
+                                                                                                                            
+<p>Le week-end dernier, les parquets ont r&eacute;sonn&eacute; au rythme des encouragements et des premiers v&eacute;ritables d&eacute;fis de la saison pour nos &eacute;quipes de jeunes. Apr&egrave;s des semaines d&rsquo;entra&icirc;nement et de pr&eacute;paration physique, l&rsquo;heure &eacute;tait enfin venue de rev&ecirc;tir le maillot du PNH et de croiser le fer avec les adversaires du championnat.</p><!-- Pub DFP Position [outstream] -->
+
+    <div class="ad ad--outstream  center-align"
+         id="pub_dfp_outstream"
+                           data-iab-tag="pos_outstream"></div>
+<p>Les -11 gar&ccedil;ons recevaient Tarbes et s&rsquo;imposent sur le score de 21 &agrave; 8. Les deux &eacute;quipes -11 filles &eacute;taient sur les parquets : l&rsquo;&eacute;quipe bleue l&rsquo;emporte 22 &agrave; 2 contre Bagn&egrave;res-de-Bigorre, tandis que l&rsquo;&eacute;quipe noire bat Escoub&egrave;s 35 &agrave; 3. Bravo les filles ! Les -13 gar&ccedil;ons n&rsquo;ont rien pu faire face aux voisins de Tournay, qui s&rsquo;imposent 45 &agrave; 32, au terme d&rsquo;une rencontre offensive. Les -13 filles s&rsquo;imposent face aux B&eacute;arnaises d&rsquo;Asson, un club de r&eacute;f&eacute;rence, sur le score de 29 &agrave; 12. Les -15 gar&ccedil;ons s&rsquo;inclinent face &agrave; Rabastens-de-Bigorre, 46 &agrave; 21. Les -15 filles de la une l&rsquo;emportent sur forfait de Comminges ; la deux s&rsquo;impose face &agrave; Saint-Girons, 41 &agrave; 30.</p><!-- Pub DFP Position [article] -->
+    
+    <div class="ad ad--article  center-align"
+         id="pub_dfp_article"
+                           data-iab-tag="pos_article"></div>
+<p>Les -18 gar&ccedil;ons ont souffert sur le parquet de Colomiers : il aura tout fallu pour l&rsquo;emporter 36 &agrave; 34. Les -18 filles font match nul, 19 &agrave; 19, face &agrave; Pamiers.</p><p>Le staff technique et les encadrants saluent l&rsquo;implication de l&rsquo;ensemble des joueuses et joueurs, qui portent haut les couleurs et les valeurs du club. De quoi aborder la suite de la saison avec le sourire et une belle dose de confiance !</p><p>L&rsquo;&eacute;quipe deux seniors filles s&rsquo;incline face &agrave; Pamiers de deux petits buts, 29 &agrave; 27. La une filles n&rsquo;a laiss&eacute; aucune chance &agrave; Muret, avec une large victoire 36 &agrave; 25, importante pour la suite du championnat. La deux des seniors gar&ccedil;ons recevait L&rsquo;Union Toulouse au gymnase de Lannemezan : victoire importante 28 &agrave; 19 dans l&rsquo;optique du maintien en Excellence r&eacute;gionale. La une accueillait Blagnac pour essayer de faire un 3 sur 3 : belle victoire des joueurs du plateau, 40 &agrave; 27.</p><p>Un week-end riche en &eacute;motions qui confirme le dynamisme et la vitalit&eacute; de la formation au sein du PNH.</p>
+
+                                                                                                                        
+                                                                                </div>