tml-encoder

TML html entity encoder/decoder

npm install tml-encoder
4 downloads in the last week
16 downloads in the last month

tml-encoder(3) -- entity encoder and decoder

SYNOPSIS

tml-encoder entity encoder and decoder.

OPTIONS

SYNTAX

ENVIRONMENT

RETURN VALUES

STANDARDS

SECURITY CONSIDERATIONS

BUGS

HISTORY

AUTHOR

SEE ALSO

IMPLEMENTATION


Encoder

    @purpose entity encoder and decoder;
    @author Erin Phillips;
    @version 0.0.3-1;
    @history 2013-04-26 EMP Initial Version;
    @history 2013-04-30 EMP [0.0.3-1] add-tml-build;

resources

    TMLR = tml-runtime [TmlRuntime]

locals

tags

notes

messages

code


-- PATTERNS --;


-- STATICS --;

var encodeMap = {

34:"quot", 38:"amp", 60:"lt", 62:"gt", 160:"nbsp", 161:"iexcl", 162:"cent", 163:"pound", 164:"curren", 165:"yen", 166:"brvbar", 167:"sect", 168:"uml", 169:"copy", 170:"ordf", 171:"laquo", 172:"not", 173:"shy", 174:"reg", 175:"macr", 176:"deg", 177:"plusmn", 178:"sup2", 179:"sup3", 180:"acute", 181:"micro", 182:"para", 183:"middot", 184:"cedil", 185:"sup1", 186:"ordm", 187:"raquo", 188:"frac14", 189:"frac12", 190:"frac34", 191:"iquest", 192:"Agrave", 193:"Aacute", 194:"Acirc", 195:"Atilde", 196:"Auml", 197:"Aring", 198:"Aelig", 199:"Ccedil", 200:"Egrave", 201:"Eacute", 202:"Ecirc", 203:"Euml", 204:"Igrave", 205:"Iacute", 206:"Icirc", 207:"Iuml", 208:"ETH", 209:"Ntilde", 210:"Ograve", 211:"Oacute", 212:"Ocirc", 213:"Otilde", 214:"Ouml", 215:"times", 216:"Oslash", 217:"Ugrave", 218:"Uacute", 219:"Ucirc", 220:"Uuml", 221:"Yacute", 222:"THORN", 223:"szlig", 224:"agrave", 225:"aacute", 226:"acirc", 227:"atilde", 228:"auml", 229:"aring", 230:"aelig", 231:"ccedil", 232:"egrave", 233:"eacute", 234:"ecirc", 235:"euml", 236:"igrave", 237:"iacute", 238:"icirc", 239:"iuml", 240:"eth", 241:"ntilde", 242:"ograve", 243:"oacute", 244:"ocirc", 245:"otilde", 246:"ouml", 247:"divide", 248:"oslash", 249:"ugrave", 250:"uacute", 251:"ucirc", 252:"uuml", 253:"yacute", 254:"thorn", 255:"yuml", 338:"OElig", 339:"oelig", 352:"Scaron", 353:"scaron", 376:"Yuml", 402:"fnof", 710:"circ", 732:"tilde", 913:"Alpha", 914:"Beta", 915:"Gamma", 916:"Delta", 917:"Epsilon", 918:"Zeta", 919:"Eta", 920:"Theta", 921:"Iota", 922:"Kappa", 923:"Lambda", 924:"Mu", 925:"Nu", 926:"Xi", 927:"Omicron", 928:"Pi", 929:"Rho", 931:"Sigma", 932:"Tau", 933:"Upsilon", 934:"Phi", 935:"Chi", 936:"Psi", 937:"Omega", 945:"alpha", 946:"beta", 947:"gamma", 948:"delta", 949:"epsilon", 950:"zeta", 951:"eta", 952:"theta", 953:"iota", 954:"kappa", 955:"lambda", 956:"mu", 957:"nu", 958:"xi", 959:"omicron", 960:"pi", 961:"rho", 962:"sigmaf", 963:"sigma", 964:"tau", 965:"upsilon", 966:"phi", 967:"chi", 968:"psi", 969:"omega", 977:"thetasym", 978:"upsih", 982:"piv", 8194:"ensp", 8195:"emsp", 8201:"thinsp", 8204:"zwnj", 8205:"zwj", 8206:"lrm", 8207:"rlm", 8211:"ndash", 8212:"mdash", 8216:"lsquo", 8217:"rsquo", 8218:"sbquo", 8220:"ldquo", 8221:"rdquo", 8222:"bdquo", 8224:"dagger", 8225:"Dagger", 8226:"bull", 8230:"hellip", 8240:"permil", 8242:"prime", 8243:"Prime", 8249:"lsaquo", 8250:"rsaquo", 8254:"oline", 8260:"frasl", 8364:"euro", 8465:"image", 8472:"weierp", 8476:"real", 8482:"trade", 8501:"alefsym", 8592:"larr", 8593:"uarr", 8594:"rarr", 8595:"darr", 8596:"harr", 8629:"crarr", 8656:"lArr", 8657:"uArr", 8658:"rArr", 8659:"dArr", 8660:"hArr", 8704:"forall", 8706:"part", 8707:"exist", 8709:"empty", 8711:"nabla", 8712:"isin", 8713:"notin", 8715:"ni", 8719:"prod", 8721:"sum", 8722:"minus", 8727:"lowast", 8730:"radic", 8733:"prop", 8734:"infin", 8736:"ang", 8743:"and", 8744:"or", 8745:"cap", 8746:"cup", 8747:"int", 8756:"there4", 8764:"sim", 8773:"cong", 8776:"asymp", 8800:"ne", 8801:"equiv", 8804:"le", 8805:"ge", 8834:"sub", 8835:"sup", 8836:"nsub", 8838:"sube", 8839:"supe", 8853:"oplus", 8855:"otimes", 8869:"perp", 8901:"sdot", 8968:"lceil", 8969:"rceil", 8970:"lfloor", 8971:"rfloor", 9001:"lang", 9002:"rang", 9674:"loz", 9824:"spades", 9827:"clubs", 9829:"hearts", 9830:"diams" }

