Skip to content

HTML Entity Encoder/Decoder — Zig source

Encode text to HTML entities and decode entities back to text (named + numeric). UTF-8 safe, runs entirely in your browser, with a shareable link to your exact input.

This is the Zig implementation — the same logic the interactive tool runs, in a shareable, citable form.

//! =============================================================================
//! html-entity-encoder.zig — CosmoDev polyglot showcase port of the
//! `html-entity-encoder` tool
//! -----------------------------------------------------------------------------
//! Language : Zig (0.13, standard library only)
//! Source:   ported from src/lib/htmlEntities.ts (the canonical, live
//!            TypeScript lib); mirrors
//!            src/tool-sources/html-entity-encoder/{python.py,rust.rs}
//! License  : display source — part of CosmoDev's polyglot tool pages
//!            (dev.cosmolabs.org). Shown verbatim alongside the JS/TS/Go/Rust/
//!            Python ports and the other language ports.
//! -----------------------------------------------------------------------------
//! HTML entity encode / decode — pure string transforms that never fail on
//! well-formed UTF-8 input.
//!
//! Encode escapes the five HTML-significant characters (& < > ' ") and can
//! optionally flatten every non-ASCII code point to a decimal numeric
//! reference. Decode resolves named (&amp;, &copy;, …), decimal (&#169;), and
//! hex (&#xA9;) references; unknown or malformed references pass through
//! whole.
//!
//! Behavior matches the TypeScript lib exactly: same inputs yield identical
//! outputs, including the lone-surrogate and out-of-range guards (decode
//! returns unresolvable references verbatim instead of erroring).
//!
//! Encode walks the input with std.unicode.Utf8View (full scalar values), so
//! an astral character such as an emoji encodes as a single &#N; reference
//! rather than two surrogate halves — invalid UTF-8 surfaces as
//! error.InvalidUtf8, the Zig equivalent of Rust enforcing &str well-
//! formedness at the type level. Decode is byte-oriented and total: invalid
//! bytes simply pass through. The reference scanner is hand-rolled (Zig has
//! no stdlib regex) and std.fmt.parseInt into u21 + std.unicode.utf8Encode
//! are the two guards: parseInt errors on absurd digit runs (overflow) and
//! utf8Encode errors on lone surrogates, together reproducing both the
//! explicit surrogate guard and the fromCodePoint try/catch of the
//! TypeScript source — exactly like char::from_u32 in the Rust port.
//!
//! The named-entity table is the full WHATWG HTML named-character-reference
//! set (2125 entries), generated from src/lib/htmlEntityTable.ts so the data
//! stays byte-identical to the canonical TypeScript lib, and is compiled
//! into a comptime perfect-hash map (std.StaticStringMap).
//! =============================================================================

const std = @import("std");

/// Encode options.
pub const EncodeOptions = struct {
    /// When true, every non-ASCII code point is also emitted as a decimal
    /// numeric reference (e.g. © → &#169;), producing ASCII-safe output.
    /// When false (the default), only the five HTML-significant characters
    /// are escaped.
    ascii: bool = false,
};

/// Escape the five HTML-significant characters.
///
/// A single-pass loop over code points: '&' is emitted as "&amp;" and so on.
/// (The Python port runs five sequential replaces and must replace '&' first
/// so its own output is never re-escaped — matching on one code point at a
/// time makes that ordering concern moot.)
///
/// With `options.ascii` set, every non-ASCII code point is additionally
/// rewritten to a decimal numeric reference. Utf8View yields full scalar
/// values, so an astral character such as an emoji encodes as a single
/// reference rather than two surrogate halves.
pub fn encodeHtml(
    allocator: std.mem.Allocator,
    text: []const u8,
    options: EncodeOptions,
) ![]u8 {
    var out = std.ArrayList(u8).init(allocator);
    errdefer out.deinit();

    var it = (try std.unicode.Utf8View.init(text)).iterator();
    while (it.nextCodepoint()) |cp| {
        switch (cp) {
            '&' => try out.appendSlice("&amp;"),
            '<' => try out.appendSlice("&lt;"),
            '>' => try out.appendSlice("&gt;"),
            '\'' => try out.appendSlice("&apos;"),
            '"' => try out.appendSlice("&quot;"),
            else => {
                if (options.ascii and cp > 0x7F) {
                    try out.writer().print("&#{d};", .{cp});
                } else {
                    var buf: [4]u8 = undefined;
                    const n = try std.unicode.utf8Encode(cp, &buf);
                    try out.appendSlice(buf[0..n]);
                }
            },
        }
    }
    return out.toOwnedSlice();
}

