std::map chars; chars["space"] = 0x0020; chars["exclam"] = 0x0021; chars["quotedbl"] = 0x0022; chars["numbersign"] = 0x0023; chars["dollar"] = 0x0024; chars["percent"] = 0x0025; chars["ampersand"] = 0x0026; chars["quotesingle"] = 0x0027; chars["parenleft"] = 0x0028; chars["parenright"] = 0x0029; chars["asterisk"] = 0x002A; chars["plus"] = 0x002B; chars["comma"] = 0x002C; chars["hyphen"] = 0x002D; chars["period"] = 0x002E; chars["slash"] = 0x002F; chars["zero"] = 0x0030; chars["one"] = 0x0031; chars["two"] = 0x0032; chars["three"] = 0x0033; chars["four"] = 0x0034; chars["five"] = 0x0035; chars["six"] = 0x0036; chars["seven"] = 0x0037; chars["eight"] = 0x0038; chars["nine"] = 0x0039; chars["colon"] = 0x003A; chars["semicolon"] = 0x003B; chars["less"] = 0x003C; chars["equal"] = 0x003D; chars["greater"] = 0x003E; chars["question"] = 0x003F; chars["at"] = 0x0040; chars["A"] = 0x0041; chars["B"] = 0x0042; chars["C"] = 0x0043; chars["D"] = 0x0044; chars["E"] = 0x0045; chars["F"] = 0x0046; chars["G"] = 0x0047; chars["H"] = 0x0048; chars["I"] = 0x0049; chars["J"] = 0x004A; chars["K"] = 0x004B; chars["L"] = 0x004C; chars["M"] = 0x004D; chars["N"] = 0x004E; chars["O"] = 0x004F; chars["P"] = 0x0050; chars["Q"] = 0x0051; chars["R"] = 0x0052; chars["S"] = 0x0053; chars["T"] = 0x0054; chars["U"] = 0x0055; chars["V"] = 0x0056; chars["W"] = 0x0057; chars["X"] = 0x0058; chars["Y"] = 0x0059; chars["Z"] = 0x005A; chars["bracketleft"] = 0x005B; chars["backslash"] = 0x005C; chars["bracketright"] = 0x005D; chars["asciicircum"] = 0x005E; chars["underscore"] = 0x005F; chars["grave"] = 0x0060; chars["a"] = 0x0061; chars["b"] = 0x0062; chars["c"] = 0x0063; chars["d"] = 0x0064; chars["e"] = 0x0065; chars["f"] = 0x0066; chars["g"] = 0x0067; chars["h"] = 0x0068; chars["i"] = 0x0069; chars["j"] = 0x006A; chars["k"] = 0x006B; chars["l"] = 0x006C; chars["m"] = 0x006D; chars["n"] = 0x006E; chars["o"] = 0x006F; chars["p"] = 0x0070; chars["q"] = 0x0071; chars["r"] = 0x0072; chars["s"] = 0x0073; chars["t"] = 0x0074; chars["u"] = 0x0075; chars["v"] = 0x0076; chars["w"] = 0x0077; chars["x"] = 0x0078; chars["y"] = 0x0079; chars["z"] = 0x007A; chars["braceleft"] = 0x007B; chars["bar"] = 0x007C; chars["braceright"] = 0x007D; chars["asciitilde"] = 0x007E; chars["exclamdown"] = 0x00A1; chars["cent"] = 0x00A2; chars["sterling"] = 0x00A3; chars["currency"] = 0x00A4; chars["yen"] = 0x00A5; chars["brokenbar"] = 0x00A6; chars["section"] = 0x00A7; chars["dieresis"] = 0x00A8; chars["copyright"] = 0x00A9; chars["ordfeminine"] = 0x00AA; chars["guillemotleft"] = 0x00AB; chars["logicalnot"] = 0x00AC; chars["registered"] = 0x00AE; chars["macron"] = 0x00AF; chars["degree"] = 0x00B0; chars["plusminus"] = 0x00B1; chars["twosuperior"] = 0x00B2; chars["threesuperior"] = 0x00B3; chars["acute"] = 0x00B4; chars["mu"] = 0x00B5; chars["paragraph"] = 0x00B6; chars["periodcentered"] = 0x00B7; chars["cedilla"] = 0x00B8; chars["onesuperior"] = 0x00B9; chars["ordmasculine"] = 0x00BA; chars["guillemotright"] = 0x00BB; chars["onequarter"] = 0x00BC; chars["onehalf"] = 0x00BD; chars["threequarters"] = 0x00BE; chars["questiondown"] = 0x00BF; chars["Agrave"] = 0x00C0; chars["Aacute"] = 0x00C1; chars["Acircumflex"] = 0x00C2; chars["Atilde"] = 0x00C3; chars["Adieresis"] = 0x00C4; chars["Aring"] = 0x00C5; chars["AE"] = 0x00C6; chars["Ccedilla"] = 0x00C7; chars["Egrave"] = 0x00C8; chars["Eacute"] = 0x00C9; chars["Ecircumflex"] = 0x00CA; chars["Edieresis"] = 0x00CB; chars["Igrave"] = 0x00CC; chars["Iacute"] = 0x00CD; chars["Icircumflex"] = 0x00CE; chars["Idieresis"] = 0x00CF; chars["Eth"] = 0x00D0; chars["Ntilde"] = 0x00D1; chars["Ograve"] = 0x00D2; chars["Oacute"] = 0x00D3; chars["Ocircumflex"] = 0x00D4; chars["Otilde"] = 0x00D5; chars["Odieresis"] = 0x00D6; chars["multiply"] = 0x00D7; chars["Oslash"] = 0x00D8; chars["Ugrave"] = 0x00D9; chars["Uacute"] = 0x00DA; chars["Ucircumflex"] = 0x00DB; chars["Udieresis"] = 0x00DC; chars["Yacute"] = 0x00DD; chars["Thorn"] = 0x00DE; chars["germandbls"] = 0x00DF; chars["agrave"] = 0x00E0; chars["aacute"] = 0x00E1; chars["acircumflex"] = 0x00E2; chars["atilde"] = 0x00E3; chars["adieresis"] = 0x00E4; chars["aring"] = 0x00E5; chars["ae"] = 0x00E6; chars["ccedilla"] = 0x00E7; chars["egrave"] = 0x00E8; chars["eacute"] = 0x00E9; chars["ecircumflex"] = 0x00EA; chars["edieresis"] = 0x00EB; chars["igrave"] = 0x00EC; chars["iacute"] = 0x00ED; chars["icircumflex"] = 0x00EE; chars["idieresis"] = 0x00EF; chars["eth"] = 0x00F0; chars["ntilde"] = 0x00F1; chars["ograve"] = 0x00F2; chars["oacute"] = 0x00F3; chars["ocircumflex"] = 0x00F4; chars["otilde"] = 0x00F5; chars["odieresis"] = 0x00F6; chars["divide"] = 0x00F7; chars["oslash"] = 0x00F8; chars["ugrave"] = 0x00F9; chars["uacute"] = 0x00FA; chars["ucircumflex"] = 0x00FB; chars["udieresis"] = 0x00FC; chars["yacute"] = 0x00FD; chars["thorn"] = 0x00FE; chars["ydieresis"] = 0x00FF; chars["dotlessi"] = 0x0131; chars["Lslash"] = 0x0141; chars["lslash"] = 0x0142; chars["OE"] = 0x0152; chars["oe"] = 0x0153; chars["Scaron"] = 0x0160; chars["scaron"] = 0x0161; chars["Ydieresis"] = 0x0178; chars["Zcaron"] = 0x017D; chars["zcaron"] = 0x017E; chars["florin"] = 0x0192; chars["circumflex"] = 0x02C6; chars["caron"] = 0x02C7; chars["breve"] = 0x02D8; chars["dotaccent"] = 0x02D9; chars["ring"] = 0x02DA; chars["ogonek"] = 0x02DB; chars["tilde"] = 0x02DC; chars["hungarumlaut"] = 0x02DD; chars["endash"] = 0x2013; chars["emdash"] = 0x2014; chars["quoteleft"] = 0x2018; chars["quoteright"] = 0x2019; chars["quotesinglbase"] = 0x201A; chars["quotedblleft"] = 0x201C; chars["quotedblright"] = 0x201D; chars["quotedblbase"] = 0x201E; chars["dagger"] = 0x2020; chars["daggerdbl"] = 0x2021; chars["bullet"] = 0x2022; chars["ellipsis"] = 0x2026; chars["perthousand"] = 0x2030; chars["guilsinglleft"] = 0x2039; chars["guilsinglright"] = 0x203A; chars["fraction"] = 0x2044; chars["Euro"] = 0x20AC; chars["trademark"] = 0x2122; // ligatures: chars["fi"] = 0xFB01; chars["fl"] = 0xFB02; chars["ff"] = 0xFB00; chars["ffi"] = 0xFB03; // TODO "fb"