var decodeMap = {

quot:"\u0022", 34:"\u0022", amp:"\u0026", 38:"\u0026", lt:"\u003C", 60:"\u003C", gt:"\u003E", 62:"\u003E", nbsp:"\u00A0", 160:"\u00A0", iexcl:"\u00A1", 161:"\u00A1", cent:"\u00A2", 162:"\u00A2", pound:"\u00A3", 163:"\u00A3", curren:"\u00A4", 164:"\u00A4", yen:"\u00A5", 165:"\u00A5", brvbar:"\u00A6", 166:"\u00A6", sect:"\u00A7", 167:"\u00A7", uml:"\u00A8", 168:"\u00A8", copy:"\u00A9", 169:"\u00A9", ordf:"\u00AA", 170:"\u00AA", laquo:"\u00AB", 171:"\u00AB", not:"\u00AC", 172:"\u00AC", shy:"\u00AD", 173:"\u00AD", reg:"\u00AE", 174:"\u00AE", macr:"\u00AF", 175:"\u00AF", deg:"\u00B0", 176:"\u00B0", plusmn:"\u00B1", 177:"\u00B1", sup2:"\u00B2", 178:"\u00B2", sup3:"\u00B3", 179:"\u00B3", acute:"\u00B4", 180:"\u00B4", micro:"\u00B5", 181:"\u00B5", para:"\u00B6", 182:"\u00B6", middot:"\u00B7", 183:"\u00B7", cedil:"\u00B8", 184:"\u00B8", sup1:"\u00B9", 185:"\u00B9", ordm:"\u00BA", 186:"\u00BA", raquo:"\u00BB", 187:"\u00BB", frac14:"\u00BC", 188:"\u00BC", frac12:"\u00BD", 189:"\u00BD", frac34:"\u00BE", 190:"\u00BE", iquest:"\u00BF", 191:"\u00BF", Agrave:"\u00C0", 192:"\u00C0", Aacute:"\u00C1", 193:"\u00C1", Acirc:"\u00C2", 194:"\u00C2", Atilde:"\u00C3", 195:"\u00C3", Auml:"\u00C4", 196:"\u00C4", Aring:"\u00C5", 197:"\u00C5", Aelig:"\u00C6", 198:"\u00C6", Ccedil:"\u00C7", 199:"\u00C7", Egrave:"\u00C8", 200:"\u00C8", Eacute:"\u00C9", 201:"\u00C9", Ecirc:"\u00CA", 202:"\u00CA", Euml:"\u00CB", 203:"\u00CB", Igrave:"\u00CC", 204:"\u00CC", Iacute:"\u00CD", 205:"\u00CD", Icirc:"\u00CE", 206:"\u00CE", Iuml:"\u00CF", 207:"\u00CF", ETH:"\u00D0", 208:"\u00D0", Ntilde:"\u00D1", 209:"\u00D1", Ograve:"\u00D2", 210:"\u00D2", Oacute:"\u00D3", 211:"\u00D3", Ocirc:"\u00D4", 212:"\u00D4", Otilde:"\u00D5", 213:"\u00D5", Ouml:"\u00D6", 214:"\u00D6", times:"\u00D7", 215:"\u00D7", Oslash:"\u00D8", 216:"\u00D8", Ugrave:"\u00D9", 217:"\u00D9", Uacute:"\u00DA", 218:"\u00DA", Ucirc:"\u00DB", 219:"\u00DB", Uuml:"\u00DC", 220:"\u00DC", Yacute:"\u00DD", 221:"\u00DD", THORN:"\u00DE", 222:"\u00DE", szlig:"\u00DF", 223:"\u00DF", agrave:"\u00E0", 224:"\u00E0", aacute:"\u00E1", 225:"\u00E1", acirc:"\u00E2", 226:"\u00E2", atilde:"\u00E3", 227:"\u00E3", auml:"\u00E4", 228:"\u00E4", aring:"\u00E5", 229:"\u00E5", aelig:"\u00E6", 230:"\u00E6", ccedil:"\u00E7", 231:"\u00E7", egrave:"\u00E8", 232:"\u00E8", eacute:"\u00E9", 233:"\u00E9", ecirc:"\u00EA", 234:"\u00EA", euml:"\u00EB", 235:"\u00EB", igrave:"\u00EC", 236:"\u00EC", iacute:"\u00ED", 237:"\u00ED", icirc:"\u00EE", 238:"\u00EE", iuml:"\u00EF", 239:"\u00EF", eth:"\u00F0", 240:"\u00F0", ntilde:"\u00F1", 241:"\u00F1", ograve:"\u00F2", 242:"\u00F2", oacute:"\u00F3", 243:"\u00F3", ocirc:"\u00F4", 244:"\u00F4", otilde:"\u00F5", 245:"\u00F5", ouml:"\u00F6", 246:"\u00F6", divide:"\u00F7", 247:"\u00F7", oslash:"\u00F8", 248:"\u00F8", ugrave:"\u00F9", 249:"\u00F9", uacute:"\u00FA", 250:"\u00FA", ucirc:"\u00FB", 251:"\u00FB", uuml:"\u00FC", 252:"\u00FC", yacute:"\u00FD", 253:"\u00FD", thorn:"\u00FE", 254:"\u00FE", yuml:"\u00FF", 255:"\u00FF", OElig:"\u0152", 338:"\u0152", oelig:"\u0153", 339:"\u0153", Scaron:"\u0160", 352:"\u0160", scaron:"\u0161", 353:"\u0161", Yuml:"\u0178", 376:"\u0178", fnof:"\u0192", 402:"\u0192", circ:"\u02C6", 710:"\u02C6", tilde:"\u02DC", 732:"\u02DC", Alpha:"\u0391", 913:"\u0391", Beta:"\u0392", 914:"\u0392", Gamma:"\u0393", 915:"\u0393", Delta:"\u0394", 916:"\u0394", Epsilon:"\u0395", 917:"\u0395", Zeta:"\u0396", 918:"\u0396", Eta:"\u0397", 919:"\u0397", Theta:"\u0398", 920:"\u0398", Iota:"\u0399", 921:"\u0399", Kappa:"\u039A", 922:"\u039A", Lambda:"\u039B", 923:"\u039B", Mu:"\u039C", 924:"\u039C", Nu:"\u039D", 925:"\u039D", Xi:"\u039E", 926:"\u039E", Omicron:"\u039F", 927:"\u039F", Pi:"\u03A0", 928:"\u03A0", Rho:"\u03A1", 929:"\u03A1", Sigma:"\u03A3", 931:"\u03A3", Tau:"\u03A4", 932:"\u03A4", Upsilon:"\u03A5", 933:"\u03A5", Phi:"\u03A6", 934:"\u03A6", Chi:"\u03A7", 935:"\u03A7", Psi:"\u03A8", 936:"\u03A8", Omega:"\u03A9", 937:"\u03A9", alpha:"\u03B1", 945:"\u03B1", beta:"\u03B2", 946:"\u03B2", gamma:"\u03B3", 947:"\u03B3", delta:"\u03B4", 948:"\u03B4", epsilon:"\u03B5", 949:"\u03B5", zeta:"\u03B6", 950:"\u03B6", eta:"\u03B7", 951:"\u03B7", theta:"\u03B8", 952:"\u03B8", iota:"\u03B9", 953:"\u03B9", kappa:"\u03BA", 954:"\u03BA", lambda:"\u03BB", 955:"\u03BB", mu:"\u03BC", 956:"\u03BC", nu:"\u03BD", 957:"\u03BD", xi:"\u03BE", 958:"\u03BE", omicron:"\u03BF", 959:"\u03BF", pi:"\u03C0", 960:"\u03C0", rho:"\u03C1", 961:"\u03C1", sigmaf:"\u03C2", 962:"\u03C2", sigma:"\u03C3", 963:"\u03C3", tau:"\u03C4", 964:"\u03C4", upsilon:"\u03C5", 965:"\u03C5", phi:"\u03C6", 966:"\u03C6", chi:"\u03C7", 967:"\u03C7", psi:"\u03C8", 968:"\u03C8", omega:"\u03C9", 969:"\u03C9", thetasym:"\u03D1", 977:"\u03D1", upsih:"\u03D2", 978:"\u03D2", piv:"\u03D6", 982:"\u03D6", ensp:"\u2002", 8194:"\u2002", emsp:"\u2003", 8195:"\u2003", thinsp:"\u2009", 8201:"\u2009", zwnj:"\u200C", 8204:"\u200C", zwj:"\u200D", 8205:"\u200D", lrm:"\u200E", 8206:"\u200E", rlm:"\u200F", 8207:"\u200F", ndash:"\u2013", 8211:"\u2013", mdash:"\u2014", 8212:"\u2014", lsquo:"\u2018", 8216:"\u2018", rsquo:"\u2019", 8217:"\u2019", sbquo:"\u201A", 8218:"\u201A", ldquo:"\u201C", 8220:"\u201C", rdquo:"\u201D", 8221:"\u201D", bdquo:"\u201E", 8222:"\u201E", dagger:"\u2020", 8224:"\u2020", Dagger:"\u2021", 8225:"\u2021", bull:"\u2022", 8226:"\u2022", hellip:"\u2026", 8230:"\u2026", permil:"\u2030", 8240:"\u2030", prime:"\u2032", 8242:"\u2032", Prime:"\u2033", 8243:"\u2033", lsaquo:"\u2039", 8249:"\u2039", rsaquo:"\u203A", 8250:"\u203A", oline:"\u203E", 8254:"\u203E", frasl:"\u2044", 8260:"\u2044", euro:"\u20AC", 8364:"\u20AC", image:"\u2111", 8465:"\u2111", weierp:"\u2118", 8472:"\u2118", real:"\u211C", 8476:"\u211C", trade:"\u2122", 8482:"\u2122", alefsym:"\u2135", 8501:"\u2135", larr:"\u2190", 8592:"\u2190", uarr:"\u2191", 8593:"\u2191", rarr:"\u2192", 8594:"\u2192", darr:"\u2193", 8595:"\u2193", harr:"\u2194", 8596:"\u2194", crarr:"\u21B5", 8629:"\u21B5", lArr:"\u21D0", 8656:"\u21D0", uArr:"\u21D1", 8657:"\u21D1", rArr:"\u21D2", 8658:"\u21D2", dArr:"\u21D3", 8659:"\u21D3", hArr:"\u21D4", 8660:"\u21D4", forall:"\u2200", 8704:"\u2200", part:"\u2202", 8706:"\u2202", exist:"\u2203", 8707:"\u2203", empty:"\u2205", 8709:"\u2205", nabla:"\u2207", 8711:"\u2207", isin:"\u2208", 8712:"\u2208", notin:"\u2209", 8713:"\u2209", ni:"\u220B", 8715:"\u220B", prod:"\u220F", 8719:"\u220F", sum:"\u2211", 8721:"\u2211", minus:"\u2212", 8722:"\u2212", lowast:"\u2217", 8727:"\u2217", radic:"\u221A", 8730:"\u221A", prop:"\u221D", 8733:"\u221D", infin:"\u221E", 8734:"\u221E", ang:"\u2220", 8736:"\u2220", and:"\u2227", 8743:"\u2227", or:"\u2228", 8744:"\u2228", cap:"\u2229", 8745:"\u2229", cup:"\u222A", 8746:"\u222A", int:"\u222B", 8747:"\u222B", there4:"\u2234", 8756:"\u2234", sim:"\u223C", 8764:"\u223C", cong:"\u2245", 8773:"\u2245", asymp:"\u2248", 8776:"\u2248", ne:"\u2260", 8800:"\u2260", equiv:"\u2261", 8801:"\u2261", le:"\u2264", 8804:"\u2264", ge:"\u2265", 8805:"\u2265", sub:"\u2282", 8834:"\u2282", sup:"\u2283", 8835:"\u2283", nsub:"\u2284", 8836:"\u2284", sube:"\u2286", 8838:"\u2286", supe:"\u2287", 8839:"\u2287", oplus:"\u2295", 8853:"\u2295", otimes:"\u2297", 8855:"\u2297", perp:"\u22A5", 8869:"\u22A5", sdot:"\u22C5", 8901:"\u22C5", lceil:"\u2308", 8968:"\u2308", rceil:"\u2309", 8969:"\u2309", lfloor:"\u230A", 8970:"\u230A", rfloor:"\u230B", 8971:"\u230B", lang:"\u2329", 9001:"\u2329", rang:"\u232A", 9002:"\u232A", loz:"\u25CA", 9674:"\u25CA", spades:"\u2660", 9824:"\u2660", clubs:"\u2663", 9827:"\u2663", hearts:"\u2665", 9829:"\u2665", diams:"\u2666", 9830:"\u2666"

}

