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