/// Decode every recognized reference in `text`. Unknown references and stray
/// ampersands are left exactly as they appear in the input. Decode is total:
/// malformed or out-of-range references are returned verbatim, never
/// erroring (the only error paths are allocation failures).
pub fn decodeHtml(allocator: std.mem.Allocator, text: []const u8) ![]u8 {
    var out = std.ArrayList(u8).init(allocator);
    errdefer out.deinit();

    var i: usize = 0;
    while (i < text.len) {
        if (text[i] == '&') {
            if (try parseReference(text, i, &out)) |end| {
                i = end;
                continue;
            }
        }
        // No reference starts here: copy one byte and advance. '&' can never
        // appear inside a multi-byte UTF-8 sequence, so byte-wise copying
        // never splits a character.
        try out.append(text[i]);
        i += 1;
    }
    return out.toOwnedSlice();
}

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

/// true when c is a valid digit for the radix (10 or 16).
fn isDigit(c: u8, hex: bool) bool {
    if (c >= '0' and c <= '9') return true;
    return hex and ((c >= 'a' and c <= 'f') or (c >= 'A' and c <= 'F'));
}

/// ASCII [A-Za-z].
fn isAsciiLetter(c: u8) bool {
    return (c >= 'A' and c <= 'Z') or (c >= 'a' and c <= 'z');
}

/// ASCII [A-Za-z0-9].
fn isAsciiAlnum(c: u8) bool {
    return isAsciiLetter(c) or (c >= '0' and c <= '9');
}

/// Hand-rolled matcher for the grammar
/// `&(#[xX][0-9a-fA-F]+|#[0-9]+|[A-Za-z][A-Za-z0-9]*);`.
///
/// Given that text[start] == '&', attempt to parse a well-formed reference.
/// On success, append the resolved bytes (which may be the original `&…;`
/// text verbatim, when the reference is unknown / unsafe) to `out` and
/// return the index just past the closing ';'. Returns null when no
/// reference grammar matches at all.
fn parseReference(text: []const u8, start: usize, out: *std.ArrayList(u8)) !?usize {
    var j = start + 1; // just past '&'
    if (j >= text.len) return null;

    // Identify the body grammar and scan its trailing index into j.
    if (text[j] == '#') {
        j += 1;
        if (j >= text.len) return null;
        const hex = text[j] == 'x' or text[j] == 'X';
        if (hex) j += 1;
        const digits_start = j;
        while (j < text.len and isDigit(text[j], hex)) j += 1;
        if (j == digits_start) return null; // '#' / '#x' with no digits
    } else if (isAsciiLetter(text[j])) {
        j += 1;
        while (j < text.len and isAsciiAlnum(text[j])) j += 1;
    } else {
        return null; // '&' not followed by '#' or a letter
    }

    // The body must be terminated by ';'.
    if (j >= text.len or text[j] != ';') return null;

    const body = text[start + 1 .. j]; // between '&' and ';', exclusive
    const full = text[start .. j + 1]; // the entire original match, for fallback
    try resolveBody(body, full, out);
    return j + 1;
}

/// Resolve one reference body (name, or "#digits") to its character, or
/// append the original match unchanged when the reference is unrecognized /
/// unsafe.
///
/// std.fmt.parseInt into u21 errors on absurd digit runs (overflow — u21
/// covers exactly the Unicode code space up to U+1FFFFF), and
/// std.unicode.utf8Encode errors on lone surrogates (U+D800..U+DFFF) and
/// values above U+10FFFF — together they mirror char::from_u32 in the Rust
/// port.
fn resolveBody(body: []const u8, full: []const u8, out: *std.ArrayList(u8)) !void {
    if (body[0] == '#') {
        const hex = body.len >= 2 and (body[1] == 'x' or body[1] == 'X');
        const digits = if (hex) body[2..] else body[1..];

        const cp = std.fmt.parseInt(u21, digits, if (hex) 16 else 10) catch {
            try out.appendSlice(full); // overflow / > U+1FFFFF
            return;
        };
        var buf: [4]u8 = undefined;
        const n = std.unicode.utf8Encode(cp, &buf) catch {
            try out.appendSlice(full); // lone surrogate or > U+10FFFF
            return;
        };
        try out.appendSlice(buf[0..n]);
        return;
    }

    // Named reference: one perfect-hash lookup over the full WHATWG table.
    if (entity_table.get(body)) |value| {
        try out.appendSlice(value);
    } else {
        try out.appendSlice(full); // unknown name — keep the original whole
    }
}

Also available in 13 other languages

Every CosmoDev tool ships its pure logic in TypeScript (web) and Go (CLI), with authored implementations in a dozen-plus languages — the same contract, ported. Compare all languages side by side →