var encodeRegex = /["&<>\u00a0-\u00ff\u0152\u0153\u0160\u0161\u0178\u0192\u02c6\u02dc\u0391-\u03a1\u03a3-\u03a9\u03b1-\u03c9\u03d1\u03d2\u03d6\u2002\u2003\u2009\u200c-\u200f\u2013\u2014\u2018-\u201a\u201c-\u201e\u2020-\u2022\u2026\u2030\u2032\u2033\u2039\u203a\u203e\u2044\u20ac\u2111\u2118\u211c\u2122\u2135\u2190-\u2194\u21b5\u21d0-\u21d4\u2200\u2202\u2203\u2205\u2207-\u2209\u220b\u220f\u2211\u2212\u2217\u221a\u221d\u221e\u2220\u2227-\u222b\u2234\u223c\u2245\u2248\u2260\u2261\u2264\u2265\u2282-\u2284\u2286\u2287\u2295\u2297\u22a5\u22c5\u2308-\u230b\u2329\u232a\u25ca\u2660\u2663\u2665\u2666]/g

var decodeRegex = /&(?:(?:#)|(?:quot|amp|lt|gt|nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|Aelig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|OElig|oelig|Scaron|scaron|Yuml|fnof|circ|tilde|Alpha|Beta|Gamma|Delta|Epsilon|Zeta|Eta|Theta|Iota|Kappa|Lambda|Mu|Nu|Xi|Omicron|Pi|Rho|Sigma|Tau|Upsilon|Phi|Chi|Psi|Omega|alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigmaf|sigma|tau|upsilon|phi|chi|psi|omega|thetasym|upsih|piv|ensp|emsp|thinsp|zwnj|zwj|lrm|rlm|ndash|mdash|lsquo|rsquo|sbquo|ldquo|rdquo|bdquo|dagger|Dagger|bull|hellip|permil|prime|Prime|lsaquo|rsaquo|oline|frasl|euro|image|weierp|real|trade|alefsym|larr|uarr|rarr|darr|harr|crarr|lArr|uArr|rArr|dArr|hArr|forall|part|exist|empty|nabla|isin|notin|ni|prod|sum|minus|lowast|radic|prop|infin|ang|and|or|cap|cup|int|there4|sim|cong|asymp|ne|equiv|le|ge|sub|sup|nsub|sube|supe|oplus|otimes|perp|sdot|lceil|rceil|lfloor|rfloor|lang|rang|loz|spades|clubs|hearts|diams));/g

sensor isEmpty opt ? -> !=true

    if hasval a
        case-if a
            $ ifnot (eq length a 0
                     or
                     match a /^\s+$/)
                    b=false;
            ? ifnot (nullval a)
                    b=false;
        ;;;

anvil encode $ -> $=a

    @purpose encode only uses numeric encoding for html entities;
    if gt length a 0
        replace= b encodeRegex
            func ch$ -> ret$
                vars ev;
                ch = as-string char-code ch
                ev = coalesce encodeMap.(ch) ch;
                if hasval ev
                    ret = con '&' ev ';';
                else
                    ret = con '&#' (as-string char-code ch) ';';
                ;
            ;
    ;;

anvil decode $ -> $=a

    @purpose decode handles numeric or named entities;
    if gt length a 0
        replace= b decodeRegex
            func ch$ -> ret$
                if eq$ char-at ch 1 "#"
                    extract= ch 2 (sub length ch 3)
                else
                    extract= ch 1 (sub length ch 2);
                ret = decodeMap.(ch);
    ;;

-- TYPES --;

type Engine;


-- ACTIONS --;


-- TESTS --;

test ISEMPTY

    vars v=[undefined,null,"","  "];

test-eq : should see no-arg as empty

    isEmpty() vs true

test-eq : should see undefined as empty

    isEmpty(v[0]) vs true

test-eq : should see null as empty

    isEmpty(v[1]) vs true

test-eq : should see empty-string as empty

    isEmpty(v[2]) vs true

test-eq : should see spaces as empty

    isEmpty(v[3]) vs true
    ;

test ENCODE_DECODE

test-eq : should encode quot

    encode("\u0022") vs "&quot;"

test-eq : should decode quot

    decode("&quot;") vs "\u0022"

test-eq : should decode numeric quot

    decode("&#34;") vs "\u0022"

test-eq : should encode amp

    encode("\u0026") vs "&amp;"

test-eq : should decode amp

    decode("&amp;") vs "\u0026"

test-eq : should decode numeric amp

    decode("&#38;") vs "\u0026"

test-eq : should encode lt

    encode("\u003C") vs "&lt;"

test-eq : should decode lt

    decode("&lt;") vs "\u003C"

test-eq : should decode numeric lt

    decode("&#60;") vs "\u003C"

test-eq : should encode gt

    encode("\u003E") vs "&gt;"

test-eq : should decode gt

    decode("&gt;") vs "\u003E"

test-eq : should decode numeric gt

    decode("&#62;") vs "\u003E"

test-eq : should encode nbsp

    encode("\u00A0") vs "&nbsp;"

test-eq : should decode nbsp

    decode("&nbsp;") vs "\u00A0"

test-eq : should decode numeric nbsp

    decode("&#160;") vs "\u00A0"

test-eq : should encode iexcl

    encode("\u00A1") vs "&iexcl;"

test-eq : should decode iexcl

    decode("&iexcl;") vs "\u00A1"

test-eq : should decode numeric iexcl

    decode("&#161;") vs "\u00A1"

test-eq : should encode cent

    encode("\u00A2") vs "&cent;"

test-eq : should decode cent

    decode("&cent;") vs "\u00A2"

test-eq : should decode numeric cent

    decode("&#162;") vs "\u00A2"

test-eq : should encode pound

    encode("\u00A3") vs "&pound;"

test-eq : should decode pound

    decode("&pound;") vs "\u00A3"

test-eq : should decode numeric pound

    decode("&#163;") vs "\u00A3"

test-eq : should encode curren

    encode("\u00A4") vs "&curren;"

test-eq : should decode curren

    decode("&curren;") vs "\u00A4"

test-eq : should decode numeric curren

    decode("&#164;") vs "\u00A4"

test-eq : should encode yen

    encode("\u00A5") vs "&yen;"

test-eq : should decode yen

    decode("&yen;") vs "\u00A5"

test-eq : should decode numeric yen

    decode("&#165;") vs "\u00A5"

test-eq : should encode brvbar

    encode("\u00A6") vs "&brvbar;"

test-eq : should decode brvbar

    decode("&brvbar;") vs "\u00A6"

test-eq : should decode numeric brvbar

    decode("&#166;") vs "\u00A6"

test-eq : should encode sect

    encode("\u00A7") vs "&sect;"

test-eq : should decode sect

    decode("&sect;") vs "\u00A7"

test-eq : should decode numeric sect

    decode("&#167;") vs "\u00A7"

test-eq : should encode uml

    encode("\u00A8") vs "&uml;"

test-eq : should decode uml

    decode("&uml;") vs "\u00A8"

test-eq : should decode numeric uml

    decode("&#168;") vs "\u00A8"

test-eq : should encode copy

    encode("\u00A9") vs "&copy;"

test-eq : should decode copy

    decode("&copy;") vs "\u00A9"

test-eq : should decode numeric copy

    decode("&#169;") vs "\u00A9"

test-eq : should encode ordf

    encode("\u00AA") vs "&ordf;"

test-eq : should decode ordf

    decode("&ordf;") vs "\u00AA"

test-eq : should decode numeric ordf

    decode("&#170;") vs "\u00AA"

test-eq : should encode laquo

    encode("\u00AB") vs "&laquo;"

test-eq : should decode laquo

    decode("&laquo;") vs "\u00AB"

test-eq : should decode numeric laquo

    decode("&#171;") vs "\u00AB"

test-eq : should encode not

    encode("\u00AC") vs "&not;"

test-eq : should decode not

    decode("&not;") vs "\u00AC"

test-eq : should decode numeric not

    decode("&#172;") vs "\u00AC"

test-eq : should encode shy

    encode("\u00AD") vs "&shy;"

test-eq : should decode shy

    decode("&shy;") vs "\u00AD"

test-eq : should decode numeric shy

    decode("&#173;") vs "\u00AD"

test-eq : should encode reg

    encode("\u00AE") vs "&reg;"

test-eq : should decode reg

    decode("&reg;") vs "\u00AE"

test-eq : should decode numeric reg

    decode("&#174;") vs "\u00AE"

test-eq : should encode macr

    encode("\u00AF") vs "&macr;"

test-eq : should decode macr

    decode("&macr;") vs "\u00AF"

test-eq : should decode numeric macr

    decode("&#175;") vs "\u00AF"

test-eq : should encode deg

    encode("\u00B0") vs "&deg;"

test-eq : should decode deg

    decode("&deg;") vs "\u00B0"

test-eq : should decode numeric deg

    decode("&#176;") vs "\u00B0"

test-eq : should encode plusmn

    encode("\u00B1") vs "&plusmn;"

test-eq : should decode plusmn

    decode("&plusmn;") vs "\u00B1"

test-eq : should decode numeric plusmn

    decode("&#177;") vs "\u00B1"

test-eq : should encode sup2

    encode("\u00B2") vs "&sup2;"

test-eq : should decode sup2

    decode("&sup2;") vs "\u00B2"

test-eq : should decode numeric sup2

    decode("&#178;") vs "\u00B2"

test-eq : should encode sup3

    encode("\u00B3") vs "&sup3;"

test-eq : should decode sup3

    decode("&sup3;") vs "\u00B3"

test-eq : should decode numeric sup3

    decode("&#179;") vs "\u00B3"

test-eq : should encode acute

    encode("\u00B4") vs "&acute;"

test-eq : should decode acute

    decode("&acute;") vs "\u00B4"

test-eq : should decode numeric acute

    decode("&#180;") vs "\u00B4"

test-eq : should encode micro

    encode("\u00B5") vs "&micro;"

test-eq : should decode micro

    decode("&micro;") vs "\u00B5"

test-eq : should decode numeric micro

    decode("&#181;") vs "\u00B5"

test-eq : should encode para

    encode("\u00B6") vs "&para;"

test-eq : should decode para

    decode("&para;") vs "\u00B6"

test-eq : should decode numeric para

    decode("&#182;") vs "\u00B6"

test-eq : should encode middot

    encode("\u00B7") vs "&middot;"

test-eq : should decode middot

    decode("&middot;") vs "\u00B7"

test-eq : should decode numeric middot

    decode("&#183;") vs "\u00B7"

test-eq : should encode cedil

    encode("\u00B8") vs "&cedil;"

test-eq : should decode cedil

    decode("&cedil;") vs "\u00B8"

test-eq : should decode numeric cedil

    decode("&#184;") vs "\u00B8"

test-eq : should encode sup1

    encode("\u00B9") vs "&sup1;"

test-eq : should decode sup1

    decode("&sup1;") vs "\u00B9"

test-eq : should decode numeric sup1

    decode("&#185;") vs "\u00B9"

test-eq : should encode ordm

    encode("\u00BA") vs "&ordm;"

test-eq : should decode ordm

    decode("&ordm;") vs "\u00BA"

test-eq : should decode numeric ordm

    decode("&#186;") vs "\u00BA"

test-eq : should encode raquo

    encode("\u00BB") vs "&raquo;"

test-eq : should decode raquo

    decode("&raquo;") vs "\u00BB"

test-eq : should decode numeric raquo

    decode("&#187;") vs "\u00BB"

test-eq : should encode frac14

    encode("\u00BC") vs "&frac14;"

test-eq : should decode frac14

    decode("&frac14;") vs "\u00BC"

test-eq : should decode numeric frac14

    decode("&#188;") vs "\u00BC"

test-eq : should encode frac12

    encode("\u00BD") vs "&frac12;"

test-eq : should decode frac12

    decode("&frac12;") vs "\u00BD"

test-eq : should decode numeric frac12

    decode("&#189;") vs "\u00BD"

test-eq : should encode frac34

    encode("\u00BE") vs "&frac34;"

test-eq : should decode frac34

    decode("&frac34;") vs "\u00BE"

test-eq : should decode numeric frac34

    decode("&#190;") vs "\u00BE"

test-eq : should encode iquest

    encode("\u00BF") vs "&iquest;"

test-eq : should decode iquest

    decode("&iquest;") vs "\u00BF"

test-eq : should decode numeric iquest

    decode("&#191;") vs "\u00BF"

test-eq : should encode Agrave

    encode("\u00C0") vs "&Agrave;"

test-eq : should decode Agrave

    decode("&Agrave;") vs "\u00C0"

test-eq : should decode numeric Agrave

    decode("&#192;") vs "\u00C0"

test-eq : should encode Aacute

    encode("\u00C1") vs "&Aacute;"

test-eq : should decode Aacute

    decode("&Aacute;") vs "\u00C1"

test-eq : should decode numeric Aacute

    decode("&#193;") vs "\u00C1"

test-eq : should encode Acirc

    encode("\u00C2") vs "&Acirc;"

test-eq : should decode Acirc

    decode("&Acirc;") vs "\u00C2"

test-eq : should decode numeric Acirc

    decode("&#194;") vs "\u00C2"

test-eq : should encode Atilde

    encode("\u00C3") vs "&Atilde;"

test-eq : should decode Atilde

    decode("&Atilde;") vs "\u00C3"

test-eq : should decode numeric Atilde

    decode("&#195;") vs "\u00C3"

test-eq : should encode Auml

    encode("\u00C4") vs "&Auml;"

test-eq : should decode Auml

    decode("&Auml;") vs "\u00C4"

test-eq : should decode numeric Auml

    decode("&#196;") vs "\u00C4"

test-eq : should encode Aring

    encode("\u00C5") vs "&Aring;"

test-eq : should decode Aring

    decode("&Aring;") vs "\u00C5"

test-eq : should decode numeric Aring

    decode("&#197;") vs "\u00C5"

test-eq : should encode Aelig

    encode("\u00C6") vs "&Aelig;"

test-eq : should decode Aelig

    decode("&Aelig;") vs "\u00C6"

test-eq : should decode numeric Aelig

    decode("&#198;") vs "\u00C6"

test-eq : should encode Ccedil

    encode("\u00C7") vs "&Ccedil;"

test-eq : should decode Ccedil

    decode("&Ccedil;") vs "\u00C7"

test-eq : should decode numeric Ccedil

    decode("&#199;") vs "\u00C7"

test-eq : should encode Egrave

    encode("\u00C8") vs "&Egrave;"

test-eq : should decode Egrave

    decode("&Egrave;") vs "\u00C8"

test-eq : should decode numeric Egrave

    decode("&#200;") vs "\u00C8"

test-eq : should encode Eacute

    encode("\u00C9") vs "&Eacute;"

test-eq : should decode Eacute

    decode("&Eacute;") vs "\u00C9"

test-eq : should decode numeric Eacute

    decode("&#201;") vs "\u00C9"

test-eq : should encode Ecirc

    encode("\u00CA") vs "&Ecirc;"

test-eq : should decode Ecirc

    decode("&Ecirc;") vs "\u00CA"

test-eq : should decode numeric Ecirc

    decode("&#202;") vs "\u00CA"

test-eq : should encode Euml

    encode("\u00CB") vs "&Euml;"

test-eq : should decode Euml

    decode("&Euml;") vs "\u00CB"

test-eq : should decode numeric Euml

    decode("&#203;") vs "\u00CB"

test-eq : should encode Igrave

    encode("\u00CC") vs "&Igrave;"

test-eq : should decode Igrave

    decode("&Igrave;") vs "\u00CC"

test-eq : should decode numeric Igrave

    decode("&#204;") vs "\u00CC"

test-eq : should encode Iacute

    encode("\u00CD") vs "&Iacute;"

test-eq : should decode Iacute

    decode("&Iacute;") vs "\u00CD"

test-eq : should decode numeric Iacute

    decode("&#205;") vs "\u00CD"

test-eq : should encode Icirc

    encode("\u00CE") vs "&Icirc;"

test-eq : should decode Icirc

    decode("&Icirc;") vs "\u00CE"

test-eq : should decode numeric Icirc

    decode("&#206;") vs "\u00CE"

test-eq : should encode Iuml

    encode("\u00CF") vs "&Iuml;"

test-eq : should decode Iuml

    decode("&Iuml;") vs "\u00CF"

test-eq : should decode numeric Iuml

    decode("&#207;") vs "\u00CF"

test-eq : should encode ETH

    encode("\u00D0") vs "&ETH;"

test-eq : should decode ETH

    decode("&ETH;") vs "\u00D0"

test-eq : should decode numeric ETH

    decode("&#208;") vs "\u00D0"

test-eq : should encode Ntilde

    encode("\u00D1") vs "&Ntilde;"

test-eq : should decode Ntilde

    decode("&Ntilde;") vs "\u00D1"

test-eq : should decode numeric Ntilde

    decode("&#209;") vs "\u00D1"

test-eq : should encode Ograve

    encode("\u00D2") vs "&Ograve;"

test-eq : should decode Ograve

    decode("&Ograve;") vs "\u00D2"

test-eq : should decode numeric Ograve

    decode("&#210;") vs "\u00D2"

test-eq : should encode Oacute

    encode("\u00D3") vs "&Oacute;"

test-eq : should decode Oacute

    decode("&Oacute;") vs "\u00D3"

test-eq : should decode numeric Oacute

    decode("&#211;") vs "\u00D3"

test-eq : should encode Ocirc

    encode("\u00D4") vs "&Ocirc;"

test-eq : should decode Ocirc

    decode("&Ocirc;") vs "\u00D4"

test-eq : should decode numeric Ocirc

    decode("&#212;") vs "\u00D4"

test-eq : should encode Otilde

    encode("\u00D5") vs "&Otilde;"

test-eq : should decode Otilde

    decode("&Otilde;") vs "\u00D5"

test-eq : should decode numeric Otilde

    decode("&#213;") vs "\u00D5"

test-eq : should encode Ouml

    encode("\u00D6") vs "&Ouml;"

test-eq : should decode Ouml

    decode("&Ouml;") vs "\u00D6"

test-eq : should decode numeric Ouml

    decode("&#214;") vs "\u00D6"

test-eq : should encode times

    encode("\u00D7") vs "&times;"

test-eq : should decode times

    decode("&times;") vs "\u00D7"

test-eq : should decode numeric times

    decode("&#215;") vs "\u00D7"

test-eq : should encode Oslash

    encode("\u00D8") vs "&Oslash;"

test-eq : should decode Oslash

    decode("&Oslash;") vs "\u00D8"

test-eq : should decode numeric Oslash

    decode("&#216;") vs "\u00D8"

test-eq : should encode Ugrave

    encode("\u00D9") vs "&Ugrave;"

test-eq : should decode Ugrave

    decode("&Ugrave;") vs "\u00D9"

test-eq : should decode numeric Ugrave

    decode("&#217;") vs "\u00D9"

test-eq : should encode Uacute

    encode("\u00DA") vs "&Uacute;"

test-eq : should decode Uacute

    decode("&Uacute;") vs "\u00DA"

test-eq : should decode numeric Uacute

    decode("&#218;") vs "\u00DA"

test-eq : should encode Ucirc

    encode("\u00DB") vs "&Ucirc;"

test-eq : should decode Ucirc

    decode("&Ucirc;") vs "\u00DB"

test-eq : should decode numeric Ucirc

    decode("&#219;") vs "\u00DB"

test-eq : should encode Uuml

    encode("\u00DC") vs "&Uuml;"

test-eq : should decode Uuml

    decode("&Uuml;") vs "\u00DC"

test-eq : should decode numeric Uuml

    decode("&#220;") vs "\u00DC"

test-eq : should encode Yacute

    encode("\u00DD") vs "&Yacute;"

test-eq : should decode Yacute

    decode("&Yacute;") vs "\u00DD"

test-eq : should decode numeric Yacute

    decode("&#221;") vs "\u00DD"

test-eq : should encode THORN

    encode("\u00DE") vs "&THORN;"

test-eq : should decode THORN

    decode("&THORN;") vs "\u00DE"

test-eq : should decode numeric THORN

    decode("&#222;") vs "\u00DE"

test-eq : should encode szlig

    encode("\u00DF") vs "&szlig;"

test-eq : should decode szlig

    decode("&szlig;") vs "\u00DF"

test-eq : should decode numeric szlig

    decode("&#223;") vs "\u00DF"

test-eq : should encode agrave

    encode("\u00E0") vs "&agrave;"

test-eq : should decode agrave

    decode("&agrave;") vs "\u00E0"

test-eq : should decode numeric agrave

    decode("&#224;") vs "\u00E0"

test-eq : should encode aacute

    encode("\u00E1") vs "&aacute;"

test-eq : should decode aacute

    decode("&aacute;") vs "\u00E1"

test-eq : should decode numeric aacute

    decode("&#225;") vs "\u00E1"

test-eq : should encode acirc

    encode("\u00E2") vs "&acirc;"

test-eq : should decode acirc

    decode("&acirc;") vs "\u00E2"

test-eq : should decode numeric acirc

    decode("&#226;") vs "\u00E2"

test-eq : should encode atilde

    encode("\u00E3") vs "&atilde;"

test-eq : should decode atilde

    decode("&atilde;") vs "\u00E3"

test-eq : should decode numeric atilde

    decode("&#227;") vs "\u00E3"

test-eq : should encode auml

    encode("\u00E4") vs "&auml;"

test-eq : should decode auml

    decode("&auml;") vs "\u00E4"

test-eq : should decode numeric auml

    decode("&#228;") vs "\u00E4"

test-eq : should encode aring

    encode("\u00E5") vs "&aring;"

test-eq : should decode aring

    decode("&aring;") vs "\u00E5"

test-eq : should decode numeric aring

    decode("&#229;") vs "\u00E5"

test-eq : should encode aelig

    encode("\u00E6") vs "&aelig;"

test-eq : should decode aelig

    decode("&aelig;") vs "\u00E6"

test-eq : should decode numeric aelig

    decode("&#230;") vs "\u00E6"

test-eq : should encode ccedil

    encode("\u00E7") vs "&ccedil;"

test-eq : should decode ccedil

    decode("&ccedil;") vs "\u00E7"

test-eq : should decode numeric ccedil

    decode("&#231;") vs "\u00E7"

test-eq : should encode egrave

    encode("\u00E8") vs "&egrave;"

test-eq : should decode egrave

    decode("&egrave;") vs "\u00E8"

test-eq : should decode numeric egrave

    decode("&#232;") vs "\u00E8"

test-eq : should encode eacute

    encode("\u00E9") vs "&eacute;"

test-eq : should decode eacute

    decode("&eacute;") vs "\u00E9"

test-eq : should decode numeric eacute

    decode("&#233;") vs "\u00E9"

test-eq : should encode ecirc

    encode("\u00EA") vs "&ecirc;"

test-eq : should decode ecirc

    decode("&ecirc;") vs "\u00EA"

test-eq : should decode numeric ecirc

    decode("&#234;") vs "\u00EA"

test-eq : should encode euml

    encode("\u00EB") vs "&euml;"

test-eq : should decode euml

    decode("&euml;") vs "\u00EB"

test-eq : should decode numeric euml

    decode("&#235;") vs "\u00EB"

test-eq : should encode igrave

    encode("\u00EC") vs "&igrave;"

test-eq : should decode igrave

    decode("&igrave;") vs "\u00EC"

test-eq : should decode numeric igrave

    decode("&#236;") vs "\u00EC"

test-eq : should encode iacute

    encode("\u00ED") vs "&iacute;"

test-eq : should decode iacute

    decode("&iacute;") vs "\u00ED"

test-eq : should decode numeric iacute

    decode("&#237;") vs "\u00ED"

test-eq : should encode icirc

    encode("\u00EE") vs "&icirc;"

test-eq : should decode icirc

    decode("&icirc;") vs "\u00EE"

test-eq : should decode numeric icirc

    decode("&#238;") vs "\u00EE"

test-eq : should encode iuml

    encode("\u00EF") vs "&iuml;"

test-eq : should decode iuml

    decode("&iuml;") vs "\u00EF"

test-eq : should decode numeric iuml

    decode("&#239;") vs "\u00EF"

test-eq : should encode eth

    encode("\u00F0") vs "&eth;"

test-eq : should decode eth

    decode("&eth;") vs "\u00F0"

test-eq : should decode numeric eth

    decode("&#240;") vs "\u00F0"

test-eq : should encode ntilde

    encode("\u00F1") vs "&ntilde;"

test-eq : should decode ntilde

    decode("&ntilde;") vs "\u00F1"

test-eq : should decode numeric ntilde

    decode("&#241;") vs "\u00F1"

test-eq : should encode ograve

    encode("\u00F2") vs "&ograve;"

test-eq : should decode ograve

    decode("&ograve;") vs "\u00F2"

test-eq : should decode numeric ograve

    decode("&#242;") vs "\u00F2"

test-eq : should encode oacute

    encode("\u00F3") vs "&oacute;"

test-eq : should decode oacute

    decode("&oacute;") vs "\u00F3"

test-eq : should decode numeric oacute

    decode("&#243;") vs "\u00F3"

test-eq : should encode ocirc

    encode("\u00F4") vs "&ocirc;"

test-eq : should decode ocirc

    decode("&ocirc;") vs "\u00F4"

test-eq : should decode numeric ocirc

    decode("&#244;") vs "\u00F4"

test-eq : should encode otilde

    encode("\u00F5") vs "&otilde;"

test-eq : should decode otilde

    decode("&otilde;") vs "\u00F5"

test-eq : should decode numeric otilde

    decode("&#245;") vs "\u00F5"

test-eq : should encode ouml

    encode("\u00F6") vs "&ouml;"

test-eq : should decode ouml

    decode("&ouml;") vs "\u00F6"

test-eq : should decode numeric ouml

    decode("&#246;") vs "\u00F6"

test-eq : should encode divide

    encode("\u00F7") vs "&divide;"

test-eq : should decode divide

    decode("&divide;") vs "\u00F7"

test-eq : should decode numeric divide

    decode("&#247;") vs "\u00F7"

test-eq : should encode oslash

    encode("\u00F8") vs "&oslash;"

test-eq : should decode oslash

    decode("&oslash;") vs "\u00F8"

test-eq : should decode numeric oslash

    decode("&#248;") vs "\u00F8"

test-eq : should encode ugrave

    encode("\u00F9") vs "&ugrave;"

test-eq : should decode ugrave

    decode("&ugrave;") vs "\u00F9"

test-eq : should decode numeric ugrave

    decode("&#249;") vs "\u00F9"

test-eq : should encode uacute

    encode("\u00FA") vs "&uacute;"

test-eq : should decode uacute

    decode("&uacute;") vs "\u00FA"

test-eq : should decode numeric uacute

    decode("&#250;") vs "\u00FA"

test-eq : should encode ucirc

    encode("\u00FB") vs "&ucirc;"

test-eq : should decode ucirc

    decode("&ucirc;") vs "\u00FB"

test-eq : should decode numeric ucirc

    decode("&#251;") vs "\u00FB"

test-eq : should encode uuml

    encode("\u00FC") vs "&uuml;"

test-eq : should decode uuml

    decode("&uuml;") vs "\u00FC"

test-eq : should decode numeric uuml

    decode("&#252;") vs "\u00FC"

test-eq : should encode yacute

    encode("\u00FD") vs "&yacute;"

test-eq : should decode yacute

    decode("&yacute;") vs "\u00FD"

test-eq : should decode numeric yacute

    decode("&#253;") vs "\u00FD"

test-eq : should encode thorn

    encode("\u00FE") vs "&thorn;"

test-eq : should decode thorn

    decode("&thorn;") vs "\u00FE"

test-eq : should decode numeric thorn

    decode("&#254;") vs "\u00FE"

test-eq : should encode yuml

    encode("\u00FF") vs "&yuml;"

test-eq : should decode yuml

    decode("&yuml;") vs "\u00FF"

test-eq : should decode numeric yuml

    decode("&#255;") vs "\u00FF"

test-eq : should encode OElig

    encode("\u0152") vs "&OElig;"

test-eq : should decode OElig

    decode("&OElig;") vs "\u0152"

test-eq : should decode numeric OElig

    decode("&#338;") vs "\u0152"

test-eq : should encode oelig

    encode("\u0153") vs "&oelig;"

test-eq : should decode oelig

    decode("&oelig;") vs "\u0153"

test-eq : should decode numeric oelig

    decode("&#339;") vs "\u0153"

test-eq : should encode Scaron

    encode("\u0160") vs "&Scaron;"

test-eq : should decode Scaron

    decode("&Scaron;") vs "\u0160"

test-eq : should decode numeric Scaron

    decode("&#352;") vs "\u0160"

test-eq : should encode scaron

    encode("\u0161") vs "&scaron;"

test-eq : should decode scaron

    decode("&scaron;") vs "\u0161"

test-eq : should decode numeric scaron

    decode("&#353;") vs "\u0161"

test-eq : should encode Yuml

    encode("\u0178") vs "&Yuml;"

test-eq : should decode Yuml

    decode("&Yuml;") vs "\u0178"

test-eq : should decode numeric Yuml

    decode("&#376;") vs "\u0178"

test-eq : should encode fnof

    encode("\u0192") vs "&fnof;"

test-eq : should decode fnof

    decode("&fnof;") vs "\u0192"

test-eq : should decode numeric fnof

    decode("&#402;") vs "\u0192"

test-eq : should encode circ

    encode("\u02C6") vs "&circ;"

test-eq : should decode circ

    decode("&circ;") vs "\u02C6"

test-eq : should decode numeric circ

    decode("&#710;") vs "\u02C6"

test-eq : should encode tilde

    encode("\u02DC") vs "&tilde;"

test-eq : should decode tilde

    decode("&tilde;") vs "\u02DC"

test-eq : should decode numeric tilde

    decode("&#732;") vs "\u02DC"

test-eq : should encode Alpha

    encode("\u0391") vs "&Alpha;"

test-eq : should decode Alpha

    decode("&Alpha;") vs "\u0391"

test-eq : should decode numeric Alpha

    decode("&#913;") vs "\u0391"

test-eq : should encode Beta

    encode("\u0392") vs "&Beta;"

test-eq : should decode Beta

    decode("&Beta;") vs "\u0392"

test-eq : should decode numeric Beta

    decode("&#914;") vs "\u0392"

test-eq : should encode Gamma

    encode("\u0393") vs "&Gamma;"

test-eq : should decode Gamma

    decode("&Gamma;") vs "\u0393"

test-eq : should decode numeric Gamma

    decode("&#915;") vs "\u0393"

test-eq : should encode Delta

    encode("\u0394") vs "&Delta;"

test-eq : should decode Delta

    decode("&Delta;") vs "\u0394"

test-eq : should decode numeric Delta

    decode("&#916;") vs "\u0394"

test-eq : should encode Epsilon

    encode("\u0395") vs "&Epsilon;"

test-eq : should decode Epsilon

    decode("&Epsilon;") vs "\u0395"

test-eq : should decode numeric Epsilon

    decode("&#917;") vs "\u0395"

test-eq : should encode Zeta

    encode("\u0396") vs "&Zeta;"

test-eq : should decode Zeta

    decode("&Zeta;") vs "\u0396"

test-eq : should decode numeric Zeta

    decode("&#918;") vs "\u0396"

test-eq : should encode Eta

    encode("\u0397") vs "&Eta;"

test-eq : should decode Eta

    decode("&Eta;") vs "\u0397"

test-eq : should decode numeric Eta

    decode("&#919;") vs "\u0397"

test-eq : should encode Theta

    encode("\u0398") vs "&Theta;"

test-eq : should decode Theta

    decode("&Theta;") vs "\u0398"

test-eq : should decode numeric Theta

    decode("&#920;") vs "\u0398"

test-eq : should encode Iota

    encode("\u0399") vs "&Iota;"

test-eq : should decode Iota

    decode("&Iota;") vs "\u0399"

test-eq : should decode numeric Iota

    decode("&#921;") vs "\u0399"

test-eq : should encode Kappa

    encode("\u039A") vs "&Kappa;"

test-eq : should decode Kappa

    decode("&Kappa;") vs "\u039A"

test-eq : should decode numeric Kappa

    decode("&#922;") vs "\u039A"

test-eq : should encode Lambda

    encode("\u039B") vs "&Lambda;"

test-eq : should decode Lambda

    decode("&Lambda;") vs "\u039B"

test-eq : should decode numeric Lambda

    decode("&#923;") vs "\u039B"

test-eq : should encode Mu

    encode("\u039C") vs "&Mu;"

test-eq : should decode Mu

    decode("&Mu;") vs "\u039C"

test-eq : should decode numeric Mu

    decode("&#924;") vs "\u039C"

test-eq : should encode Nu

    encode("\u039D") vs "&Nu;"

test-eq : should decode Nu

    decode("&Nu;") vs "\u039D"

test-eq : should decode numeric Nu

    decode("&#925;") vs "\u039D"

test-eq : should encode Xi

    encode("\u039E") vs "&Xi;"

test-eq : should decode Xi

    decode("&Xi;") vs "\u039E"

test-eq : should decode numeric Xi

    decode("&#926;") vs "\u039E"

test-eq : should encode Omicron

    encode("\u039F") vs "&Omicron;"

test-eq : should decode Omicron

    decode("&Omicron;") vs "\u039F"

test-eq : should decode numeric Omicron

    decode("&#927;") vs "\u039F"

test-eq : should encode Pi

    encode("\u03A0") vs "&Pi;"

test-eq : should decode Pi

    decode("&Pi;") vs "\u03A0"

test-eq : should decode numeric Pi

    decode("&#928;") vs "\u03A0"

test-eq : should encode Rho

    encode("\u03A1") vs "&Rho;"

test-eq : should decode Rho

    decode("&Rho;") vs "\u03A1"

test-eq : should decode numeric Rho

    decode("&#929;") vs "\u03A1"

test-eq : should encode Sigma

    encode("\u03A3") vs "&Sigma;"

test-eq : should decode Sigma

    decode("&Sigma;") vs "\u03A3"

test-eq : should decode numeric Sigma

    decode("&#931;") vs "\u03A3"

test-eq : should encode Tau

    encode("\u03A4") vs "&Tau;"

test-eq : should decode Tau

    decode("&Tau;") vs "\u03A4"

test-eq : should decode numeric Tau

    decode("&#932;") vs "\u03A4"

test-eq : should encode Upsilon

    encode("\u03A5") vs "&Upsilon;"

test-eq : should decode Upsilon

    decode("&Upsilon;") vs "\u03A5"

test-eq : should decode numeric Upsilon

    decode("&#933;") vs "\u03A5"

test-eq : should encode Phi

    encode("\u03A6") vs "&Phi;"

test-eq : should decode Phi

    decode("&Phi;") vs "\u03A6"

test-eq : should decode numeric Phi

    decode("&#934;") vs "\u03A6"

test-eq : should encode Chi

    encode("\u03A7") vs "&Chi;"

test-eq : should decode Chi

    decode("&Chi;") vs "\u03A7"

test-eq : should decode numeric Chi

    decode("&#935;") vs "\u03A7"

test-eq : should encode Psi

    encode("\u03A8") vs "&Psi;"

test-eq : should decode Psi

    decode("&Psi;") vs "\u03A8"

test-eq : should decode numeric Psi

    decode("&#936;") vs "\u03A8"

test-eq : should encode Omega

    encode("\u03A9") vs "&Omega;"

test-eq : should decode Omega

    decode("&Omega;") vs "\u03A9"

test-eq : should decode numeric Omega

    decode("&#937;") vs "\u03A9"

test-eq : should encode alpha

    encode("\u03B1") vs "&alpha;"

test-eq : should decode alpha

    decode("&alpha;") vs "\u03B1"

test-eq : should decode numeric alpha

    decode("&#945;") vs "\u03B1"

test-eq : should encode beta

    encode("\u03B2") vs "&beta;"

test-eq : should decode beta

    decode("&beta;") vs "\u03B2"

test-eq : should decode numeric beta

    decode("&#946;") vs "\u03B2"

test-eq : should encode gamma

    encode("\u03B3") vs "&gamma;"

test-eq : should decode gamma

    decode("&gamma;") vs "\u03B3"

test-eq : should decode numeric gamma

    decode("&#947;") vs "\u03B3"

test-eq : should encode delta

    encode("\u03B4") vs "&delta;"

test-eq : should decode delta

    decode("&delta;") vs "\u03B4"

test-eq : should decode numeric delta

    decode("&#948;") vs "\u03B4"

test-eq : should encode epsilon

    encode("\u03B5") vs "&epsilon;"

test-eq : should decode epsilon

    decode("&epsilon;") vs "\u03B5"

test-eq : should decode numeric epsilon

    decode("&#949;") vs "\u03B5"

test-eq : should encode zeta

    encode("\u03B6") vs "&zeta;"

test-eq : should decode zeta

    decode("&zeta;") vs "\u03B6"

test-eq : should decode numeric zeta

    decode("&#950;") vs "\u03B6"

test-eq : should encode eta

    encode("\u03B7") vs "&eta;"

test-eq : should decode eta

    decode("&eta;") vs "\u03B7"

test-eq : should decode numeric eta

    decode("&#951;") vs "\u03B7"

test-eq : should encode theta

    encode("\u03B8") vs "&theta;"

test-eq : should decode theta

    decode("&theta;") vs "\u03B8"

test-eq : should decode numeric theta

    decode("&#952;") vs "\u03B8"

test-eq : should encode iota

    encode("\u03B9") vs "&iota;"

test-eq : should decode iota

    decode("&iota;") vs "\u03B9"

test-eq : should decode numeric iota

    decode("&#953;") vs "\u03B9"

test-eq : should encode kappa

    encode("\u03BA") vs "&kappa;"

test-eq : should decode kappa

    decode("&kappa;") vs "\u03BA"

test-eq : should decode numeric kappa

    decode("&#954;") vs "\u03BA"

test-eq : should encode lambda

    encode("\u03BB") vs "&lambda;"

test-eq : should decode lambda

    decode("&lambda;") vs "\u03BB"

test-eq : should decode numeric lambda

    decode("&#955;") vs "\u03BB"

test-eq : should encode mu

    encode("\u03BC") vs "&mu;"

test-eq : should decode mu

    decode("&mu;") vs "\u03BC"

test-eq : should decode numeric mu

    decode("&#956;") vs "\u03BC"

test-eq : should encode nu

    encode("\u03BD") vs "&nu;"

test-eq : should decode nu

    decode("&nu;") vs "\u03BD"

test-eq : should decode numeric nu

    decode("&#957;") vs "\u03BD"

test-eq : should encode xi

    encode("\u03BE") vs "&xi;"

test-eq : should decode xi

    decode("&xi;") vs "\u03BE"

test-eq : should decode numeric xi

    decode("&#958;") vs "\u03BE"

test-eq : should encode omicron

    encode("\u03BF") vs "&omicron;"

test-eq : should decode omicron

    decode("&omicron;") vs "\u03BF"

test-eq : should decode numeric omicron

    decode("&#959;") vs "\u03BF"

test-eq : should encode pi

    encode("\u03C0") vs "&pi;"

test-eq : should decode pi

    decode("&pi;") vs "\u03C0"

test-eq : should decode numeric pi

    decode("&#960;") vs "\u03C0"

test-eq : should encode rho

    encode("\u03C1") vs "&rho;"

test-eq : should decode rho

    decode("&rho;") vs "\u03C1"

test-eq : should decode numeric rho

    decode("&#961;") vs "\u03C1"

test-eq : should encode sigmaf

    encode("\u03C2") vs "&sigmaf;"

test-eq : should decode sigmaf

    decode("&sigmaf;") vs "\u03C2"

test-eq : should decode numeric sigmaf

    decode("&#962;") vs "\u03C2"

test-eq : should encode sigma

    encode("\u03C3") vs "&sigma;"

test-eq : should decode sigma

    decode("&sigma;") vs "\u03C3"

test-eq : should decode numeric sigma

    decode("&#963;") vs "\u03C3"

test-eq : should encode tau

    encode("\u03C4") vs "&tau;"

test-eq : should decode tau

    decode("&tau;") vs "\u03C4"

test-eq : should decode numeric tau

    decode("&#964;") vs "\u03C4"

test-eq : should encode upsilon

    encode("\u03C5") vs "&upsilon;"

test-eq : should decode upsilon

    decode("&upsilon;") vs "\u03C5"

test-eq : should decode numeric upsilon

    decode("&#965;") vs "\u03C5"

test-eq : should encode phi

    encode("\u03C6") vs "&phi;"

test-eq : should decode phi

    decode("&phi;") vs "\u03C6"

test-eq : should decode numeric phi

    decode("&#966;") vs "\u03C6"

test-eq : should encode chi

    encode("\u03C7") vs "&chi;"

test-eq : should decode chi

    decode("&chi;") vs "\u03C7"

test-eq : should decode numeric chi

    decode("&#967;") vs "\u03C7"

test-eq : should encode psi

    encode("\u03C8") vs "&psi;"

test-eq : should decode psi

    decode("&psi;") vs "\u03C8"

test-eq : should decode numeric psi

    decode("&#968;") vs "\u03C8"

test-eq : should encode omega

    encode("\u03C9") vs "&omega;"

test-eq : should decode omega

    decode("&omega;") vs "\u03C9"

test-eq : should decode numeric omega

    decode("&#969;") vs "\u03C9"

test-eq : should encode thetasym

    encode("\u03D1") vs "&thetasym;"

test-eq : should decode thetasym

    decode("&thetasym;") vs "\u03D1"

test-eq : should decode numeric thetasym

    decode("&#977;") vs "\u03D1"

test-eq : should encode upsih

    encode("\u03D2") vs "&upsih;"

test-eq : should decode upsih

    decode("&upsih;") vs "\u03D2"

test-eq : should decode numeric upsih

    decode("&#978;") vs "\u03D2"

test-eq : should encode piv

    encode("\u03D6") vs "&piv;"

test-eq : should decode piv

    decode("&piv;") vs "\u03D6"

test-eq : should decode numeric piv

    decode("&#982;") vs "\u03D6"

test-eq : should encode ensp

    encode("\u2002") vs "&ensp;"

test-eq : should decode ensp

    decode("&ensp;") vs "\u2002"

test-eq : should decode numeric ensp

    decode("&#8194;") vs "\u2002"

test-eq : should encode emsp

    encode("\u2003") vs "&emsp;"

test-eq : should decode emsp

    decode("&emsp;") vs "\u2003"

test-eq : should decode numeric emsp

    decode("&#8195;") vs "\u2003"

test-eq : should encode thinsp

    encode("\u2009") vs "&thinsp;"

test-eq : should decode thinsp

    decode("&thinsp;") vs "\u2009"

test-eq : should decode numeric thinsp

    decode("&#8201;") vs "\u2009"

test-eq : should encode zwnj

    encode("\u200C") vs "&zwnj;"

test-eq : should decode zwnj

    decode("&zwnj;") vs "\u200C"

test-eq : should decode numeric zwnj

    decode("&#8204;") vs "\u200C"

test-eq : should encode zwj

    encode("\u200D") vs "&zwj;"

test-eq : should decode zwj

    decode("&zwj;") vs "\u200D"

test-eq : should decode numeric zwj

    decode("&#8205;") vs "\u200D"

test-eq : should encode lrm

    encode("\u200E") vs "&lrm;"

test-eq : should decode lrm

    decode("&lrm;") vs "\u200E"

test-eq : should decode numeric lrm

    decode("&#8206;") vs "\u200E"

test-eq : should encode rlm

    encode("\u200F") vs "&rlm;"

test-eq : should decode rlm

    decode("&rlm;") vs "\u200F"

test-eq : should decode numeric rlm

    decode("&#8207;") vs "\u200F"

test-eq : should encode ndash

    encode("\u2013") vs "&ndash;"

test-eq : should decode ndash

    decode("&ndash;") vs "\u2013"

test-eq : should decode numeric ndash

    decode("&#8211;") vs "\u2013"

test-eq : should encode mdash

    encode("\u2014") vs "&mdash;"

test-eq : should decode mdash

    decode("&mdash;") vs "\u2014"

test-eq : should decode numeric mdash

    decode("&#8212;") vs "\u2014"

test-eq : should encode lsquo

    encode("\u2018") vs "&lsquo;"

test-eq : should decode lsquo

    decode("&lsquo;") vs "\u2018"

test-eq : should decode numeric lsquo

    decode("&#8216;") vs "\u2018"

test-eq : should encode rsquo

    encode("\u2019") vs "&rsquo;"

test-eq : should decode rsquo

    decode("&rsquo;") vs "\u2019"

test-eq : should decode numeric rsquo

    decode("&#8217;") vs "\u2019"

test-eq : should encode sbquo

    encode("\u201A") vs "&sbquo;"

test-eq : should decode sbquo

    decode("&sbquo;") vs "\u201A"

test-eq : should decode numeric sbquo

    decode("&#8218;") vs "\u201A"

test-eq : should encode ldquo

    encode("\u201C") vs "&ldquo;"

test-eq : should decode ldquo

    decode("&ldquo;") vs "\u201C"

test-eq : should decode numeric ldquo

    decode("&#8220;") vs "\u201C"

test-eq : should encode rdquo

    encode("\u201D") vs "&rdquo;"

test-eq : should decode rdquo

    decode("&rdquo;") vs "\u201D"

test-eq : should decode numeric rdquo

    decode("&#8221;") vs "\u201D"

test-eq : should encode bdquo

    encode("\u201E") vs "&bdquo;"

test-eq : should decode bdquo

    decode("&bdquo;") vs "\u201E"

test-eq : should decode numeric bdquo

    decode("&#8222;") vs "\u201E"

test-eq : should encode dagger

    encode("\u2020") vs "&dagger;"

test-eq : should decode dagger

    decode("&dagger;") vs "\u2020"

test-eq : should decode numeric dagger

    decode("&#8224;") vs "\u2020"

test-eq : should encode Dagger

    encode("\u2021") vs "&Dagger;"

test-eq : should decode Dagger

    decode("&Dagger;") vs "\u2021"

test-eq : should decode numeric Dagger

    decode("&#8225;") vs "\u2021"

test-eq : should encode bull

    encode("\u2022") vs "&bull;"

test-eq : should decode bull

    decode("&bull;") vs "\u2022"

test-eq : should decode numeric bull

    decode("&#8226;") vs "\u2022"

test-eq : should encode hellip

    encode("\u2026") vs "&hellip;"

test-eq : should decode hellip

    decode("&hellip;") vs "\u2026"

test-eq : should decode numeric hellip

    decode("&#8230;") vs "\u2026"

test-eq : should encode permil

    encode("\u2030") vs "&permil;"

test-eq : should decode permil

    decode("&permil;") vs "\u2030"

test-eq : should decode numeric permil

    decode("&#8240;") vs "\u2030"

test-eq : should encode prime

    encode("\u2032") vs "&prime;"

test-eq : should decode prime

    decode("&prime;") vs "\u2032"

test-eq : should decode numeric prime

    decode("&#8242;") vs "\u2032"

test-eq : should encode Prime

    encode("\u2033") vs "&Prime;"

test-eq : should decode Prime

    decode("&Prime;") vs "\u2033"

test-eq : should decode numeric Prime

    decode("&#8243;") vs "\u2033"

test-eq : should encode lsaquo

    encode("\u2039") vs "&lsaquo;"

test-eq : should decode lsaquo

    decode("&lsaquo;") vs "\u2039"

test-eq : should decode numeric lsaquo

    decode("&#8249;") vs "\u2039"

test-eq : should encode rsaquo

    encode("\u203A") vs "&rsaquo;"

test-eq : should decode rsaquo

    decode("&rsaquo;") vs "\u203A"

test-eq : should decode numeric rsaquo

    decode("&#8250;") vs "\u203A"

test-eq : should encode oline

    encode("\u203E") vs "&oline;"

test-eq : should decode oline

    decode("&oline;") vs "\u203E"

test-eq : should decode numeric oline

    decode("&#8254;") vs "\u203E"

test-eq : should encode frasl

    encode("\u2044") vs "&frasl;"

test-eq : should decode frasl

    decode("&frasl;") vs "\u2044"

test-eq : should decode numeric frasl

    decode("&#8260;") vs "\u2044"

test-eq : should encode euro

    encode("\u20AC") vs "&euro;"

test-eq : should decode euro

    decode("&euro;") vs "\u20AC"

test-eq : should decode numeric euro

    decode("&#8364;") vs "\u20AC"

test-eq : should encode image

    encode("\u2111") vs "&image;"

test-eq : should decode image

    decode("&image;") vs "\u2111"

test-eq : should decode numeric image

    decode("&#8465;") vs "\u2111"

test-eq : should encode weierp

    encode("\u2118") vs "&weierp;"

test-eq : should decode weierp

    decode("&weierp;") vs "\u2118"

test-eq : should decode numeric weierp

    decode("&#8472;") vs "\u2118"

test-eq : should encode real

    encode("\u211C") vs "&real;"

test-eq : should decode real

    decode("&real;") vs "\u211C"

test-eq : should decode numeric real

    decode("&#8476;") vs "\u211C"

test-eq : should encode trade

    encode("\u2122") vs "&trade;"

test-eq : should decode trade

    decode("&trade;") vs "\u2122"

test-eq : should decode numeric trade

    decode("&#8482;") vs "\u2122"

test-eq : should encode alefsym

    encode("\u2135") vs "&alefsym;"

test-eq : should decode alefsym

    decode("&alefsym;") vs "\u2135"

test-eq : should decode numeric alefsym

    decode("&#8501;") vs "\u2135"

test-eq : should encode larr

    encode("\u2190") vs "&larr;"

test-eq : should decode larr

    decode("&larr;") vs "\u2190"

test-eq : should decode numeric larr

    decode("&#8592;") vs "\u2190"

test-eq : should encode uarr

    encode("\u2191") vs "&uarr;"

test-eq : should decode uarr

    decode("&uarr;") vs "\u2191"

test-eq : should decode numeric uarr

    decode("&#8593;") vs "\u2191"

test-eq : should encode rarr

    encode("\u2192") vs "&rarr;"

test-eq : should decode rarr

    decode("&rarr;") vs "\u2192"

test-eq : should decode numeric rarr

    decode("&#8594;") vs "\u2192"

test-eq : should encode darr

    encode("\u2193") vs "&darr;"

test-eq : should decode darr

    decode("&darr;") vs "\u2193"

test-eq : should decode numeric darr

    decode("&#8595;") vs "\u2193"

test-eq : should encode harr

    encode("\u2194") vs "&harr;"

test-eq : should decode harr

    decode("&harr;") vs "\u2194"

test-eq : should decode numeric harr

    decode("&#8596;") vs "\u2194"

test-eq : should encode crarr

    encode("\u21B5") vs "&crarr;"

test-eq : should decode crarr

    decode("&crarr;") vs "\u21B5"

test-eq : should decode numeric crarr

    decode("&#8629;") vs "\u21B5"

test-eq : should encode lArr

    encode("\u21D0") vs "&lArr;"

test-eq : should decode lArr

    decode("&lArr;") vs "\u21D0"

test-eq : should decode numeric lArr

    decode("&#8656;") vs "\u21D0"

test-eq : should encode uArr

    encode("\u21D1") vs "&uArr;"

test-eq : should decode uArr

    decode("&uArr;") vs "\u21D1"

test-eq : should decode numeric uArr

    decode("&#8657;") vs "\u21D1"

test-eq : should encode rArr

    encode("\u21D2") vs "&rArr;"

test-eq : should decode rArr

    decode("&rArr;") vs "\u21D2"

test-eq : should decode numeric rArr

    decode("&#8658;") vs "\u21D2"

test-eq : should encode dArr

    encode("\u21D3") vs "&dArr;"

test-eq : should decode dArr

    decode("&dArr;") vs "\u21D3"

test-eq : should decode numeric dArr

    decode("&#8659;") vs "\u21D3"

test-eq : should encode hArr

    encode("\u21D4") vs "&hArr;"

test-eq : should decode hArr

    decode("&hArr;") vs "\u21D4"

test-eq : should decode numeric hArr

    decode("&#8660;") vs "\u21D4"

test-eq : should encode forall

    encode("\u2200") vs "&forall;"

test-eq : should decode forall

    decode("&forall;") vs "\u2200"

test-eq : should decode numeric forall

    decode("&#8704;") vs "\u2200"

test-eq : should encode part

    encode("\u2202") vs "&part;"

test-eq : should decode part

    decode("&part;") vs "\u2202"

test-eq : should decode numeric part

    decode("&#8706;") vs "\u2202"

test-eq : should encode exist

    encode("\u2203") vs "&exist;"

test-eq : should decode exist

    decode("&exist;") vs "\u2203"

test-eq : should decode numeric exist

    decode("&#8707;") vs "\u2203"

test-eq : should encode empty

    encode("\u2205") vs "&empty;"

test-eq : should decode empty

    decode("&empty;") vs "\u2205"

test-eq : should decode numeric empty

    decode("&#8709;") vs "\u2205"

test-eq : should encode nabla

    encode("\u2207") vs "&nabla;"

test-eq : should decode nabla

    decode("&nabla;") vs "\u2207"

test-eq : should decode numeric nabla

    decode("&#8711;") vs "\u2207"

test-eq : should encode isin

    encode("\u2208") vs "&isin;"

test-eq : should decode isin

    decode("&isin;") vs "\u2208"

test-eq : should decode numeric isin

    decode("&#8712;") vs "\u2208"

test-eq : should encode notin

    encode("\u2209") vs "&notin;"

test-eq : should decode notin

    decode("&notin;") vs "\u2209"

test-eq : should decode numeric notin

    decode("&#8713;") vs "\u2209"

test-eq : should encode ni

    encode("\u220B") vs "&ni;"

test-eq : should decode ni

    decode("&ni;") vs "\u220B"

test-eq : should decode numeric ni

    decode("&#8715;") vs "\u220B"

test-eq : should encode prod

    encode("\u220F") vs "&prod;"

test-eq : should decode prod

    decode("&prod;") vs "\u220F"

test-eq : should decode numeric prod

    decode("&#8719;") vs "\u220F"

test-eq : should encode sum

    encode("\u2211") vs "&sum;"

test-eq : should decode sum

    decode("&sum;") vs "\u2211"

test-eq : should decode numeric sum

    decode("&#8721;") vs "\u2211"

test-eq : should encode minus

    encode("\u2212") vs "&minus;"

test-eq : should decode minus

    decode("&minus;") vs "\u2212"

test-eq : should decode numeric minus

    decode("&#8722;") vs "\u2212"

test-eq : should encode lowast

    encode("\u2217") vs "&lowast;"

test-eq : should decode lowast

    decode("&lowast;") vs "\u2217"

test-eq : should decode numeric lowast

    decode("&#8727;") vs "\u2217"

test-eq : should encode radic

    encode("\u221A") vs "&radic;"

test-eq : should decode radic

    decode("&radic;") vs "\u221A"

test-eq : should decode numeric radic

    decode("&#8730;") vs "\u221A"

test-eq : should encode prop

    encode("\u221D") vs "&prop;"

test-eq : should decode prop

    decode("&prop;") vs "\u221D"

test-eq : should decode numeric prop

    decode("&#8733;") vs "\u221D"

test-eq : should encode infin

    encode("\u221E") vs "&infin;"

test-eq : should decode infin

    decode("&infin;") vs "\u221E"

test-eq : should decode numeric infin

    decode("&#8734;") vs "\u221E"

test-eq : should encode ang

    encode("\u2220") vs "&ang;"

test-eq : should decode ang

    decode("&ang;") vs "\u2220"

test-eq : should decode numeric ang

    decode("&#8736;") vs "\u2220"

test-eq : should encode and

    encode("\u2227") vs "&and;"

test-eq : should decode and

    decode("&and;") vs "\u2227"

test-eq : should decode numeric and

    decode("&#8743;") vs "\u2227"

test-eq : should encode or

    encode("\u2228") vs "&or;"

test-eq : should decode or

    decode("&or;") vs "\u2228"

test-eq : should decode numeric or

    decode("&#8744;") vs "\u2228"

test-eq : should encode cap

    encode("\u2229") vs "&cap;"

test-eq : should decode cap

    decode("&cap;") vs "\u2229"

test-eq : should decode numeric cap

    decode("&#8745;") vs "\u2229"

test-eq : should encode cup

    encode("\u222A") vs "&cup;"

test-eq : should decode cup

    decode("&cup;") vs "\u222A"

test-eq : should decode numeric cup

    decode("&#8746;") vs "\u222A"

test-eq : should encode int

    encode("\u222B") vs "&int;"

test-eq : should decode int

    decode("&int;") vs "\u222B"

test-eq : should decode numeric int

    decode("&#8747;") vs "\u222B"

test-eq : should encode there4

    encode("\u2234") vs "&there4;"

test-eq : should decode there4

    decode("&there4;") vs "\u2234"

test-eq : should decode numeric there4

    decode("&#8756;") vs "\u2234"

test-eq : should encode sim

    encode("\u223C") vs "&sim;"

test-eq : should decode sim

    decode("&sim;") vs "\u223C"

test-eq : should decode numeric sim

    decode("&#8764;") vs "\u223C"

test-eq : should encode cong

    encode("\u2245") vs "&cong;"

test-eq : should decode cong

    decode("&cong;") vs "\u2245"

test-eq : should decode numeric cong

    decode("&#8773;") vs "\u2245"

test-eq : should encode asymp

    encode("\u2248") vs "&asymp;"

test-eq : should decode asymp

    decode("&asymp;") vs "\u2248"

test-eq : should decode numeric asymp

    decode("&#8776;") vs "\u2248"

test-eq : should encode ne

    encode("\u2260") vs "&ne;"

test-eq : should decode ne

    decode("&ne;") vs "\u2260"

test-eq : should decode numeric ne

    decode("&#8800;") vs "\u2260"

test-eq : should encode equiv

    encode("\u2261") vs "&equiv;"

test-eq : should decode equiv

    decode("&equiv;") vs "\u2261"

test-eq : should decode numeric equiv

    decode("&#8801;") vs "\u2261"

test-eq : should encode le

    encode("\u2264") vs "&le;"

test-eq : should decode le

    decode("&le;") vs "\u2264"

test-eq : should decode numeric le

    decode("&#8804;") vs "\u2264"

test-eq : should encode ge

    encode("\u2265") vs "&ge;"

test-eq : should decode ge

    decode("&ge;") vs "\u2265"

test-eq : should decode numeric ge

    decode("&#8805;") vs "\u2265"

test-eq : should encode sub

    encode("\u2282") vs "&sub;"

test-eq : should decode sub

    decode("&sub;") vs "\u2282"

test-eq : should decode numeric sub

    decode("&#8834;") vs "\u2282"

test-eq : should encode sup

    encode("\u2283") vs "&sup;"

test-eq : should decode sup

    decode("&sup;") vs "\u2283"

test-eq : should decode numeric sup

    decode("&#8835;") vs "\u2283"

test-eq : should encode nsub

    encode("\u2284") vs "&nsub;"

test-eq : should decode nsub

    decode("&nsub;") vs "\u2284"

test-eq : should decode numeric nsub

    decode("&#8836;") vs "\u2284"

test-eq : should encode sube

    encode("\u2286") vs "&sube;"

test-eq : should decode sube

    decode("&sube;") vs "\u2286"

test-eq : should decode numeric sube

    decode("&#8838;") vs "\u2286"

test-eq : should encode supe

    encode("\u2287") vs "&supe;"

test-eq : should decode supe

    decode("&supe;") vs "\u2287"

test-eq : should decode numeric supe

    decode("&#8839;") vs "\u2287"

test-eq : should encode oplus

    encode("\u2295") vs "&oplus;"

test-eq : should decode oplus

    decode("&oplus;") vs "\u2295"

test-eq : should decode numeric oplus

    decode("&#8853;") vs "\u2295"

test-eq : should encode otimes

    encode("\u2297") vs "&otimes;"

test-eq : should decode otimes

    decode("&otimes;") vs "\u2297"

test-eq : should decode numeric otimes

    decode("&#8855;") vs "\u2297"

test-eq : should encode perp

    encode("\u22A5") vs "&perp;"

test-eq : should decode perp

    decode("&perp;") vs "\u22A5"

test-eq : should decode numeric perp

    decode("&#8869;") vs "\u22A5"

test-eq : should encode sdot

    encode("\u22C5") vs "&sdot;"

test-eq : should decode sdot

    decode("&sdot;") vs "\u22C5"

test-eq : should decode numeric sdot

    decode("&#8901;") vs "\u22C5"

test-eq : should encode lceil

    encode("\u2308") vs "&lceil;"

test-eq : should decode lceil

    decode("&lceil;") vs "\u2308"

test-eq : should decode numeric lceil

    decode("&#8968;") vs "\u2308"

test-eq : should encode rceil

    encode("\u2309") vs "&rceil;"

test-eq : should decode rceil

    decode("&rceil;") vs "\u2309"

test-eq : should decode numeric rceil

    decode("&#8969;") vs "\u2309"

test-eq : should encode lfloor

    encode("\u230A") vs "&lfloor;"

test-eq : should decode lfloor

    decode("&lfloor;") vs "\u230A"

test-eq : should decode numeric lfloor

    decode("&#8970;") vs "\u230A"

test-eq : should encode rfloor

    encode("\u230B") vs "&rfloor;"

test-eq : should decode rfloor

    decode("&rfloor;") vs "\u230B"

test-eq : should decode numeric rfloor

    decode("&#8971;") vs "\u230B"

test-eq : should encode lang

    encode("\u2329") vs "&lang;"

test-eq : should decode lang

    decode("&lang;") vs "\u2329"

test-eq : should decode numeric lang

    decode("&#9001;") vs "\u2329"

test-eq : should encode rang

    encode("\u232A") vs "&rang;"

test-eq : should decode rang

    decode("&rang;") vs "\u232A"

test-eq : should decode numeric rang

    decode("&#9002;") vs "\u232A"

test-eq : should encode loz

    encode("\u25CA") vs "&loz;"

test-eq : should decode loz

    decode("&loz;") vs "\u25CA"

test-eq : should decode numeric loz

    decode("&#9674;") vs "\u25CA"

test-eq : should encode spades

    encode("\u2660") vs "&spades;"

test-eq : should decode spades

    decode("&spades;") vs "\u2660"

test-eq : should decode numeric spades

    decode("&#9824;") vs "\u2660"

test-eq : should encode clubs

    encode("\u2663") vs "&clubs;"

test-eq : should decode clubs

    decode("&clubs;") vs "\u2663"

test-eq : should decode numeric clubs

    decode("&#9827;") vs "\u2663"

test-eq : should encode hearts

    encode("\u2665") vs "&hearts;"

test-eq : should decode hearts

    decode("&hearts;") vs "\u2665"

test-eq : should decode numeric hearts

    decode("&#9829;") vs "\u2665"

test-eq : should encode diams

    encode("\u2666") vs "&diams;"

test-eq : should decode diams

    decode("&diams;") vs "\u2666"

test-eq : should decode numeric diams

    decode("&#9830;") vs "\u2666"



    ;
npm loves you